- Timestamp:
- Jun 20, 2024, 5:27:58 PM (6 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3386 r3387 381 381 - Correction of files cleaning in the launching script. 382 382 - Improvement of the launching script to take into account the modification of parameters for a relaunch. 383 384 == 20/06/2024 == JBC 385 - Correction of the way the PEM stops before it reaches the SLURM time limit. 386 - Small correction for 1D related to r3386. 387 - Improvement of launching script. -
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 -
trunk/LMDZ.COMMON/libf/evolution/info_PEM_mod.F90
r3349 r3387 33 33 34 34 !----- Code 35 inquire(file = 'info_PEM.txt', 35 inquire(file = 'info_PEM.txt',exist = ok) 36 36 if (ok) then 37 37 write(ich1,'(i0)') i_myear -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3386 r3387 307 307 error stop 'pem: command execution not supported!' 308 308 endif 309 ! Assume 'chtimelimit' format is "D-HH:MM:SS" or "HH:MM:SS" 310 if (index(chtimelimit,'-') > 0) then 309 if (index(chtimelimit,'-') > 0) then ! 'chtimelimit' format is "D-HH:MM:SS" 311 310 read(chtimelimit, '(i1,a1,i2,a1,i2,a1,i2)') days, sep, hours, sep, minutes, sep, seconds 312 311 timelimit = days*86400 + hours*3600 + minutes*60 + seconds 313 else 314 read(chtimelimit, '(i2,a1,i2,a1,i2)') hours, sep, minutes, sep, seconds312 else if (index(chtimelimit,':') > 0 .and. len_trim(chtimelimit) > 5) then ! 'chtimelimit' format is "HH:MM:SS" 313 read(chtimelimit, '(i2,a1,i2,a1,i2)') hours, sep, minutes, sep, seconds 315 314 timelimit = hours*3600 + minutes*60 + seconds 315 else ! 'chtimelimit' format is "MM:SS" 316 read(chtimelimit,'(i2,a1,i2)') minutes, sep, seconds 317 timelimit = minutes*60 + seconds 316 318 endif 317 319 endif … … 343 345 #ifndef CPP_1D 344 346 dtphys = daysec/48. ! Dummy value (overwritten in phyetat0) 345 day_step = steps_per_sol346 347 call conf_gcm(99,.true.) 347 348 call infotrac_init … … 350 351 allocate(longitude(ngrid),latitude(ngrid),cell_area(ngrid)) 351 352 #else 353 day_step = steps_per_sol 352 354 allocate(q(1,llm,nqtot)) 353 355 allocate(longitude(1),latitude(1),cell_area(1)) … … 724 726 endif 725 727 726 do while (year_iter < year_iter_max .and. i_myear < n_myear)728 do while (year_iter < 10000) 727 729 ! II.a.1. Compute updated global pressure 728 730 write(*,*) "Recomputing the new pressure..." … … 996 998 !------------------------ 997 999 call system_clock(c2) 998 if ( timelimit - real((c2 - c1)/cr) <=antetime) stopPEM = 71000 if (real((c2 - c1)/cr) >= timelimit - antetime) stopPEM = 7 999 1001 call stopping_crit_h2o_ice(cell_area,h2oice_ini_surf,ini_h2oice_sublim,h2o_ice,stopPEM,ngrid) 1000 1002 call stopping_crit_co2(cell_area,co2ice_ini_surf,ini_co2ice_sublim,co2_ice,stopPEM,ngrid,global_avg_press_PCM,global_avg_press_new,nslope)
Note: See TracChangeset
for help on using the changeset viewer.