diff --git a/RAMSES/compile.sh b/RAMSES/compile.sh index 86ac237811c8d6420a2da6208ad747422ae9cd8f..ff8fc75b1f926e7e92c8b7682fc56880f9ecb338 100755 --- a/RAMSES/compile.sh +++ b/RAMSES/compile.sh @@ -1,7 +1,9 @@ #!/bin/bash source machines/occigen-bdw/env - +echo "************************************************************" +echo "* Compile " +echo "************************************************************" compile(){ cd $ramses_dir/ramses/bin make clean @@ -12,3 +14,7 @@ compile(){ } compile +echo "************************************************************" +echo "* End Compile " +echo "************************************************************" + diff --git a/RAMSES/machines/occigen-bdw/batch_small.slurm b/RAMSES/machines/occigen-bdw/batch_small.slurm index a50839e8fbf23b4e3d1042c8dbb976022c03fab8..7d68c0d66ac5cb690b30c339692825261216417c 100644 --- a/RAMSES/machines/occigen-bdw/batch_small.slurm +++ b/RAMSES/machines/occigen-bdw/batch_small.slurm @@ -16,6 +16,6 @@ SIMU=$bench_dir/DEBUG/ NML="cosmo.nml" #locate the executable file here RAMSES=$ramses_dir/ramses/bin/ramses3d -DATE=$( date +%Y-%m-%d_%Hh%M ) +DATE=`date +"%m-%d-%y-%H-%M-%S"` cd $SIMU srun --mpi=pmi2 -K1 --resv-ports -n $SLURM_NTASKS $RAMSES $NML > $SIMU'/run_'$DATE.log diff --git a/RAMSES/testcase_small/prepare.sh b/RAMSES/testcase_small/prepare.sh index 060e4b9b6dd35462fb673cea952c013a253ff6e8..46a6853dec3ec046248cf2b641557cae7986b47e 100755 --- a/RAMSES/testcase_small/prepare.sh +++ b/RAMSES/testcase_small/prepare.sh @@ -1,8 +1,19 @@ #!/bin/bash - source ../machines/occigen-bdw/env - -# Copy input for small case -cp $STOREDIR/testcase_small.tar.gz $bench_dir/. -cd $bench_dir/ -tar zxvf testcase_small.tar.gz +echo "************************************************************" +echo "* Prepare small case in $bench_dir" +echo "************************************************************" +if [[ $HOSTNAME = *"occigen"* ]]; then + #cp /store/CINES/dci/SHARED/abs/ramses/testcase_small.tar.gz $bench_dir/. + tar zxvf /store/CINES/dci/SHARED/abs/ramses/testcase_small.tar.gz -C $bench_dir/. +elif [[ $HOSTNAME = *"jean-zay"* ]]; then + tar zxvf $SCRATCH/abs/ramses/testcase_small.tar.gz -C $bench_dir/. +elif [[ $HOSTNAME = *"irene"* ]]; then + tar zxvf $CCCSCRATCHDIR/abs/ramses/testcase_small.tar.gz -C $bench_dir/. +else + echo "Hostname not recognized: abort" + exit 1 +fi +echo "************************************************************" +echo "* End Prepare small case " +echo "************************************************************" diff --git a/RAMSES/testcase_small/run.sh b/RAMSES/testcase_small/run.sh old mode 100644 new mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d230188048c8e632203b4bda1d89094a100c439d --- a/RAMSES/testcase_small/run.sh +++ b/RAMSES/testcase_small/run.sh @@ -0,0 +1,9 @@ +#!/bin/bash +cd ../machines/occigen-bdw +source ./env +if [ -z "$bench_dir" ]; then +echo "bench_dir missing" +exit 1 +fi + +sbatch batch_small.slurm diff --git a/RAMSES/testcase_small/validate.sh b/RAMSES/testcase_small/validate.sh old mode 100644 new mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..43f22f44005903d7229f7ebde7ba0d2ed6fde0f5 --- a/RAMSES/testcase_small/validate.sh +++ b/RAMSES/testcase_small/validate.sh @@ -0,0 +1,18 @@ +#!/bin/bash +source ../machines/occigen-bdw/env +cd $bench_dir/DEBUG + +log_file=`ls -thlx run_* | awk -F " " '{ print $1 }'` +start_t=`grep startup $log_file | awk '{ print $5 }'` +end_t=`grep "Total elapsed time:" $log_file | awk '{ print $4 }'` +perf=`bc -l <<< $end_t-$start_t` + +if [ -z "$perf" ] || [ -z "$end_t" ] +then + echo "bench is not validated" +else + echo "bench is validated" + echo "end = $end_t s" + echo "perf = $perf s (total simulation time excluding initialization and i/o)" +fi +