Skip to content

Commit

Permalink
fix(setup.sh): add LC_RPATH to run-fpm.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Nov 30, 2024
1 parent 1a5553b commit 4495518
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demo/app/train-cloud-microphysics.F90
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 11 additions & 2 deletions demo/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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`

Expand Down

0 comments on commit 4495518

Please sign in to comment.