Skip to content
Snippets Groups Projects
Commit 57d3d38e authored by Gab's avatar Gab
Browse files

large batch standardized for JZ

parent a88aa7c7
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,11 @@
set -x
source ./env_bench
SIMU=$bench_dir/testcase_large/ # Working directory
NML="cosmo.nml" # Namelist file
RAMSES=../ramses/bin/ramses3d # ramses executable
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
srun --mpi=pmi2 -K1 --resv-ports -n $SLURM_NTASKS $RAMSES $NML > 'run.log'
echo "General information:"
echo "--------------------"
......
#!/bin/bash
if [ -z "$1" ]
then
echo "Please provide the targeted machine from:"
ls ../machines/
echo ""
echo "Example: ./prepare.sh occigen-bdw"
exit 1
fi
machine_dir="../machines/$1"
cp $machine_dir/env_bench .
cp $machine_dir/batch_large.slurm .
echo "************************************************************"
echo "************************************************************"
echo "* Prepare Large case in $bench_dir"
echo "************************************************************"
if [[ $HOSTNAME = *"occigen"* ]]; then
source ../machines/occigen-bdw/env_bench
mkdir -p $bench_dir/testcase_large/
lfs setstripe -c 60 $bench_dir/testcase_large/ # ? squareroot(3600)=60
tar xvf /store/CINES/dci/SHARED/abs/ramses/input.tar -C $bench_dir/testcase_large/.
tar xvf /store/CINES/dci/SHARED/abs/ramses/PROD.tar -C $bench_dir/testcase_large/.
#lfs setstripe -c 60 .
tar xvf /store/CINES/dci/SHARED/abs/ramses/input.tar
tar xvf /store/CINES/dci/SHARED/abs/ramses/PROD.tar
elif [[ $HOSTNAME = *"jean-zay"* ]]; then
source ../machines/jean-zay-cpu/env_bench
mkdir -p $bench_dir/testcase_large/
tar xvf $SCRATCH/abs/ramses/input_big.tar -C $bench_dir/testcase_large/.
tar xvf $SCRATCH/abs/ramses/PROD_BIG.tar -C $bench_dir/testcase_large/.
tar xvf $SCRATCH/abs/ramses/input_big.tar
tar xvf $SCRATCH/abs/ramses/PROD_BIG.tar
elif [[ $HOSTNAME = *"irene"* ]]; then
source ../machines/irene-amd/env_bench
mkdir -p $bench_dir/testcase_large/
lfs setstripe -c 60 $bench_dir/testcase_large/ # ? squareroot(3600)=60
tar xvf $CCCSCRATCHDIR/abs/ramses/input_big.tar -C $bench_dir/testcase_large/.
tar xvf $CCCSCRATCHDIR/abs/ramses/PROD_BIG.tar -C $bench_dir/testcase_large/.
#lfs setstripe -c 60 . # ? squareroot(3600)=60
tar xvf $CCCSCRATCHDIR/abs/ramses/input_big.tar
tar xvf $CCCSCRATCHDIR/abs/ramses/PROD_BIG.tar
else
echo "Hostname not recognized: abort"
exit 1
fi
cp $bench_dir/testcase_large/PROD_BIG/cosmo.nml $bench_dir/testcase_large/.
cp ./PROD_BIG/cosmo.nml .
echo "************************************************************"
echo "* End Prepare large case "
echo "************************************************************"
#!/bin/bash
if [[ $HOSTNAME = *"occigen"* ]]; then
cd ../machines/occigen-bdw/
elif [[ $HOSTNAME = *"jean-zay"* ]]; then
cd ../machines/jean-zay-cpu/
elif [[ $HOSTNAME = *"irene"* ]]; then
cd ../machines/irene-amd/
else
echo "Hostname not recognized: abort"
exit 1
fi
source ./env_bench
if [ -z "$bench_dir" ]; then
echo "bench_dir missing"
exit 1
fi
sbatch batch_large.slurm
#!/bin/bash
source ./env_bench
if [[ $HOSTNAME = *"occigen"* ]]; then
source ../machines/occigen-bdw/env_bench
module switch intel/18.1 intel/17.2
module load python/3.6.3
elif [[ $HOSTNAME = *"jean-zay"* ]]; then
source ../machines/jean-zay-cpu/env_bench
module load python/3.7.5
elif [[ $HOSTNAME = *"irene"* ]]; then
source ../machines/irene-amd/env_bench
module load python3/3.7.5
else
echo "Hostname not recognized: abort"
......@@ -16,15 +14,8 @@ fi
echo "*******************************************************************************************************************"
echo "* Validate Large case in $bench_dir/testcase_large/ *"
echo "*******************************************************************************************************************"
cd $bench_dir/testcase_large
echo "* ls -1 *.log" && ls -1 *.log
log_file=$1
if [ -z "$log_file" ]; then
log_file=`ls -thlx1 run_* | awk 'NR < 2'`
echo "* No argument provided (ex: ./validate run_%m-%d-%y-%H-%M-%S.log) -> validation of the last run named $log_file"
else
echo "* Validation of the run named $log_file"
fi
log_file=./run.log
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`
......@@ -60,6 +51,6 @@ exp_ref=-5 # Defined and validated with an astrophysicist
abs_tol=1 # minimum absolute tolerance
python3 ../tools/isclose.py $exp_ref $exp_simu $abs_tol
# Copy log file
mkdir -p resluts-RAMSES-large
cp $bench_dir/testcase_large/$log_file $bench_dir/testcase_large/metric-large.log resluts-RAMSES-large/.
tail -n 4 resluts-RAMSES-large/metric-large.log
mkdir -p results-RAMSES-large
cp $log_file metric-large.log results-RAMSES-large/.
tail -n 4 results-RAMSES-large/metric-large.log
......@@ -10,7 +10,7 @@ fi
machine_dir="../machines/$1"
cp $machine_dir/env_bench .
cp $machine_dir/batch_medium .
cp $machine_dir/batch_medium.slurm .
#lfs setstripe -c 18 . # ? squareroot(330)~18
echo "************************************************************"
......
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