-
Notifications
You must be signed in to change notification settings - Fork 23
/
libcheck.sh
executable file
·39 lines (32 loc) · 1.68 KB
/
libcheck.sh
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
#!/usr/bin/env sh
# Report library versions used in model components of ACCESS-OM2
# Andrew Kiss https://github.com/aekiss
# mom_type= ACCESS-OM for default or ACCESS-OM-BGC for WOMBAT :RASF
if [[ -z "${ACCESS_OM_DIR}" ]]; then
export ACCESS_OM_DIR=$(pwd)
fi
if [[ -z "${LIBACCESSOM2_ROOT}" ]]; then
export LIBACCESSOM2_ROOT=$ACCESS_OM_DIR/src/libaccessom2
fi
if [[ -z "${mom_type}" ]]; then
export mom_type=ACCESS-OM-BGC
fi
declare -a libs=(openmpi netcdf)
declare -a paths=(${ACCESS_OM_DIR}/src/mom/bin/environs.nci ${ACCESS_OM_DIR}/src/cice5/bld/config.nci.auscom.360x300 ${ACCESS_OM_DIR}/src/cice5/bld/config.nci.auscom.1440x1080 ${ACCESS_OM_DIR}/src/cice5/bld/config.nci.auscom.3600x2700 ${ACCESS_OM_DIR}/src/cice5/bld/config.nci.auscom.18x15.3600x2700 ${LIBACCESSOM2_ROOT}/build_on_gadi.sh ${LIBACCESSOM2_ROOT}/oasis3-mct/util/make_dir/config.gadi)
declare -a exepaths=(${ACCESS_OM_DIR}/src/mom/exec/nci/${mom_type}/fms_${mom_type}.x ${ACCESS_OM_DIR}/src/cice5/build_auscom_360x300_24p/cice_auscom_360x300_24p.exe ${ACCESS_OM_DIR}/src/cice5/build_auscom_1440x1080_480p/cice_auscom_1440x1080_480p.exe ${ACCESS_OM_DIR}/src/cice5/build_auscom_3600x2700_722p/cice_auscom_3600x2700_722p.exe ${ACCESS_OM_DIR}/src/cice5/build_auscom_18x15.3600x2700_1682p/cice_auscom_18x15.3600x2700_1682p.exe ${LIBACCESSOM2_ROOT}/build/bin/yatm.exe ${ACCESS_OM_DIR}/src/mom/bin/mppnccombine.nci)
for l in "${libs[@]}"
do
echo $l library versions used:
echo " in build scripts:"
for p in "${paths[@]}"
do
echo -n " "
grep -H $l $p
done
echo " in executables:"
for p in "${exepaths[@]}"
do
echo " $p: "
ldd $p | grep $l || true
done
done