Ignore:
Timestamp:
May 31, 2024, 10:46:55 AM (6 months ago)
Author:
jbclement
Message:

PEM:
New script called "launchPEM.sh" to launch a chained simulation of PCM/PEM runs:

  • It is far more efficient since it submits a cycle of PCM/PEM dependent jobs waiting in the SLURM queue. Plus, it does not involve a endless running master script;
  • It is more robust and user-friendly since it holds lots of warning/error messages handling different situations. It can take arguments to adapt to the needs of the user. It also creates automotically a script called "kill_launchPEM.sh" to cancel all the current dependent jobs.

There are 3 other files to make it work:

  • "lib_launchPEM.sh" which is the library containing the bash functions used by the script;
  • "jobPCM.slurm" which is the SLURM job script for the PCM used as a template by the script;
  • "jobPEM.slurm" which is the SLURM job script for the PEM used as a template by the script.

More info in the "README" of the deftank.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
4 added
2 deleted
4 edited

Legend:

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

    r3347 r3349  
    327327== 27/05/2024 == LL
    328328Fixing bug in update_soilthermal properties: in case of an ice table, the dry regolith was wrongly initialized.
     329
     330== 31/05/2024 == JBC
     331New script called "launchPEM.sh" to launch a chained simulation of PCM/PEM runs:
     332  - It is far more efficient since it submits a cycle of PCM/PEM dependent jobs waiting in the SLURM queue. Plus, it does not involve a endless running master script;
     333  - It is more robust and user-friendly since it holds lots of warning/error messages handling different situations. It can take arguments to adapt to the needs of the user. It also creates automotically a script called "kill_launchPEM.sh" to cancel all the current dependent jobs.
     334There are 3 other files to make it work:
     335  - "lib_launchPEM.sh" which is the library containing the bash functions used by the script;
     336  - "jobPCM.slurm" which is the SLURM job script for the PCM used as a template by the script;
     337  - "jobPEM.slurm" which is the SLURM job script for the PEM used as a template by the script.
     338More info in the "README" of the deftank.
  • trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90

    r3339 r3349  
    3030use ice_table_mod,         only: icetable_equilibrium, icetable_dynamic
    3131use layering_mod,          only: layering_algo
     32use info_PEM_mod,          only: iPCM, iPEM, nPCM, nPCM_ini
    3233
    3334implicit none
     
    4849    stop
    4950else
    50     read(100,*) i_myear, n_myears, convert_years
     51    read(100,*) i_myear, n_myears, convert_years, iPCM, iPEM, nPCM, nPCM_ini
    5152endif
    5253close(100)
  • trunk/LMDZ.COMMON/libf/evolution/deftank/README

    r3152 r3349  
    11This folder contains all the files needed to run the Planetary Evolution Model (PEM).
    22
    3 # launch_pem.sh:
     3# launchPEM.sh:
    44  Bash script file to launch the chained simulation of PEM and PCM runs.
    55  The user has to specify:
    66      (i)   n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total;
    7       (ii)  nPCM -> the number of PCM calls between PEM runs (usually nPCM=2);
    8       (iii) exePEM -> the name of executable file for the PEM run;
    9       (iv)  exeReshape -> the name of executable file for the data reshaping task with XIOS.
     7      (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).
     9  The script can take an argument:
     10      - If there is no argument, then the script initiates a PEM simulation from scratch.
     11      - 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.
     12
     13# liblaunchPEM.sh:
     14  Library of bash functions used by the PEM launching script "launchPEM.sh".
     15
     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.
    1018  The path to source the arch file should be adapted to the machine.
    1119
    12 # exePCM.sh:
    13   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.
     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.
     22  The path to source the arch file should be adapted to the machine.
    1423
    1524# run_PEM.def
     
    2332  Bash script file to modify orbital parameters in the file "startfi.nc" (obliquity, eccentricity, Ls perihelion and possibly initial Ls). They should be consistent with Laskar's data in "obl_ecc_lsp.asc" to start a chained simulation at a specific date.
    2433
     34# modify_startfi_var.sh:
     35  Bash script file to modify the value of a variable in a file "startfi.nc".
     36
     37# inipem_orbit.sh:
     38  Bash script file to modify the orbital parameters of a file "startfi.nc" according to the date set in the file "run_PEM.def".
     39
    2540# concat_diagpem.sh:
    2641  Bash script file to concatenate along the variable 'Time' all the "diagpem.nc" files of the PEM into one NetCDF file. 'Time' is re-indexed with the numbering of Martian years simulated by the PEM run.
     42
     43# output_layering.py:
     44  Python script file to output the stratification data from the "startpem.nc" files.
    2745
    2846Note:
  • trunk/LMDZ.COMMON/libf/evolution/info_PEM_mod.F90

    r3297 r3349  
    22
    33implicit none
     4
     5integer :: iPCM, iPEM, nPCM, nPCM_ini ! Data about the chained simulation of PCM/PEM runs
    46
    57!=======================================================================
     
    2830logical       :: ok
    2931integer       :: cstat
    30 character(10) :: ich1, ich2, fch
     32character(10) :: ich1, ich2, ich3, ich4, ich5, ich6, fch
    3133
    3234!----- Code
     
    3638    write(ich2,'(i0)') n_myear
    3739    write(fch,'(f0.4)') convert_years ! 4 digits to the right of the decimal point to respect the precision of Martian year in "launch_pem.sh"
    38     call execute_command_line('sed -i "1s/.*/'//trim(ich1)//' '//trim(ich2)//' '//trim(fch)//'/" info_PEM.txt',cmdstat = cstat)
     40    write(ich3,'(i0)') iPCM
     41    write(ich4,'(i0)') iPEM + 1
     42    write(ich5,'(i0)') nPCM
     43    write(ich6,'(i0)') nPCM_ini
     44    call execute_command_line('sed -i "1s/.*/'//trim(ich1)//' '//trim(ich2)//' '//trim(fch)//' '//trim(ich3)//' '//trim(ich4)//' '//trim(ich5)//' '//trim(ich6)//'/" info_PEM.txt',cmdstat = cstat)
    3945    if (cstat > 0) then
    4046        error stop 'info_PEM: command execution failed!'
Note: See TracChangeset for help on using the changeset viewer.