Changeset 3387 for trunk/LMDZ.COMMON/libf/evolution/deftank
- Timestamp:
- Jun 20, 2024, 5:27:58 PM (6 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution/deftank
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/deftank/jobPEM.slurm
r3386 r3387 37 37 read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt 38 38 cp run_PEM.def run.def 39 ./$exePEM > out_runPEM${iPEM} 2>&139 ./$exePEM $SLURM_JOB_ID > out_runPEM${iPEM} 2>&1 40 40 if [ ! -f "restartfi.nc" ] || ! (tail -n 1 out_runPEM${iPEM} | grep -iq "so far, so good!"); then # Check if it ended abnormally 41 41 echo "Error: the run PEM $iPEM crashed!" -
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3386 r3387 153 153 echo "Run PCM $iPCM: call $ii/$1..." 154 154 cp jobPCM.slurm jobPCM${iPCM}.slurm 155 sed -i "s/#SBATCH --job-name=jobPCM.*/#SBATCH --job-name=jobPCM${iPCM}/" jobPCM${iPCM}.slurm155 sed -i -E "s/(#SBATCH --job-name=[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" jobPCM${iPCM}.slurm 156 156 sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc -l)/" jobPCM${iPCM}.slurm 157 157 jobID=$(sbatch --parsable jobPCM${iPCM}.slurm) … … 170 170 echo "Run PCM $iPCM: call $i/$1..." 171 171 cp jobPCM.slurm jobPCM${iPCM}.slurm 172 sed -i "s/#SBATCH --job-name=jobPCM.*/#SBATCH --job-name=jobPCM${iPCM}/" jobPCM${iPCM}.slurm172 sed -i -E "s/(#SBATCH --job-name=[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" jobPCM${iPCM}.slurm 173 173 sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc -l)/" jobPCM${iPCM}.slurm 174 174 jobID=$(sbatch --parsable --dependency=afterok:${jobID} jobPCM${iPCM}.slurm) … … 186 186 if [ $i_myear -lt $n_myear ]; then 187 187 echo "Run PEM $iPEM" 188 sed -i "s/#SBATCH --job-name=jobPEM.*/#SBATCH --job-name=jobPEM${iPEM}/" jobPEM.slurm188 sed -i -E "s/(#SBATCH --job-name=[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" jobPEM.slurm 189 189 jobID=$(sbatch --parsable jobPEM.slurm) 190 190 # Create a file to cancel the dependent jobs of the cycle … … 207 207 if [ $i_myear -lt $n_myear ]; then 208 208 echo "Run PEM $iPEM" 209 sed -i "s/#SBATCH --job-name=jobPEM.*/#SBATCH --job-name=jobPEM${iPEM}/" jobPEM.slurm209 sed -i -E "s/(#SBATCH --job-name=[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" jobPEM.slurm 210 210 jobID=$(sbatch --parsable --dependency=afterok:${jobID} jobPEM.slurm) 211 211 echo "scancel" $jobID >> kill_launchPEM.sh
Note: See TracChangeset
for help on using the changeset viewer.