-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnc_config
executable file
·83 lines (78 loc) · 1.84 KB
/
nc_config
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
#echo $HOST
if [ -e "stage.txt" ]; then
source stage.txt
if [[ $stage == 1 ]];then
if [[ "$1" == *"prefix"* ]];
then
./local/bin/nc-config --prefix
elif [[ "$1" == *"flibs"* ]];
then
./local/bin/nf-config --flibs
fi
exit
fi
fi
if [[ $HOST == *"cori"* ]];
then
# echo "run on $HOST"
module load PrgEnv-intel/6.0.10
module load cray-netcdf/4.6.3.2
ncdf_dir=/opt/cray/pe/netcdf/4.6.3.2/INTEL/19.0
if [[ "$1" == *"prefix"* ]];
then
echo "$ncdf_dir"
elif [[ "$1" == *"flibs"* ]];
then
echo "-L$ncdf_dir/lib -lnetcdff -L$ncdf_dir/lib -lnetcdf"
else
echo ""
fi
elif [[ $(hostname) == *"scs"* ]];
then
if [[ "$2" == *"gcc"* ]];
then
ncdf_dir=/global/software/sl-7.x86_64/modules/gcc/6.3.0/netcdf/4.4.1.1-gcc-s/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ncdf_dir/lib
if [[ "$1" == *"prefix"* ]];
then
echo "$ncdf_dir"
elif [[ "$1" == *"flibs"* ]];
then
$ncdf_dir/bin/nf-config --flibs
else
echo ""
fi
else
module load intel/2018.1.163
ncdf_dir=/global/software/sl-7.x86_64/modules/intel/2018.1.163/netcdf/4.6.1-intel-s/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ncdf_dir/lib
if [[ "$1" == *"prefix"* ]];
then
echo "$ncdf_dir"
elif [[ "$1" == *"flibs"* ]];
then
/global/software/sl-7.x86_64/modules/intel/2018.1.163/netcdf/4.6.1-intel-s/bin/nf-config --flibs
else
echo ""
fi
fi
elif [[ $(hostname) == *"biome"* ]]; then
# echo "running on $(hostname)"
ncdir=/local/software/sl-7.x86_64/modules/gcc/12.2.0/netcdf/4.9.0-gcc-s/
if [[ "$1" == *"prefix"* ]];
then
echo "$ncdir"
elif [[ "$1" == *"flibs"* ]];
then
$ncdir/bin/nf-config --flibs
fi
else
if [[ "$1" == *"prefix"* ]];
then
nc-config --prefix
elif [[ "$1" == *"flibs"* ]];
then
nf-config --flibs
fi
fi