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 #!/bin/bash
source machines/occigen-bdw/env source machines/occigen-bdw/env
echo "************************************************************"
echo "* Compile "
echo "************************************************************"
compile(){ compile(){
cd $ramses_dir/ramses/bin cd $ramses_dir/ramses/bin
make clean make clean
...@@ -12,3 +14,7 @@ compile(){ ...@@ -12,3 +14,7 @@ compile(){
} }
compile compile
echo "************************************************************"
echo "* End Compile "
echo "************************************************************"
...@@ -16,6 +16,6 @@ SIMU=$bench_dir/DEBUG/ ...@@ -16,6 +16,6 @@ SIMU=$bench_dir/DEBUG/
NML="cosmo.nml" NML="cosmo.nml"
#locate the executable file here #locate the executable file here
RAMSES=$ramses_dir/ramses/bin/ramses3d RAMSES=$ramses_dir/ramses/bin/ramses3d
DATE=$( date +%Y-%m-%d_%Hh%M ) DATE=`date +"%m-%d-%y-%H-%M-%S"`
cd $SIMU cd $SIMU
srun --mpi=pmi2 -K1 --resv-ports -n $SLURM_NTASKS $RAMSES $NML > $SIMU'/run_'$DATE.log srun --mpi=pmi2 -K1 --resv-ports -n $SLURM_NTASKS $RAMSES $NML > $SIMU'/run_'$DATE.log
#!/bin/bash #!/bin/bash
source ../machines/occigen-bdw/env source ../machines/occigen-bdw/env
echo "************************************************************"
# Copy input for small case echo "* Prepare small case in $bench_dir"
cp $STOREDIR/testcase_small.tar.gz $bench_dir/. echo "************************************************************"
cd $bench_dir/ if [[ $HOSTNAME = *"occigen"* ]]; then
tar zxvf testcase_small.tar.gz #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