-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile parallel netcdf_mpich.txt
executable file
·44 lines (26 loc) · 1.16 KB
/
compile parallel netcdf_mpich.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
0. Load modules for compiling
At mt moran
module load gnu/4.4.6
module load mpich/3.0.4cd
usu HPC
reuse .mpich-3.1.1-slurm
1. install curl
./configure --prefix=/path to installation directory
make install
2. install zlib
wget http://zlib.net/zlib-1.2.8.tar.giz
./configure --prefix=/path to installation directory
make install
3. to use pnetcdf build parallel-netcdf
Get pnetcdf (https://trac.mcs.anl.gov/projects/parallel-netcdf)
./configure --prefix=/path to installation directory
make install
4. build Hdf5 with zlib and enable-parallel
Get HDF5 (https://www.hdfgroup.org/HDF5)
LIBS=-ldl CC=mpicc ./configure --enable-parallel --prefix=/path to installation directory --with-zlib=/path to installation directory
make install
5. build netcdf
LIBS=-ldl CC=mpicc LDFLAGS=-L/path to installation directory/lib CPPFLAGS=-I/path to installation directory/include ./configure --disable-shared --enable-parallel-tests --enable-pnetcdf --prefix=/path to installation directory
make install
When linking a code (e.g. Parallel UEB) use
-lpnetcdf -lhdf5_hl -lhdf5 -ldl -lm -lz -ldl