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

Last change on this file was 28013, checked in by Mathieu Morlighem, 17 months ago

merged trunk-jpl and trunk for revision 28011

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