source: issm/trunk/externalpackages/netcdf/install-4.7-parallel-static.sh@ 25836

Last change on this file since 25836 was 25836, checked in by Mathieu Morlighem, 4 years ago

merged trunk-jpl and trunk for revision 25834

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2set -eu
3
4
5# Dependencies
6# - MPI implementation (for parallel I/O support)
7# - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
8# - zlib (1.2.5 or later, for netCDF-4 compression)
9# - curl (7.18.0 or later, for DAP remote access client support)
10#
11# For most ISSM installations, only hdf5 will be necessary
12#
13# Sources:
14# - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
15#
16
17# NOTE:
18# - Certain configuration tests fail if libraries are not supplied explicitly
19
20# Constants
21#
22VER="4.7.2"
23
24HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
25ZLIB_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
26
27# Environment
28#
29export CC=mpicc
30export CPPFLAGS="-I${ZLIB_ROOT}/include"
31
32export HDF5LIB="${HDF5_ROOT}/lib/libhdf5_hl.a ${HDF5_ROOT}/lib/libhdf5.a"
33export ZLIB="${ZLIB_ROOT}/lib/libz.a"
34
35# Download source
36$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
37
38# Unpack source
39tar -zxvf netcdf-c-$VER.tar.gz
40
41# Cleanup
42rm -rf install src
43mkdir install src
44
45# Move source to 'src' directory
46mv netcdf-c-$VER/* src/
47rm -rf netcdf-c-$VER
48
49# Configure
50cd src
51./configure \
52 --prefix="${ISSM_DIR}/externalpackages/netcdf/install" \
53 --disable-shared \
54 --disable-dependency-tracking \
55 --enable-fast-install \
56 --disable-doxygen \
57 --enable-netcdf4 \
58 --disable-dap \
59 --disable-testsets \
60 --disable-examples \
61 --disable-filter-testing
62
63# Compile and install
64if [ $# -eq 0 ]; then
65 make
66 make install
67else
68 make -j $1
69 make -j $1 install
70fi
71
72# Return to initial directory
73cd ..
Note: See TracBrowser for help on using the repository browser.