Commit aec59cb8 authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

batch creation and submission for SLURM on server

parent 1c2dc8ae
......@@ -173,9 +173,19 @@ or
./gen_batch_jobs_cl.sh FLEXPART -i
./export_flexgen.sh exportA-I _[A-I]
./gen_options_all.sh ; ./gen_pathnames.sh ;
WARNING: gen_options_all.sh on preexisting dirs creates a options subdir! FIXME
in laptop:
./gen_batch_jobs_cl.sh
run: run_batch_cl.sh
in server with SLURM
gen_batch_jobs_SLURM.sh
run_batch_SLURM.sh
......
......@@ -16,7 +16,7 @@ cp gen_options.sh $target
cp define_options$options.sh $target
cp gen_options_all.sh $target
cp gen_pathnames.sh $target
cp gen_batch_jobs_cl.sh $target
cp gen_batch_jobs_*.sh $target
#cp define_default_run.sh $target
cp Makefile $target
......
#!/bin/bash
# Ignacio Pisso 4/2018
# based on loop_on_pathnames.sh
# optional args:
# 1) flexpart executable (default "FLEXPART")
pathnames_list_default="$(ls -1 pathnames*)"
OUTPUT=${2:-$pathnames_list_default}
#OUTPUTpwd="$(pwd)"
FLEXPARTdefault=FLEXPART
#FLEXPART=FLEXPART_8d70e43
FLEXPART=${1:-$FLEXPARTdefault}
echo $OUTPUT
for i in ${OUTPUT}
do
FP_slurm_batch_sl=slurm_batch_$i.sl
#FP_slurm_batch_sl=toto.sl
echo '#!/bin/bash' > $FP_slurm_batch_sl
echo '#SBATCH -J ' FP_$i >> $FP_slurm_batch_sl
echo '#SBATCH -D ' ${OUTPUTpwd} ' # working directory of script' >> $FP_slurm_batch_sl
echo '#SBATCH --mem=8092 # total memory requirement for the node (in MB)' >> $FP_slurm_batch_sl
echo '#SBATCH --mem-per-cpu=1024 # minimum amount of memory required pr. allocated CPU' >> $FP_slurm_batch_sl
echo '#SBATCH -n 1 # number of tasks, e.g. number of cores' >> $FP_slurm_batch_sl
echo '#SBATCH -N 1 # ensure all cores are on the same host/machine' >> $FP_slurm_batch_sl
echo '#SBATCH --mail-type=ALL # when to send e-mail (valid options are: BEGIN,END,FAIL,REQUEUE,ALL)' >> $FP_slurm_batch_sl
echo '#SBATCH --mail-user=ip@nilu.no # who to send email to' >> $FP_slurm_batch_sl
echo '#SBATCH -o output-%N-%j.out # filename to send standard out to' >> $FP_slurm_batch_sl
echo '#SBATCH -e error-%N-%j.err # filename to send standard error to' >> $FP_slurm_batch_sl
echo ' ' >> $FP_slurm_batch_sl
echo 'srun -l ' $FLEXPART $i >> $FP_slurm_batch_sl
echo $FLEXPART $i
done
#!/bin/bash
# Ignacio Pisso 4/2018
# optional args:
# 1) flexpart executable (default "FLEXPART")
# 2) FLEXPART inline arguments (-i, -v, etc) (default none)
OUTPUTdefault="$(ls -1 pathnames*)"
OUTPUT=${OUTPUTvar:-$OUTPUTdefault}
#OUTPUTpwd="$(pwd)"
......
#!/bin/bash
#OUTPUT="$(ls -1 *.sl)"
OUTPUTdefault="$(ls -1 *.sl)"
OUTPUT=${OUTPUTvar:-$OUTPUTdefault}
rm joblist
for i in ${OUTPUT}
do
echo sbatch $i | tee -a joblist1$group
sbatch $i | tee -a joblist2$group
done
Supports Markdown
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