|
Last change
on this file since 24424 was 24424, checked in by jdquinn, 6 years ago |
|
CHG: Updated solid earth config to work with PETSc 3.7.
|
-
Property svn:executable
set to
*
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 | set -eu
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | # Dependencies
|
|---|
| 6 | # - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
|
|---|
| 7 | # - zlib (1.2.5 or later, for netCDF-4 compression)
|
|---|
| 8 | # - curl (7.18.0 or later, for DAP remote access client support)
|
|---|
| 9 | #
|
|---|
| 10 | # For most ISSM installations, only hdf5 will be necessary
|
|---|
| 11 | #
|
|---|
| 12 |
|
|---|
| 13 | # Constants
|
|---|
| 14 | #
|
|---|
| 15 | VER="4.7.2"
|
|---|
| 16 | HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
|
|---|
| 17 | ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
|
|---|
| 18 |
|
|---|
| 19 | # Environment
|
|---|
| 20 | #
|
|---|
| 21 | export CPPFLAGS="-I${ZLIB_ROOT}/include -I${HDF5_ROOT}/include"
|
|---|
| 22 | export LDFLAGS="-L${ZLIB_ROOT}/lib -L${HDF5_ROOT}/lib"
|
|---|
| 23 |
|
|---|
| 24 | # Download source
|
|---|
| 25 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
|---|
| 26 |
|
|---|
| 27 | # Unpack source
|
|---|
| 28 | tar -zxvf netcdf-c-$VER.tar.gz
|
|---|
| 29 |
|
|---|
| 30 | # Cleanup
|
|---|
| 31 | rm -rf install src
|
|---|
| 32 | mkdir install src
|
|---|
| 33 |
|
|---|
| 34 | # Move source to 'src' directory
|
|---|
| 35 | mv netcdf-c-$VER/* src/
|
|---|
| 36 | rm -rf netcdf-c-$VER
|
|---|
| 37 |
|
|---|
| 38 | # Configure
|
|---|
| 39 | cd src
|
|---|
| 40 | ./configure \
|
|---|
| 41 | --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
|
|---|
| 42 | --disable-doxygen
|
|---|
| 43 |
|
|---|
| 44 | # Compile and install
|
|---|
| 45 | if [ $# -eq 0 ]; then
|
|---|
| 46 | make
|
|---|
| 47 | make install
|
|---|
| 48 | else
|
|---|
| 49 | make -j $1
|
|---|
| 50 | make -j $1 install
|
|---|
| 51 | fi
|
|---|
| 52 |
|
|---|
| 53 | # Return to initial directory
|
|---|
| 54 | cd ..
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.