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

Last change on this file since 26744 was 26744, checked in by Mathieu Morlighem, 3 years ago

merged trunk-jpl and trunk for revision 26742

  • Property svn:executable set to *
File size: 1.7 KB
RevLine 
[24923]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# Sources:
12# - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
13#
14# NOTE:
15# - Certain configuration tests fail if libraries are not supplied explicitly
[26744]16#
17# TODO:
18# - Compile and link curl statically (issue with DAP and system libs on macOS
19# with more restirctive Gatekeeper; see also --disable-dap option in
20# configuration)
21#
[24923]22
23# Constants
24#
25VER="4.7.2"
[25243]26
[26744]27PREFIX="${ISSM_DIR}/externalpackages/netcdf/install" # Set to location where external package should be installed
[24923]28
29# Environment
30#
31export CC=mpicc
[25745]32export CPPFLAGS="-I${ZLIB_ROOT}/include"
[24923]33
[25745]34export HDF5LIB="${HDF5_ROOT}/lib/libhdf5_hl.a ${HDF5_ROOT}/lib/libhdf5.a"
35export ZLIB="${ZLIB_ROOT}/lib/libz.a"
36
[24923]37# Download source
38$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
39
40# Unpack source
[26744]41tar -zxvf netcdf-c-${VER}.tar.gz
[24923]42
43# Cleanup
[26744]44rm -rf ${PREFIX} src
45mkdir -p ${PREFIX} src
[24923]46
47# Move source to 'src' directory
[26744]48mv netcdf-c-${VER}/* src
49rm -rf netcdf-c-${VER}
[24923]50
51# Configure
52cd src
53./configure \
[26744]54 --prefix="${PREFIX}" \
[25073]55 --disable-shared \
[24923]56 --disable-dependency-tracking \
57 --enable-fast-install \
[25073]58 --disable-doxygen \
[25125]59 --enable-netcdf4 \
[25745]60 --disable-dap \
[24923]61 --disable-testsets \
[25243]62 --disable-examples \
63 --disable-filter-testing
[24923]64
65# Compile and install
66if [ $# -eq 0 ]; then
67 make
68 make install
69else
70 make -j $1
71 make -j $1 install
72fi
Note: See TracBrowser for help on using the repository browser.