Geant4 Cross Reference |
1 #!/usr/bin/env bash 2 # 3 ############################################## 4 ##### This is an example of slur 5 ##### In this example, each node on cluster ha 6 ##### parallel proceeses running on each node 7 ##### geometry. For instance, with geometry se 8 ##### while yeast need ~4.5Gb and ~1.2GB resp 9 ##### can be set to 6 for fiborblast and endot 10 ##### number of chemical proceses on each node 11 ##### their need. 12 ############################################## 13 ##-------------------------------------------- 14 #SBATCH --job-name="dsbandrepair" 15 #SBATCH --partition=std 16 #SBATCH --exclusive 17 #SBATCH --nodes=5 18 ##SBATCH --mem=190Gb 19 ##SBATCH --nodelist=node118 20 num_ranks_pernodeP=6 ## Number of Physical pro 21 num_ranks_pernodeC=16 ## Number of chemical p 22 ## You can change above setting for your need. 23 ##-------------------------------------------- 24 ## for physical stage: 25 totalnumRankP=$(( $num_ranks_pernodeP*$SLURM_N 26 ## for chemicall stage: 27 totalnumRankC=$(( $num_ranks_pernodeC*$SLURM_N 28 ##-------------------------------------------- 29 #" Check some requried files && folders 30 physmacfile="dsbandrepair.in" #change it if y 31 chemmacfile="chem.in" #change it if you use ot 32 flag="all" 33 ##Read input arguments 34 for i in "$@" 35 do 36 if [ $i = "-f" ] ;then shift;unset flag;fl 37 if [ $i = "-mP" ] ; then shift;unset physm 38 if [ $i = "-mC" ] ; then shift;unset chemm 39 done 40 ##-------------------------------------------- 41 42 43 logfolder="logs" 44 inputfolder="chem_input" 45 if [ ! -d $logfolder ]; then 46 # folder to contain logfiles 47 mkdir "$logfolder" 48 mkdir "$logfolder/phys" 49 mkdir "$logfolder/chem" 50 fi 51 ##-------------------------------------------- 52 #START_TIME=$SECONDS 53 ##-------------------------------------------- 54 ##If $flag = "phys", then run the physStage pa 55 if [ $flag = "phys" ] || [ $flag = "all" ]; th 56 echo "Start running physical stage........ 57 echo "This job will run with: " 58 echo "=====> Number of nodes: $SLURM_NNODE 59 echo "=====> Number of Ranks: $numRanks" 60 mpiexec -np $totalnumRankP -npernode $num_ 61 wait 62 echo "End running physical stage.......... 63 fi 64 ##-------------------------------------------- 65 ##If $flag = "chem", then run the chemStage pa 66 wait # make sure all above processes finish be 67 #sleep 1s 68 if [ $flag = "chem" ] || [ $flag = "all" ]; th 69 if [ -d $logfolder/chem ]; then find $logf 70 echo "Start running chemical stage........ 71 echo "with number of $totalnumRankC tasks. 72 echo "See $logfolder/* for running details 73 mpiexec -np $totalnumRankC ./dsbandrepair 74 wait 75 echo "End running chemical stage on all ta 76 fi 77 ##-------------------------------------------- 78 #echo "Elasped timed for $flag stage: $(($SECO 79 ##--------------------------------------------