The run-fpm.sh script installed by the setup.sh script on the “neural-net” branch of the Berkeley Lab fork of ICAR facilitates passing arguments to the executing program the executing program via a trailing -- ... argument. An example of the resulting script is
#!/bin/sh
#-- DO NOT EDIT -- created by icar/setup.sh
export PKG_CONFIG_PATH
fpm_arguments=""
program_arguments=""
while test $# -gt 0
do
case "$1" in
--) program_arguments="$@"
;;
*) if [ -z "$program_arguments" ]; then
fpm_arguments="$fpm_arguments $1"
fi
;;
esac
shift
done
export PKG_CONFIG_PATH
/Users/rouson/.local/bin/fpm $fpm_arguments --verbose \
--profile release \
--c-compiler "/opt/mpich/3.2/gnu/12.3.0/bin/mpicc" \
--compiler "/opt/opencoarrays/2.10.1/gnu/12.3.0/bin/caf" \
--flag "-cpp -DUSE_ASSERTIONS=.false. -I/opt/homebrew/opt/fftw/include -fallow-argument-mismatch -ffree-line-length-none -DVERSION=\'neural-net-0-g2734521-dirty\' -L/opt/homebrew/opt/netcdf/lib -L/opt/homebrew/opt/fftw/lib -L/opt/homebrew/opt/hdf5/lib -L/opt/homebrew/opt/netcdf-fortran/lib" \
$program_arguments
The ICAR setup.sh script copies everything up to and including the done line from a icar/src/run-fpm.sh-header and then appends the rest. Let's do something similar.
The
run-fpm.sh
script installed by thesetup.sh
script on the “neural-net” branch of the Berkeley Lab fork of ICAR facilitates passing arguments to the executing program the executing program via a trailing-- ...
argument. An example of the resulting script isThe ICAR setup.sh script copies everything up to and including the
done
line from a icar/src/run-fpm.sh-header and then appends the rest. Let's do something similar.