diff --git a/demo/app/train-cloud-microphysics.F90 b/demo/app/train-cloud-microphysics.F90 index 23428c85..5efe5c40 100644 --- a/demo/app/train-cloud-microphysics.F90 +++ b/demo/app/train-cloud-microphysics.F90 @@ -1,7 +1,7 @@ ! Copyright (c), The Regents of the University of California ! Terms of use are as specified in LICENSE.txt -# include "assert_macros.h" +#include "assert_macros.h" program train_cloud_microphysics !! Train a neural network to represent a cloud microphysics model from diff --git a/demo/setup.sh b/demo/setup.sh index 46ce5b05..e70e8850 100755 --- a/demo/setup.sh +++ b/demo/setup.sh @@ -53,6 +53,10 @@ if [ $(uname) = "Darwin" ]; then echo "$FPM_CC appears to be an Apple compiler. Please set FPM_CC to the location of LLVM clang." exit 1 fi + if [[ -z ${LC_RPATH:-} ]]; then + printf "Please set LC_RPATH=\$DYLD_LIBRARY_PATH path and restart this script.\n\n" + exit 1 + fi else cat <<'EOF' @@ -72,11 +76,16 @@ elif [ $(uname) = "Linux" ]; then fi if [[ -z ${NETCDFF_LIB_PATH:-} ]]; then printf "Please set NETCDFF_LIB_PATH to the NetCDF-Fortran library path and restart this script.\n\n" - exit 1 + exit 1 + fi + if [[ -z ${LC_RPATH:-} ]]; then + printf "Please set LC_RPATH=\$LD_LIBRARY_PATH path and restart this script.\n\n" + exit 1 fi fi -FPM_LD_FLAG=" -L$NETCDF_LIB_PATH -L$HDF5_LIB_PATH -L$NETCDFF_LIB_PATH" + +FPM_LD_FLAG=" -L$NETCDF_LIB_PATH -L$HDF5_LIB_PATH -L$NETCDFF_LIB_PATH -rpath $LC_RPATH" PREFIX=`realpath $PREFIX`