stardis-spk

Scripts and datasets for running Stardis simulations
git clone git://git.meso-star.fr/stardis-spk.git
Log | Files | Refs | README | LICENSE

commit c9330dba880f2e87929eef2742514b16708e30bd
parent 67e13d974d0589644c50833ee9b13ae77b6654ed
Author: Benjamin Piaud <benjamin.piaud@meso-star.com>
Date:   Tue,  8 Dec 2020 14:50:47 +0100

ajout d'un check de la commande stardis dans les scripts

Diffstat:
Mcube/run_dump_path.sh | 10++++++++++
Mcube/run_green_evaluation.sh | 9+++++++++
Mcube/run_probe_computation.sh | 10++++++++++
3 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/cube/run_dump_path.sh b/cube/run_dump_path.sh @@ -28,6 +28,16 @@ TIME=inf #erase previous files if exist rm -f $GEOM_FILE ${PATH_FILE_PREFIX}* +#check stardis installation +if !(command -v stardis > /dev/null) +then + echo ">>> stardis command not found !" + echo ">>> To register stardis in the current shell you must type :" + echo ">>> source ~/Stardis-XXX-GNU-Linux64/etc/stardis.profile" + echo ">>> where ~/Stardis-XXX-GNU-Linux64 is the stardis directory installation" + exit 1 +fi + #launch Stardis to dump geometry in vtk format stardis -V 3 -M model.txt -d > $GEOM_FILE diff --git a/cube/run_green_evaluation.sh b/cube/run_green_evaluation.sh @@ -25,6 +25,15 @@ GREEN_FILE=probe_X${X}-Y${Y}-Z${Z}_N${NREAL}.green SETTINGS_FILE=settings.txt ### END USER PARAMETERS SECTION +#check stardis installation +if !(command -v stardis > /dev/null) +then + echo ">>> stardis command not found !" + echo ">>> To register stardis in the current shell you must type :" + echo ">>> source ~/Stardis-XXX-GNU-Linux64/etc/stardis.profile" + echo ">>> where ~/Stardis-XXX-GNU-Linux64 is the stardis directory installation" + exit 1 +fi if [ -f "$GREEN_FILE" ]; then echo " " diff --git a/cube/run_probe_computation.sh b/cube/run_probe_computation.sh @@ -25,6 +25,16 @@ FILE=stardis_result_N$NREAL.txt #erase FILE result if exists rm -f $FILE +#check stardis installation +if !(command -v stardis > /dev/null) +then + echo ">>> stardis command not found !" + echo ">>> To register stardis in the current shell you must type :" + echo ">>> source ~/Stardis-XXX-GNU-Linux64/etc/stardis.profile" + echo ">>> where ~/Stardis-XXX-GNU-Linux64 is the stardis directory installation" + exit 1 +fi + #launch Stardis for each defined TIME echo "#time Temperature errorbar N_failures N_Realizations" >> $FILE for i in ${TIME[@]};