Skip to content
Snippets Groups Projects
Commit 749034dc authored by jourdain's avatar jourdain
Browse files

Finalize small test case (implement run and validate)

parent 2222e470
No related branches found
No related tags found
No related merge requests found
#!/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 "************************************************************"
......@@ -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
#!/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 "************************************************************"
#!/bin/bash
cd ../machines/occigen-bdw
source ./env
if [ -z "$bench_dir" ]; then
echo "bench_dir missing"
exit 1
fi
sbatch batch_small.slurm
#!/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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment