Changeset 3394 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Jul 8, 2024, 11:48:37 PM (5 months ago)
Author:
jbclement
Message:

PEM:
Updates and improvements related to the last modifications of the launching script.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3391 r3394  
    395395== 02/07/2024 == JBC
    396396Addition of the possiblity to launch the 1D model in the launching script + correction of small errors.
     397
     398==08/07/2024 == JBC
     399Updates and improvements related to the last modifications of the launching script.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/README

    r3351 r3394  
    66      (i)   n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total;
    77      (ii)  nPCM_ini -> the number of initial PCM runs (at least 2);
    8       (iii) nPCM -> the number of PCM runs between each PEM run (usually 2).
     8      (iii) nPCM -> the number of PCM runs between each PEM run (usually 2);
     9      (iv)  dim -> the dimension of the model (1 for 1D, any other values stand for 3D).
    910  The script can take an argument:
    1011      - If there is no argument, then the script initiates a PEM simulation from scratch.
    1112      - If the argument is 're', then the script relaunches an existing PEM simulation. It will ask for parameters to know the starting point that you want to.
     13  The script works only with the job scheduler SLURM to submit chained jobs.
    1214
    1315# liblaunchPEM.sh:
    1416  Library of bash functions used by the PEM launching script "launchPEM.sh".
    1517
    16 # jobPCM.slurm:
    17   Bash script file to run the PCM with a SLURM job. The name of the PCM executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines.
     18# PCMrun.job:
     19  Bash script file to run the PCM with a SLURM job. The name of the PCM executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines. In case of 1D, the SBATCH headers are omitted.
    1820  The path to source the arch file should be adapted to the machine.
     21  The execution line should also be adapted according to the set-up.
    1922
    20 # jobPEM.slurm:
    21   Bash script file to run the PEM with a SLURM job. The name of the PEM executable file and Reshaping executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines.
     23# PEMrun.job:
     24  Bash script file to run the PEM with a SLURM job. The name of the PEM executable file and Reshaping executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines. In case of 1D, the SBATCH headers are omitted.
    2225  The path to source the arch file should be adapted to the machine.
     26  The execution line should also be adapted according to the set-up.
     27  The PEM executable can have an optional argument to specify the SLURM job ID in order to detect the job time limit and deal with it.
    2328
    2429# run_PEM.def
  • trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh

    r3354 r3394  
    1010rm -f data_PCM_Y*
    1111rm -f info_PEM.txt
    12 find . -type f -name "jobPCM*.slurm" ! -name "jobPCM.slurm" -delete
     12find . -type f -name "PCMrun*.job" ! -name "PCMrun.job" -delete
    1313rm -f *.out
    1414rm -f kill_launchPEM.sh
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3391 r3394  
    3939    LC_NUMERIC=en_US.UTF-8
    4040
    41     if [ $dim -ne 1 ]; then # 3D model works only with SLURM for now (because of time limit)
    42         islurm
     41    if [ $dim -ne 1 ]; then # 3D model works only with SLURM for now (because of chained job submission in the script + time limit management)
     42        is_slurm
    4343    fi
    4444    if [ -v n_mars_years ] && [ ! -z "$n_mars_years" ]; then
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3389 r3394  
    234234real            :: timestep        ! Timestep [s]
    235235character(20)   :: job_id          ! Job id provided as argument passed on the command line when the program was invoked
     236logical         :: timewall        ! Flag to use the time limit stopping criterion in case of a PEM job
    236237integer(kind=8) :: cr              ! Number of clock ticks per second (count rate)
    237238integer(kind=8) :: c1, c2          ! Counts of processor clock
     
    285286call system_clock(count_rate = cr)
    286287call system_clock(c1)
     288timewall = .true.
    287289timelimit = 86400 ! 86400 seconds = 24 h by default
    288290if (command_argument_count() > 0) then
     
    317319        timelimit = minutes*60 + seconds
    318320    endif
     321else
     322    timewall = .false.
    319323endif
    320324
     
    10061010    if (i_myear >= n_myear) stopPEM = 6
    10071011    call system_clock(c2)
    1008     if (real((c2 - c1)/cr) >= timelimit - antetime) stopPEM = 7
     1012    if (timewall .and. real((c2 - c1)/cr) >= timelimit - antetime) stopPEM = 7
    10091013    if (stopPEM > 0) then
    10101014        select case (stopPEM)
Note: See TracChangeset for help on using the changeset viewer.