123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- #!/bin/bash
- ### Options for SimData configuration
- if [ -d /scratch1 ] || [ -d /scratch2 ] || [ -d /nica ]
- then
- export JOB_MANAGER=SGE
- fi
- if [ -d /lustre ]
- then
- export JOB_MANAGER=SLURM
- fi
- if [ -d /mnt/pool/nica/5 ]
- then
- export JOB_MANAGER=SLURM_MEPHI
- fi
- if [ -d /zfs/hybrilit.jinr.ru ] || [ -d /eos/hybrilit.jinr.ru ]
- then
- export JOB_MANAGER=SLURM_GOVORUN
- fi
- filename=${BASH_SOURCE}
- pathname=`readlink -f $filename`
- export SimDataPath=`dirname $pathname`
- #####################################
- if [ $JOB_MANAGER == 'SGE' ]
- then
- export ROOT_SOURCE_PATH= #/opt/fairsoft/bmn/may18p1/bin/thisroot.sh
- export MCINI_PATH=/scratch2/parfenov/Soft/mcini-new
- export DCM_MODEL_PATH=/scratch2/parfenov/Soft/dcmqgsmfragments
- export JAM_MODEL_PATH=/scratch2/parfenov/Soft/jam-1.90596
- export SMASH_MODEL_PATH=/scratch2/parfenov/Soft/smash-2.1.1/build/
- export URQMD_MODEL_PATH=/scratch2/parfenov/Soft/urqmd-3.4
- elif [ $JOB_MANAGER == 'SLURM' ]
- then
- export ROOT_SOURCE_PATH=/cvmfs/fairsoft.gsi.de/debian10/fairsoft/jun19p2/bin/thisroot.sh
- export MCINI_PATH=/lustre/nyx/hades/user/parfenov/Soft/mcini
- export DCM_MODEL_PATH=/lustre/nyx/hades/user/parfenov/mc/macros/submit_botvina/dcmqgsmfragments
- export JAM_MODEL_PATH=/lustre/nyx/hades/user/parfenov/Soft/jam-1.90596
- export SMASH_MODEL_PATH=/lustre/nyx/hades/user/parfenov/Soft/Models/SMASH/smash-2.0.1/build
- export URQMD_MODEL_PATH=/lustre/nyx/hades/user/parfenov/Soft/urqmd-3.4
- elif [ $JOB_MANAGER == 'SLURM_MEPHI' ]
- then
- export ROOT_SOURCE_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/ROOT/build-cxx11/bin/thisroot.sh
- export MCINI_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/mcini
- export DCM_MODEL_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/dcmqgsmfragments
- export JAM_MODEL_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/jam-1.90596
- export SMASH_MODEL_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/smash-2.0.2/build
- export URQMD_MODEL_PATH=/mnt/pool/nica/5/parfenovpeter/Soft/Cherenkov/urqmd-3.4
- elif [ $JOB_MANAGER == 'SLURM_GOVORUN' ]
- then
- export ROOT_SOURCE_PATH= #/lustre/stor1/parfenov/Soft/ROOT/build-cxx11/bin/thisroot.sh
- export MCINI_PATH=/lustre/stor1/parfenov/Soft/mcini
- export DCM_MODEL_PATH=/lustre/stor1/parfenov/Soft/dcmqgsmfragments
- export JAM_MODEL_PATH=/lustre/stor1/parfenov/Soft/jam-1.90596
- export SMASH_MODEL_PATH=/zfs/hybrilit.jinr.ru/user/p/parfenov/Soft/smash-1.8.1/build
- export URQMD_MODEL_PATH=/lustre/stor1/parfenov/Soft/urqmd-3.4
- fi
- #####################################
- echo "Job manager = ${JOB_MANAGER}"
- echo "SimDataPath = ${SimDataPath}"
- #rsync -vzruP ${SimDataPath}/templates/* ${SimDataPath}/
- if [[ $JOB_MANAGER == SGE ]]
- then
- JOBID='$JOB_ID'
- TASKID='$SGE_TASK_ID'
- fi
- if [[ $JOB_MANAGER == SLURM ]]
- then
- JOBID='$SLURM_ARRAY_JOB_ID'
- TASKID='$SLURM_ARRAY_TASK_ID'
- fi
- if [[ $JOB_MANAGER == SLURM_MEPHI ]]
- then
- JOBID='$SLURM_ARRAY_JOB_ID'
- TASKID='$SLURM_ARRAY_TASK_ID'
- fi
- if [[ $JOB_MANAGER == SLURM_GOVORUN ]]
- then
- JOBID='$SLURM_ARRAY_JOB_ID'
- TASKID='$SLURM_ARRAY_TASK_ID'
- fi
- ### DCM-QGSM-SMM
- MODEL_NAME=DCM-QGSM-SMM
- echo "Configuring ${MODEL_NAME}"
- mkdir -p ${SimDataPath}/${MODEL_NAME}/scripts
- mkdir -p ${SimDataPath}/${MODEL_NAME}/inputfile
- mkdir -p ${SimDataPath}/${MODEL_NAME}/TMP
- mkdir -p ${SimDataPath}/${MODEL_NAME}/OUT
- sed\
- -e 's!_JOB_ID_!'$JOBID'!g'\
- -e 's!_TASK_ID_!'$TASKID'!g'\
- -e 's!_SIMDATA_PATH_!'$SimDataPath'!g'\
- -e 's!_ROOT_SOURCE_PATH_!source '$ROOT_SOURCE_PATH'!g'\
- -e 's!_MCINI_PATH_!'$MCINI_PATH'!g'\
- -e 's!_DCM_MODEL_PATH_!'$DCM_MODEL_PATH'!g'\
- $SimDataPath/templates/${MODEL_NAME}/scripts/start.sh.template > $SimDataPath/${MODEL_NAME}/scripts/start.sh
- if [[ $JOB_MANAGER == SGE ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#$ -wd ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -cwd\n#$ -N run_sim_${MODEL_NAME}\n#$ -q all.q\n#$ -l h_rt=8:00:00\n#$ -l s_rt=8:00:00\n#$ -t 1-100\n#\n#$ -o ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -e ${SimDataPath}/${MODEL_NAME}/TMP\n#\nsource /cvmfs/nica.jinr.ru/sw/os/login.sh\nmodule add CMake ROOT\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p main\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_MEPHI ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p compute\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_GOVORUN ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p mephi\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\nmodule add FairRoot/v18.2.0_gcc485\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- rsync -vuzP ${SimDataPath}/templates/${MODEL_NAME}/inputfile/* ${SimDataPath}/${MODEL_NAME}/inputfile/
- chmod +x ${SimDataPath}/${MODEL_NAME}/scripts/start.sh
- ### JAM
- MODEL_NAME=JAM
- echo "Configuring ${MODEL_NAME}"
- mkdir -p ${SimDataPath}/${MODEL_NAME}/scripts
- mkdir -p ${SimDataPath}/${MODEL_NAME}/inputfile
- mkdir -p ${SimDataPath}/${MODEL_NAME}/TMP
- mkdir -p ${SimDataPath}/${MODEL_NAME}/OUT
- sed\
- -e 's!_JOB_ID_!'$JOBID'!g'\
- -e 's!_TASK_ID_!'$TASKID'!g'\
- -e 's!_SIMDATA_PATH_!'$SimDataPath'!g'\
- -e 's!_ROOT_SOURCE_PATH_!source '$ROOT_SOURCE_PATH'!g'\
- -e 's!_MCINI_PATH_!'$MCINI_PATH'!g'\
- -e 's!_JAM_MODEL_PATH_!'$JAM_MODEL_PATH'!g'\
- $SimDataPath/templates/${MODEL_NAME}/scripts/start.sh.template > $SimDataPath/${MODEL_NAME}/scripts/start.sh
- if [[ $JOB_MANAGER == SGE ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#$ -wd ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -cwd\n#$ -N run_sim_${MODEL_NAME}\n#$ -q all.q\n#$ -l h=!(ncx182.jinr.ru|ncx211.jinr.ru)\n#$ -l h_rt=8:00:00\n#$ -l s_rt=8:00:00\n#$ -t 1-100\n#\n#$ -o ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -e ${SimDataPath}/${MODEL_NAME}/TMP\n#\nsource /cvmfs/nica.jinr.ru/sw/os/login.sh\nmodule add ROOT/v6-24-06-3\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p main\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_MEPHI ]]
- then
- #sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p compute\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p compute\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_GOVORUN ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p mephi\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\nmodule add FairRoot/v18.2.0_gcc485\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- rsync -vuzP ${SimDataPath}/templates/${MODEL_NAME}/scripts/jam.cfg.template ${SimDataPath}/${MODEL_NAME}/scripts/jam.cfg.template
- chmod +x ${SimDataPath}/${MODEL_NAME}/scripts/start.sh
- ### SMASH
- MODEL_NAME=SMASH
- echo "Configuring ${MODEL_NAME}"
- #export ROOT_SOURCE_PATH=/opt/fairsoft/bmn/may18p1/bin/thisroot.sh
- #export MCINI_PATH=/scratch2/parfenov/Soft/mcini
- mkdir -p ${SimDataPath}/${MODEL_NAME}/scripts
- mkdir -p ${SimDataPath}/${MODEL_NAME}/inputfile
- mkdir -p ${SimDataPath}/${MODEL_NAME}/TMP
- mkdir -p ${SimDataPath}/${MODEL_NAME}/OUT
- sed\
- -e 's!_JOB_ID_!'$JOBID'!g'\
- -e 's!_TASK_ID_!'$TASKID'!g'\
- -e 's!_SIMDATA_PATH_!'$SimDataPath'!g'\
- -e 's!_ROOT_SOURCE_PATH_!source '$ROOT_SOURCE_PATH'!g'\
- -e 's!_MCINI_PATH_!'$MCINI_PATH'!g'\
- -e 's!_SMASH_MODEL_PATH_!'$SMASH_MODEL_PATH'!g'\
- $SimDataPath/templates/${MODEL_NAME}/scripts/start.sh.template > $SimDataPath/${MODEL_NAME}/scripts/start.sh
- if [[ $JOB_MANAGER == SGE ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#$ -wd ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -cwd\n#$ -N run_sim_${MODEL_NAME}\n#$ -q all.q\n#$ -l h_rt=8:00:00\n#$ -l s_rt=8:00:00\n#$ -t 1-100\n#\n#$ -o ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -e ${SimDataPath}/${MODEL_NAME}/TMP\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p main\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_MEPHI ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p compute\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_GOVORUN ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p mephi\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\nmodule add FairRoot/v18.2.0_gcc485\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- rsync -vuzP ${SimDataPath}/templates/${MODEL_NAME}/inputfile/config.yaml ${SimDataPath}/${MODEL_NAME}/inputfile/config.yaml
- chmod +x ${SimDataPath}/${MODEL_NAME}/scripts/start.sh
- ### UrQMD
- MODEL_NAME=UrQMD
- echo "Configuring ${MODEL_NAME}"
- mkdir -p ${SimDataPath}/${MODEL_NAME}/scripts
- mkdir -p ${SimDataPath}/${MODEL_NAME}/inputfile
- mkdir -p ${SimDataPath}/${MODEL_NAME}/TMP
- mkdir -p ${SimDataPath}/${MODEL_NAME}/OUT
- sed\
- -e 's!_JOB_ID_!'$JOBID'!g'\
- -e 's!_TASK_ID_!'$TASKID'!g'\
- -e 's!_SIMDATA_PATH_!'$SimDataPath'!g'\
- -e 's!_ROOT_SOURCE_PATH_!source '$ROOT_SOURCE_PATH'!g'\
- -e 's!_MCINI_PATH_!'$MCINI_PATH'!g'\
- -e 's!_URQMD_MODEL_PATH_!'$URQMD_MODEL_PATH'!g'\
- $SimDataPath/templates/${MODEL_NAME}/scripts/start.sh.template > $SimDataPath/${MODEL_NAME}/scripts/start.sh
- if [[ $JOB_MANAGER == SGE ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#$ -wd ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -cwd\n#$ -N run_sim_${MODEL_NAME}\n#$ -q all.q\n#$ -l h_rt=8:00:00\n#$ -l s_rt=8:00:00\n#$ -t 1-100\n#\n#$ -o ${SimDataPath}/${MODEL_NAME}/TMP\n#$ -e ${SimDataPath}/${MODEL_NAME}/TMP\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p main\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_MEPHI ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p compute\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- if [[ $JOB_MANAGER == SLURM_GOVORUN ]]
- then
- sed -i "/export JOB_ID=$JOBID/i #\n#SBATCH -D ${SimDataPath}/${MODEL_NAME}/TMP\n#SBATCH -J run_sim_${MODEL_NAME}\n#SBATCH -p mephi\n#SBATCH --time=05:00:00\n#SBATCH -a 1-100\n#\n#SBATCH -o ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.out\n#SBATCH -e ${SimDataPath}/${MODEL_NAME}/TMP/slurm_%A_%a.err\n#\nmodule add FairRoot/v18.2.0_gcc485\n" $SimDataPath/${MODEL_NAME}/scripts/start.sh
- fi
- rsync -vuzP ${SimDataPath}/templates/${MODEL_NAME}/scripts/inputfile.template ${SimDataPath}/${MODEL_NAME}/scripts/inputfile.template
- chmod +x ${SimDataPath}/${MODEL_NAME}/scripts/start.sh
|