Changeset 3766 for trunk/LMDZ.MARS
- Timestamp:
- May 15, 2025, 6:26:24 PM (6 weeks ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3759 r3766 4838 4838 == 12/05/2025 == JBC 4839 4839 Correction of a bug at compilation with ifort due to a missing module importation related to code tidying in r3727. 4840 4841 == 14/05/2025 == JBC 4842 Cleaning and improvement of robustness for "run0" and "run_month1" scripts with file checks and clearer errors. -
trunk/LMDZ.MARS/deftank/adastra/run0
r3033 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 9 9 gcm=gcm_64x48x54_phymars_para.e 10 10 # 11 ######################################################################## ###11 ######################################################################## 12 12 set -x 13 13 14 14 echo "---------------------------------------------------------" 15 echo " starting run0"15 echo "Starting run0..." 16 16 17 17 dir=`pwd` … … 19 19 address=`whoami` 20 20 21 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 22 28 # the value of the previously computed season 23 29 # (defaults to 0 if file "num_run" does not exist) 24 30 if [[ -r num_run ]] ; then 25 echo " found file num_run"31 echo "Found file \"num_run\"" 26 32 numold=`cat num_run` 27 33 else 28 34 numold=0 29 35 fi 30 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 31 37 32 33 # Set value of current season 34 (( numnew = ${numold} + 1 )) 35 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 36 41 37 42 # Look for initialization data files (exit if none found) … … 40 45 \cp -f startfi${numold}.nc startfi.nc 41 46 else 42 if (( ${numold}== 99999 )) ; then43 echo "No run because previous run crashed ! (99999 in num_run)"44 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 45 50 else 46 echo "Where is file start"${numold}".nc??"47 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 48 53 fi 49 54 fi … … 51 56 52 57 # Run GCM 53 srun --cpu-bind=threads --label -c${OMP_NUM_THREADS:=1} $gcm > lrun${numnew} 2>&1 58 srun --cpu-bind=threads --label -c${OMP_NUM_THREADS:=1} $gcm > lrun${numnew} 2>&1 54 59 55 60 56 61 # Check if run ended normaly and copy datafiles 57 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 58 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 59 64 \mv -f restartfi.nc startfi${numnew}.nc 60 65 \mv -f restart.nc start${numnew}.nc 61 66 else 67 echo "Error: Run crashed or incomplete output!" 62 68 if [[ -r num_run ]] ; then 63 69 \mv -f num_run num_run.crash 64 70 else 65 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 66 72 # Impose a default value of 0 for num_run 67 73 echo 0 > num_run.crash 68 74 fi 69 echo 99999 > num_run75 echo 99999 > num_run 70 76 ############## To receive an Email message if the run crashes ######## 71 mail -s "crash run GCM" $address <<ENDMAIL 72 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 73 80 ENDMAIL 74 ############################################ ""75 exit81 ############################################# 82 exit 1 76 83 fi 77 84 … … 93 100 # Prepare things for upcoming runs by writing 94 101 # value of computed season in file num_run 95 echo $ {numnew}> num_run102 echo $numnew > num_run 96 103 97 104 # If we are over nummax : stop 98 105 if (( $numnew + 1 > $nummax )) ; then 99 exit106 exit 0 100 107 else 101 102 103 fi 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/adastra/run_month1
r3033 r3766 4 4 #SBATCH --constraint=GENOA 5 5 #SBATCH --nodes=1 6 #SBATCH --ntasks-per-node=24 6 #SBATCH --ntasks-per-node=24 7 7 #SBATCH --cpus-per-task=4 8 8 #SBATCH --threads-per-core=1 # --hint=nomultithread 9 9 #SBATCH --exclusive 10 10 #SBATCH --output=run_month1_%A.out 11 #SBATCH --time=01:25:00 11 #SBATCH --time=01:25:00 12 12 13 13 ## Script to run chained simulations 14 ## (uses script "run0" and reference file "run.def.ref") 15 ## Set values of "num_now" and "num_end" in the script below 16 ## to set initial month # and final month # of the simulation 14 17 15 18 # A few parameters that might need be changed depending on your setup: 16 19 # Path to the arch.env to source 17 20 source ../trunk/LMDZ.COMMON/arch.env 18 # Number of threads to use (must be the same as "#SBATCH --cpus-per-task=" above) 19 export OMP_NUM_THREADS= 421 # Number of threads to use (must be the same as "#SBATCH --cpus-per-task=" above) 22 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 20 23 export OMP_STACKSIZE=400M 24 # 25 ######################################################################## 26 set -exv 27 ls -al 28 trap 'echo -e "Error at line $LINENO!"' ERR 21 29 22 set -xv 23 ls -al 24 25 ## set starting month and ending month below: 30 # Set starting month and ending month below: 26 31 num_now=1 27 32 num_end=12 28 (( num_previous = $num_now - 1 ))33 num_previous=$(( num_now - 1 )) 29 34 30 35 echo "$num_previous" > num_run 31 36 # next month number 32 (( num_next = $num_now + 1 ))37 num_next=$(( num_now + 1 )) 33 38 # true (i.e. modulo 12) month number 34 (( true_num = $num_now % 12 ))39 true_num=$(( num_now % 12 )) 35 40 41 # Check if required files exist 36 42 \rm -f error; touch error 37 43 44 if [ ! -f run.def.ref ]; then 45 echo "Error: file \"run.def.ref\" not found in current directory!" > error 46 exit 1 47 fi 48 49 if [ ! -x run0 ]; then 50 echo "Error: file \"run0\" not found or not executable in current directory!" > error 51 exit 1 52 fi 53 54 if [ ! -f run_month$num_now ]; then 55 echo "Error: file \"run_month${num_now}\" not found in current directory!" > error 56 exit 1 57 fi 58 59 # Run model depending on current month 38 60 case $true_num in 39 1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;; #140 2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #241 3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #342 4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;; #443 5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;; #544 6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;; #645 7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;; #746 8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;; #847 9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #948 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #1049 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;; #1150 0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;; #1251 * ) echo " error";;61 1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;; #1 62 2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #2 63 3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #3 64 4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;; #4 65 5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;; #5 66 6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;; #6 67 7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;; #7 68 8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;; #8 69 9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #9 70 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #10 71 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;; #11 72 0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;; #12 73 * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;; 52 74 esac 53 75 54 # launch job for next month55 if (( $num_next <= $num_end )) ; then76 # Launch job for next month 77 if (( num_next <= num_end )) ; then 56 78 cp -f run_month$num_now tmp 57 79 sed -e "s@run_month${num_now}@run_month${num_next}@" \ 58 80 -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next 59 81 rm tmp 60 61 82 sbatch run_month$num_next 62 83 fi -
trunk/LMDZ.MARS/deftank/ciclad/run0
r2216 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 9 9 gcm=gcm_64x48x32_phymars_para.e 10 10 # 11 ######################################################################## ###12 11 ######################################################################## 12 set -x 13 13 14 14 echo "---------------------------------------------------------" 15 echo " starting run0"15 echo "Starting run0..." 16 16 17 17 dir=`pwd` … … 19 19 address=`whoami` 20 20 21 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 22 28 # the value of the previously computed season 23 29 # (defaults to 0 if file "num_run" does not exist) 24 30 if [[ -r num_run ]] ; then 25 echo " found file num_run"31 echo "Found file \"num_run\"" 26 32 numold=`cat num_run` 27 33 else 28 34 numold=0 29 35 fi 30 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 31 37 32 33 # Set value of current season 34 (( numnew = ${numold} + 1 )) 35 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 36 41 37 42 # Look for initialization data files (exit if none found) … … 40 45 \cp -f startfi${numold}.nc startfi.nc 41 46 else 42 if (( ${numold}== 99999 )) ; then43 echo "No run because previous run crashed ! (99999 in num_run)"44 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 45 50 else 46 echo "Where is file start"${numold}".nc??"47 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 48 53 fi 49 54 fi … … 56 61 # Check if run ended normaly and copy datafiles 57 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 58 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 59 64 \mv -f restartfi.nc startfi${numnew}.nc 60 65 \mv -f restart.nc start${numnew}.nc 61 66 else 67 echo "Error: Run crashed or incomplete output!" 62 68 if [[ -r num_run ]] ; then 63 69 \mv -f num_run num_run.crash 64 70 else 65 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 66 72 # Impose a default value of 0 for num_run 67 73 echo 0 > num_run.crash 68 74 fi 69 echo 99999 > num_run75 echo 99999 > num_run 70 76 ############## To receive an Email message if the run crashes ######## 71 mail -s "crash run GCM" $address <<ENDMAIL 72 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 73 80 ENDMAIL 74 ############################################ ""75 exit81 ############################################# 82 exit 1 76 83 fi 77 84 … … 93 100 # Prepare things for upcoming runs by writing 94 101 # value of computed season in file num_run 95 echo $ {numnew}> num_run102 echo $numnew > num_run 96 103 97 104 # If we are over nummax : stop 98 105 if (( $numnew + 1 > $nummax )) ; then 99 exit106 exit 0 100 107 else 101 \cp -f run0 exe_mars 102 ./exe_mars 103 fi 104 105 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/ciclad/run_month1
r2510 r3766 8 8 #PBS -l walltime=20:00:00 9 9 10 ## Script to run chained simulations on Ciclad10 ## Script to run chained simulations 11 11 ## (uses script "run0" and reference file "run.def.ref") 12 12 ## Set values of "num_now" and "num_end" in the script below … … 16 16 cd $PBS_O_WORKDIR 17 17 18 # source the environment (you might need to adapt this path to your case) 18 # A few parameters that might need be changed depending on your setup: 19 # Path to the arch.env to source 19 20 source ../trunk/LMDZ.COMMON/arch.env 21 # 22 ######################################################################## 23 set -exv 24 ls -al 25 trap 'echo -e "Error at line $LINENO!"' ERR 20 26 21 date 22 23 ## set starting month and ending month below: 27 # Set starting month and ending month below: 24 28 num_now=1 25 29 num_end=12 26 (( num_previous = $num_now - 1 ))30 num_previous=$(( num_now - 1 )) 27 31 28 32 echo "$num_previous" > num_run 29 33 # next month number 30 (( num_next = $num_now + 1 ))34 num_next=$(( num_now + 1 )) 31 35 # true (i.e. modulo 12) month number 32 (( true_num = $num_now % 12 ))36 true_num=$(( num_now % 12 )) 33 37 38 # Check if required files exist 34 39 \rm -f error; touch error 35 40 41 if [ ! -f run.def.ref ]; then 42 echo "Error: file \"run.def.ref\" not found in current directory!" > error 43 exit 1 44 fi 45 46 if [ ! -x run0 ]; then 47 echo "Error: file \"run0\" not found or not executable in current directory!" > error 48 exit 1 49 fi 50 51 if [ ! -f run_month$num_now ]; then 52 echo "Error: file \"run_month${num_now}\" not found in current directory!" > error 53 exit 1 54 fi 55 56 # Run model depending on current month 36 57 case $true_num in 37 1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;; #138 2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #239 3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #340 4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;; #441 5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;; #542 6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;; #643 7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;; #744 8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;; #845 9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #946 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #1047 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;; #1148 0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;; #1249 * ) echo " error";;58 1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;; #1 59 2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #2 60 3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #3 61 4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;; #4 62 5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;; #5 63 6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;; #6 64 7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;; #7 65 8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;; #8 66 9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #9 67 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #10 68 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;; #11 69 0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;; #12 70 * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;; 50 71 esac 51 72 52 # launch job for next month53 if (( $num_next <= $num_end )) ; then73 # Launch job for next month 74 if (( num_next <= num_end )) ; then 54 75 cp -f run_month$num_now tmp 55 76 sed -e "s@run_month${num_now}@run_month${num_next}@" \ -
trunk/LMDZ.MARS/deftank/irene/run0
r2776 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 9 9 gcm=gcm_64x48x73_phymars_para.e 10 10 # 11 ######################################################################## ###11 ######################################################################## 12 12 set -x 13 13 14 14 echo "---------------------------------------------------------" 15 echo " starting run0"15 echo "Starting run0..." 16 16 17 17 dir=`pwd` … … 19 19 address=`whoami` 20 20 21 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 22 28 # the value of the previously computed season 23 29 # (defaults to 0 if file "num_run" does not exist) 24 30 if [[ -r num_run ]] ; then 25 echo " found file num_run"31 echo "Found file \"num_run\"" 26 32 numold=`cat num_run` 27 33 else 28 34 numold=0 29 35 fi 30 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 31 37 32 33 # Set value of current season 34 (( numnew = ${numold} + 1 )) 35 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 36 41 37 42 # Look for initialization data files (exit if none found) … … 40 45 \cp -f startfi${numold}.nc startfi.nc 41 46 else 42 if (( ${numold}== 99999 )) ; then43 echo "No run because previous run crashed ! (99999 in num_run)"44 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 45 50 else 46 echo "Where is file start"${numold}".nc??"47 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 48 53 fi 49 54 fi … … 51 56 52 57 # Run GCM 53 ccc_mprun -l $gcm > lrun${numnew} 2>&1 58 ccc_mprun -l $gcm > lrun${numnew} 2>&1 54 59 55 60 56 61 # Check if run ended normaly and copy datafiles 57 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 58 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 59 64 \mv -f restartfi.nc startfi${numnew}.nc 60 65 \mv -f restart.nc start${numnew}.nc 61 66 else 67 echo "Error: Run crashed or incomplete output!" 62 68 if [[ -r num_run ]] ; then 63 69 \mv -f num_run num_run.crash 64 70 else 65 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 66 72 # Impose a default value of 0 for num_run 67 73 echo 0 > num_run.crash 68 74 fi 69 echo 99999 > num_run75 echo 99999 > num_run 70 76 ############## To receive an Email message if the run crashes ######## 71 mail -s "crash run GCM" $address <<ENDMAIL 72 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 73 80 ENDMAIL 74 ############################################ ""75 exit81 ############################################# 82 exit 1 76 83 fi 77 84 … … 93 100 # Prepare things for upcoming runs by writing 94 101 # value of computed season in file num_run 95 echo $ {numnew}> num_run102 echo $numnew > num_run 96 103 97 104 # If we are over nummax : stop 98 105 if (( $numnew + 1 > $nummax )) ; then 99 exit106 exit 0 100 107 else 101 102 103 fi 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/irene/run_month1
r2816 r3766 23 23 #MSUB -x 24 24 25 ## Script to run chained simulations 26 ## (uses script "run0" and reference file "run.def.ref") 27 ## Set values of "num_now" and "num_end" in the script below 28 ## to set initial month # and final month # of the simulation 29 25 30 # A few parameters that might need be changed depending on your setup: 26 31 # Path to the arch.env to source 27 32 source ../trunk/LMDZ.COMMON/arch.env 28 # Number of threads to use (must be the same as "#MSUB -c" above) 33 # Number of threads to use (must be the same as "#MSUB -c" above) 29 34 export OMP_NUM_THREADS=5 30 35 export OMP_STACKSIZE=400M 36 # 37 ######################################################################## 38 set -exv 39 ls -al 40 trap 'echo -e "Error at line $LINENO!"' ERR 31 41 32 set -xv 33 ls -al 34 35 ## set starting month and ending month below: 42 # Set starting month and ending month below: 36 43 num_now=1 37 44 num_end=12 38 (( num_previous = $num_now - 1 ))45 num_previous=$(( num_now - 1 )) 39 46 40 47 echo "$num_previous" > num_run 41 48 # next month number 42 (( num_next = $num_now + 1 ))49 num_next=$(( num_now + 1 )) 43 50 # true (i.e. modulo 12) month number 44 (( true_num = $num_now % 12 ))51 true_num=$(( num_now % 12 )) 45 52 53 # Check if required files exist 46 54 \rm -f error; touch error 47 55 56 if [ ! -f run.def.ref ]; then 57 echo "Error: file \"run.def.ref\" not found in current directory!" > error 58 exit 1 59 fi 60 61 if [ ! -x run0 ]; then 62 echo "Error: file \"run0\" not found or not executable in current directory!" > error 63 exit 1 64 fi 65 66 if [ ! -f run_month$num_now ]; then 67 echo "Error: file \"run_month${num_now}\" not found in current directory!" > error 68 exit 1 69 fi 70 71 # Run model depending on current month 48 72 case $true_num in 49 1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;; #150 2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #251 3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #352 4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;; #453 5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;; #554 6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;; #655 7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;; #756 8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;; #857 9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #958 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #1059 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;; #1160 0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;; #1261 * ) echo " error";;73 1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;; #1 74 2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #2 75 3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #3 76 4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;; #4 77 5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;; #5 78 6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;; #6 79 7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;; #7 80 8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;; #8 81 9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #9 82 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #10 83 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;; #11 84 0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;; #12 85 * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;; 62 86 esac 63 87 64 # launch job for next month65 if (( $num_next <= $num_end )) ; then88 # Launch job for next month 89 if (( num_next <= num_end )) ; then 66 90 cp -f run_month$num_now tmp 67 91 sed -e "s@run_month${num_now}@run_month${num_next}@" \ 68 92 -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next 69 93 rm tmp 70 71 94 ccc_msub run_month$num_next 72 95 fi -
trunk/LMDZ.MARS/deftank/occigen/run0
r2216 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 9 9 gcm=gcm_64x48x73_phymars_para.e 10 10 # 11 ######################################################################## ###11 ######################################################################## 12 12 set -x 13 13 14 14 echo "---------------------------------------------------------" 15 echo " starting run0"15 echo "Starting run0..." 16 16 17 17 dir=`pwd` … … 19 19 address=`whoami` 20 20 21 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 22 28 # the value of the previously computed season 23 29 # (defaults to 0 if file "num_run" does not exist) 24 30 if [[ -r num_run ]] ; then 25 echo " found file num_run"31 echo "Found file \"num_run\"" 26 32 numold=`cat num_run` 27 33 else 28 34 numold=0 29 35 fi 30 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 31 37 32 33 # Set value of current season 34 (( numnew = ${numold} + 1 )) 35 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 36 41 37 42 # Look for initialization data files (exit if none found) … … 40 45 \cp -f startfi${numold}.nc startfi.nc 41 46 else 42 if (( ${numold}== 99999 )) ; then43 echo "No run because previous run crashed ! (99999 in num_run)"44 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 45 50 else 46 echo "Where is file start"${numold}".nc??"47 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 48 53 fi 49 54 fi … … 56 61 # Check if run ended normaly and copy datafiles 57 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 58 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 59 64 \mv -f restartfi.nc startfi${numnew}.nc 60 65 \mv -f restart.nc start${numnew}.nc 61 66 else 67 echo "Error: Run crashed or incomplete output!" 62 68 if [[ -r num_run ]] ; then 63 69 \mv -f num_run num_run.crash 64 70 else 65 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 66 72 # Impose a default value of 0 for num_run 67 73 echo 0 > num_run.crash 68 74 fi 69 echo 99999 > num_run75 echo 99999 > num_run 70 76 ############## To receive an Email message if the run crashes ######## 71 mail -s "crash run GCM" $address <<ENDMAIL 72 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 73 80 ENDMAIL 74 ############################################ ""75 exit81 ############################################# 82 exit 1 76 83 fi 77 84 … … 93 100 # Prepare things for upcoming runs by writing 94 101 # value of computed season in file num_run 95 echo $ {numnew}> num_run102 echo $numnew > num_run 96 103 97 104 # If we are over nummax : stop 98 105 if (( $numnew + 1 > $nummax )) ; then 99 exit106 exit 0 100 107 else 101 102 103 fi 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/occigen/run_month1
r2644 r3766 1 1 #!/bin/bash 2 #SBATCH --nodes=6 #A3 #SBATCH --ntasks-per-node=4 #B4 #SBATCH --cpus-per-task=5 #C2 #SBATCH --nodes=6 #A 3 #SBATCH --ntasks-per-node=4 #B 4 #SBATCH --cpus-per-task=5 #C 5 5 #SBATCH -J clim 6 6 #SBATCH --time=13:00:00 … … 10 10 #SBATCH --exclusive 11 11 12 ## Script to run chained simulations on Occigen12 ## Script to run chained simulations 13 13 ## (uses script "run0" and reference file "run.def.ref") 14 14 ## Set values of "num_now" and "num_end" in the script below 15 15 ## to set initial month # and final month # of the simulation 16 16 17 # source the environment (you might need to adapt this path to your case) 18 source ../trunk/LMDZ.COMMON/arch/arch-X64_OCCIGEN.env 19 20 set -xv 21 ls -al 22 23 ## set starting month and ending month below: 24 num_now=1 25 num_end=12 26 (( num_previous = $num_now - 1 )) 27 28 echo "$num_previous" > num_run 29 # next month number 30 (( num_next = $num_now + 1 )) 31 # true (i.e. modulo 12) month number 32 (( true_num = $num_now % 12 )) 33 34 \rm -f error; touch error 35 36 # environment setup for OpenMP: 17 # A few parameters that might need be changed depending on your setup: 18 # Path to the arch.env to source 19 source ../trunk/LMDZ.COMMON/arch.env 20 # Environment setup for OpenMP: 37 21 export I_MPI_DOMAIN=auto 38 22 export I_MPI_PIN_RESPECT_CPUSET=0 39 23 #Make sure that OMP_NUM_THREADS = cpus-per-task * KMP_HW_SUBSET 40 24 export KMP_HW_SUBSET=1T 41 export OMP_NUM_THREADS= 5#C25 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK #C 42 26 export OMP_STACKSIZE=400M 43 27 export KMP_AFFINITY=granularity=fine,compact,1,0,verbose 28 # 29 ######################################################################## 30 set -exv 31 ls -al 32 trap 'echo -e "Error at line $LINENO!"' ERR 44 33 34 # Set starting month and ending month below: 35 num_now=1 36 num_end=12 37 num_previous=$(( num_now - 1 )) 38 39 echo "$num_previous" > num_run 40 # next month number 41 num_next=$(( num_now + 1 )) 42 # true (i.e. modulo 12) month number 43 true_num=$(( num_now % 12 )) 44 45 # Check if required files exist 46 \rm -f error; touch error 47 48 if [ ! -f run.def.ref ]; then 49 echo "Error: file \"run.def.ref\" not found in current directory!" > error 50 exit 1 51 fi 52 53 if [ ! -x run0 ]; then 54 echo "Error: file \"run0\" not found or not executable in current directory!" > error 55 exit 1 56 fi 57 58 if [ ! -f run_month$num_now ]; then 59 echo "Error: file \"run_month${num_now}\" not found in current directory!" > error 60 exit 1 61 fi 62 63 # Run model depending on current month 45 64 case $true_num in 46 1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;; #147 2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #248 3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #349 4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;; #450 5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;; #551 6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;; #652 7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;; #753 8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;; #854 9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #955 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #1056 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;; #1157 0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;; #1258 * ) echo " error";;65 1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;; #1 66 2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #2 67 3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #3 68 4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;; #4 69 5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;; #5 70 6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;; #6 71 7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;; #7 72 8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;; #8 73 9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #9 74 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #10 75 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;; #11 76 0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;; #12 77 * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;; 59 78 esac 60 79 61 # launch job for next month62 if (( $num_next <= $num_end )) ; then80 # Launch job for next month 81 if (( num_next <= num_end )) ; then 63 82 cp -f run_month$num_now tmp 64 83 sed -e "s@run_month${num_now}@run_month${num_next}@" \ 65 84 -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next 66 85 rm tmp 67 68 86 sbatch run_month$num_next 69 87 fi 70 -
trunk/LMDZ.MARS/deftank/run0
r1005 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 6 6 nummax=1 7 7 8 ########################################################################### 9 8 # Also, ensure that the gcm executable name is correct below: 9 gcm=gcm.e 10 # 11 ######################################################################## 12 set -x 10 13 11 14 echo "---------------------------------------------------------" 12 echo " starting run0"15 echo "Starting run0..." 13 16 14 17 dir=`pwd` … … 16 19 address=`whoami` 17 20 18 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 19 28 # the value of the previously computed season 20 29 # (defaults to 0 if file "num_run" does not exist) 21 30 if [[ -r num_run ]] ; then 22 echo " found file num_run"31 echo "Found file \"num_run\"" 23 32 numold=`cat num_run` 24 33 else 25 34 numold=0 26 35 fi 27 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 28 37 29 30 # Set value of current season 31 (( numnew = ${numold} + 1 )) 32 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 33 41 34 42 # Look for initialization data files (exit if none found) … … 37 45 \cp -f startfi${numold}.nc startfi.nc 38 46 else 39 if (( ${numold}== 99999 )) ; then40 echo "No run because previous run crashed ! (99999 in num_run)"41 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 42 50 else 43 echo "Where is file start"${numold}".nc??"44 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 45 53 fi 46 54 fi … … 48 56 49 57 # Run GCM 50 gcm.e> lrun${numnew}58 ./$gcm > lrun${numnew} 51 59 52 60 53 61 # Check if run ended normaly and copy datafiles 54 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 55 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 56 64 \mv -f restartfi.nc startfi${numnew}.nc 57 65 \mv -f restart.nc start${numnew}.nc 58 66 else 67 echo "Error: Run crashed or incomplete output!" 59 68 if [[ -r num_run ]] ; then 60 69 \mv -f num_run num_run.crash 61 70 else 62 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 63 72 # Impose a default value of 0 for num_run 64 73 echo 0 > num_run.crash 65 74 fi 66 echo 99999 > num_run75 echo 99999 > num_run 67 76 ############## To receive an Email message if the run crashes ######## 68 mail -s "crash run GCM" $address <<ENDMAIL 69 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 70 80 ENDMAIL 71 ############################################ ""72 exit81 ############################################# 82 exit 1 73 83 fi 74 84 … … 90 100 # Prepare things for upcoming runs by writing 91 101 # value of computed season in file num_run 92 echo $ {numnew}> num_run102 echo $numnew > num_run 93 103 94 104 # If we are over nummax : stop 95 105 if (( $numnew + 1 > $nummax )) ; then 96 exit106 exit 0 97 107 else 98 \cp -f run0 exe_mars 99 ./exe_mars 100 fi 101 102 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/spirit/run0
r2922 r3766 1 1 #!/bin/bash 2 ######################################################################## ###2 ######################################################################## 3 3 # Script to perform several chained LMD Mars GCM simulations 4 4 # SET HERE the maximum total number of simulations … … 9 9 gcm=gcm_64x48x54_phymars_para.e 10 10 # 11 ######################################################################## ###11 ######################################################################## 12 12 set -x 13 13 14 14 echo "---------------------------------------------------------" 15 echo " starting run0"15 echo "Starting run0..." 16 16 17 17 dir=`pwd` … … 19 19 address=`whoami` 20 20 21 # Look for file "num_run" which should contain 21 # Check if GCM executable exists and is executable 22 if [ ! -x $gcm ]; then 23 echo "Error: file \"$gcm\" not found or not executable in $dir!" 24 exit 1 25 fi 26 27 # Look for file "num_run" which should contain 22 28 # the value of the previously computed season 23 29 # (defaults to 0 if file "num_run" does not exist) 24 30 if [[ -r num_run ]] ; then 25 echo " found file num_run"31 echo "Found file \"num_run\"" 26 32 numold=`cat num_run` 27 33 else 28 34 numold=0 29 35 fi 30 echo "numold is set to" $ {numold}36 echo "numold is set to" $numold 31 37 32 33 # Set value of current season 34 (( numnew = ${numold} + 1 )) 35 echo "numnew is set to" ${numnew} 38 # Set value of current season 39 numnew=$((numold + 1 )) 40 echo "numnew is set to" $numnew 36 41 37 42 # Look for initialization data files (exit if none found) … … 40 45 \cp -f startfi${numold}.nc startfi.nc 41 46 else 42 if (( ${numold}== 99999 )) ; then43 echo "No run because previous run crashed ! (99999 in num_run)"44 exit47 if (( numold == 99999 )) ; then 48 echo "Error: no run because previous run crashed! (99999 in \"num_run\")" 49 exit 1 45 50 else 46 echo "Where is file start"${numold}".nc??"47 exit51 echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!" 52 exit 1 48 53 fi 49 54 fi … … 51 56 52 57 # Run GCM 53 mpirun $gcm > lrun${numnew} 2>&1 58 mpirun $gcm > lrun${numnew} 2>&1 54 59 55 60 56 61 # Check if run ended normaly and copy datafiles 57 62 if [[ ( -r restartfi.nc && -r restart.nc ) ]] ; then 58 echo "Run seems to have ended normal y"63 echo "Run seems to have ended normally." 59 64 \mv -f restartfi.nc startfi${numnew}.nc 60 65 \mv -f restart.nc start${numnew}.nc 61 66 else 67 echo "Error: Run crashed or incomplete output!" 62 68 if [[ -r num_run ]] ; then 63 69 \mv -f num_run num_run.crash 64 70 else 65 echo "No file num_run to build num_run.crash from !!"71 echo "No file num_run to build \"num_run.crash\" from!" 66 72 # Impose a default value of 0 for num_run 67 73 echo 0 > num_run.crash 68 74 fi 69 echo 99999 > num_run75 echo 99999 > num_run 70 76 ############## To receive an Email message if the run crashes ######## 71 mail -s "crash run GCM" $address <<ENDMAIL 72 The run on $machine in $dir has just crashed. 77 mail -s "Crash in GCM run" $address <<ENDMAIL 78 The GCM run on $machine in $dir has just crashed. 79 Check the output logs for more information. 73 80 ENDMAIL 74 ############################################ ""75 exit81 ############################################# 82 exit 1 76 83 fi 77 84 … … 93 100 # Prepare things for upcoming runs by writing 94 101 # value of computed season in file num_run 95 echo $ {numnew}> num_run102 echo $numnew > num_run 96 103 97 104 # If we are over nummax : stop 98 105 if (( $numnew + 1 > $nummax )) ; then 99 exit106 exit 0 100 107 else 101 102 103 fi 108 \cp -f run0 exe_mars 109 ./exe_mars 110 fi -
trunk/LMDZ.MARS/deftank/spirit/run_month1
r2923 r3766 8 8 #SBATCH --output %x.%j.out 9 9 10 ## Script to run chained simulations 11 ## (uses script "run0" and reference file "run.def.ref") 12 ## Set values of "num_now" and "num_end" in the script below 13 ## to set initial month # and final month # of the simulation 14 10 15 # A few parameters that might need be changed depending on your setup: 11 16 # Path to the arch.env to source 12 17 source ../trunk/LMDZ.COMMON/arch.env 18 # Number of threads to use (must be the same as "#SBATCH --cpus-per-task=" above) 19 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 20 export OMP_STACKSIZE=400M 21 # 22 ######################################################################## 23 set -exv 24 ls -al 25 trap 'echo -e "Error at line $LINENO!"' ERR 13 26 14 # Number of threads to use (must be the same as "#MSUB -c" above) 15 export OMP_NUM_THREADS=4 16 export OMP_STACKSIZE=400M 17 18 set -xv 19 ls -al 20 21 ## set starting month and ending month below: 27 # Set starting month and ending month below: 22 28 num_now=1 23 29 num_end=12 24 (( num_previous = $num_now - 1 ))30 num_previous=$(( num_now - 1 )) 25 31 26 32 echo "$num_previous" > num_run 27 33 # next month number 28 (( num_next = $num_now + 1 ))34 num_next=$(( num_now + 1 )) 29 35 # true (i.e. modulo 12) month number 30 (( true_num = $num_now % 12 ))36 true_num=$(( num_now % 12 )) 31 37 38 # Check if required files exist 32 39 \rm -f error; touch error 33 40 41 if [ ! -f run.def.ref ]; then 42 echo "Error: file \"run.def.ref\" not found in current directory!" > error 43 exit 1 44 fi 45 46 if [ ! -x run0 ]; then 47 echo "Error: file \"run0\" not found or not executable in current directory!" > error 48 exit 1 49 fi 50 51 if [ ! -f run_month$num_now ]; then 52 echo "Error: file \"run_month${num_now}\" not found in current directory!" > error 53 exit 1 54 fi 55 56 # Run model depending on current month 34 57 case $true_num in 35 1 ) sed s/9999/61/ run.def.ref > run.def ; run0 >> error ;; #136 2 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #237 3 ) sed s/9999/66/ run.def.ref > run.def ; run0 >> error ;; #338 4 ) sed s/9999/65/ run.def.ref > run.def ; run0 >> error ;; #439 5 ) sed s/9999/60/ run.def.ref > run.def ; run0 >> error ;; #540 6 ) sed s/9999/54/ run.def.ref > run.def ; run0 >> error ;; #641 7 ) sed s/9999/50/ run.def.ref > run.def ; run0 >> error ;; #742 8 ) sed s/9999/46/ run.def.ref > run.def ; run0 >> error ;; #843 9 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #944 10 ) sed s/9999/47/ run.def.ref > run.def ; run0 >> error ;; #1045 11 ) sed s/9999/51/ run.def.ref > run.def ; run0 >> error ;; #1146 0 ) sed s/9999/56/ run.def.ref > run.def ; run0 >> error ;; #1247 * ) echo " error";;58 1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;; #1 59 2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #2 60 3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;; #3 61 4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;; #4 62 5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;; #5 63 6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;; #6 64 7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;; #7 65 8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;; #8 66 9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #9 67 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;; #10 68 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;; #11 69 0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;; #12 70 * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;; 48 71 esac 49 72 50 # launch job for next month51 if (( $num_next <= $num_end )) ; then73 # Launch job for next month 74 if (( num_next <= num_end )) ; then 52 75 cp -f run_month$num_now tmp 53 76 sed -e "s@run_month${num_now}@run_month${num_next}@" \ 54 77 -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next 55 78 rm tmp 56 57 79 sbatch run_month$num_next 58 80 fi
Note: See TracChangeset
for help on using the changeset viewer.