Ignore:
Timestamp:
Jun 3, 2024, 10:24:30 AM (6 months ago)
Author:
jbclement
Message:

PEM:
Addition of a script to execute multiple scripts in subdirectories (useful to launch multiple jobs at once for ex.) + Updates for several scripts in the deftank.
JBC

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

Legend:

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

    r3351 r3354  
    341341- Updates for several scripts in the deftank.
    342342- Addition of the bash script "clean.sh" to clean a folder after a PEM simulation.
     343
     344== 03/06/2024 == JBC
     345Addition of a script to execute multiple scripts in subdirectories (useful to launch multiple jobs at once for ex.) + Updates for several scripts in the deftank.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh

    r3351 r3354  
    55
    66echo "Cleaning..."
    7 rm Bands*.dat
    8 rm data2reshape*
    9 rm data_PCM_Y*
    10 rm info_PEM.txt
     7# Cleaning of files in the current folder
     8rm -f Bands*.dat
     9rm -f data2reshape*
     10rm -f data_PCM_Y*
     11rm -f info_PEM.txt
    1112find . -type f -name "jobPCM*.slurm" ! -name "jobPCM.slurm" -delete
    12 rm *.out
    13 rm kill_launchPEM.sh
    14 rm log_launchPEM.txt
    15 rm out_run*
    16 rm run.def
    17 rm start*.nc
    18 rm used_*
    19 rm Xdiurnalave.nc
    20 rm xios_client_*
    21 rm diag*.nc
    22 rm restart*.nc
    23 rm restart1D*.txt
    24 rm start1D*.txt
    25 cp starts/startfi.nc .
     13rm -f *.out
     14rm -f kill_launchPEM.sh
     15rm -f log_launchPEM.txt
     16rm -f out_run*
     17rm -f run.def
     18rm -f start*.nc
     19rm -f used_*
     20rm -f Xdiurnalave.nc
     21rm -f xios_client_*
     22rm -f diag*.nc
     23rm -f restart*.nc
     24rm -f restart1D*.txt
     25rm -f start1D*.txt
     26# Reset the initial starting files to prepare a new simulation
     27if [ -f "starts/startfi.nc" ]; then
     28    cp starts/startfi.nc .
     29fi
    2630if [ -f "starts/start.nc" ]; then
    2731    cp starts/start.nc .
     
    2933    cp starts/start1D.txt .
    3034fi
    31 rm diags/*
    32 rm starts/*
    33 rm out_PCM/*
    34 rm out_PEM/*
     35# Cleaning of files in the sub-folders
     36rm -f diags/*
     37rm -f starts/*
     38rm -f out_PCM/*
     39rm -f out_PEM/*
    3540echo "Done!"
  • trunk/LMDZ.COMMON/libf/evolution/deftank/jobPCM.slurm

    r3351 r3354  
    2525########################################################################
    2626
    27 
     27# Running the PCM
    2828echo "Run PCM $iPCM is starting."
    2929read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
    3030cp run_PCM.def run.def
    3131srun --cpu-bind=threads --label -c${OMP_NUM_THREADS:=1} $exePCM > out_runPCM${iPCM} 2>&1
    32 
    3332if [ ! -f "restartfi.nc" ] || [ ! tail -n 1 out_runPCM${iPCM} | grep -iq "everything is cool!" ]; then # Check if it ended abnormally
    3433    echo "Error: the run PCM $iPCM crashed!"
     
    3635    exit 1
    3736fi
     37
    3838# Copy data files and prepare the next run
    3939mv out_runPCM${iPCM} out_PCM/run${iPCM}
  • trunk/LMDZ.COMMON/libf/evolution/deftank/jobPEM.slurm

    r3351 r3354  
    2525
    2626
     27# Reshaping PCM data with XIOS
    2728echo "Reshaping PCM data with XIOS is starting."
    2829./$exeReshape
     
    3233fi
    3334
     35# Running the PEM
    3436echo "Run PEM $iPEM is starting."
    3537read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
     
    4042    exit 1
    4143fi
     44
    4245# Copy data files and prepare the next run
    4346mv out_runPEM${iPEM} out_PEM/run${iPEM}
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3349 r3354  
    138138# To submit the PCM runs
    139139submitPCM() {
    140     find . -type f -name "jobPCM*.slurm" ! -name "jobPCM.slurm" -exec rm {} +
     140    find . -type f -name "jobPCM*.slurm" ! -name "jobPCM.slurm" -delete
    141141    if [ $i_myear -lt $n_myear ]; then
    142142        echo "Run PCM $iPCM: call 1/$1..."
Note: See TracChangeset for help on using the changeset viewer.