source: BOL/LMDZ_Setup_amaury/reb.sh @ 5438

Last change on this file since 5438 was 5178, checked in by abarral, 3 months ago

Fix libfabric crash on ADS
Increase rebuild job times

File size: 1.7 KB
RevLine 
[4615]1#!/bin/bash
2
3#    ./reb $type $ym $SIM $SIMUDIR
4
5ym=$1
6SIMUDIR=$2
[4955]7SIM=$(basename "$SIMUDIR"); shift 2
[4615]8types="$*"
[4955]9PUT="mv"
[4615]10rebuild=/gpfswork/rech/groupe/rgroupe027/LMDZ20191008.trunkOR3013/modipsl/bin/rebuild
[4955]11local=$(pwd)
[4615]12
[4955]13. lmdz_env.sh
[4615]14
[4955]15echo "type $type"
16echo "ym $ym"
17echo "SIM $SIM"
18echo "SIMUDIR $SIMUDIR"
[4615]19
[4955]20for type in $types; do
21  job=$SIM$type
[4615]22
[5178]23  cat <<eod >| "$job"
[4955]24#!/bin/bash
25## Headers managed by sed
26#@JZ#JeanZay
27#@JZ#SBATCH --job-name=Seq              # nom du job
28#@JZ#SBATCH --nodes=1                   # nombre de noeuds
29#@JZ#SBATCH --ntasks-per-node=1         # nombre de taches MPI par noeud
[5178]30#@JZ#SBATCH --time=00:59:00             # temps d execution maximum demande (HH:MM:SS)
[4955]31#@JZ#SBATCH --output=post${type}%j.out  # nom du fichier de sortie
32#@JZ#SBATCH --error=post${type}%j.out   # nom du fichier d'erreur (ici en commun avec la sortie)
[4986]33#@SP#Spirit
34#@SP#SBATCH --job-name=Seq
35#@SP#SBATCH --nodes=1
36#@SP#SBATCH --ntasks-per-node=1
[5178]37#@SP#SBATCH --time=00:59:00
[4986]38#@SP#SBATCH --output=post${type}%j.out
39#@SP#SBATCH --error=post${type}%j.out
40#@ADS#Adastra
41#@ADS#SBATCH --job-name=Seq
42#@ADS#SBATCH --nodes=1
43#@ADS#SBATCH --ntasks-per-node=1
[5178]44#@ADS#SBATCH --time=00:59:00
[4986]45#@ADS#SBATCH --output=post${type}%j.out
46#@ADS#SBATCH --error=post${type}%j.out
[4615]47
48# on se place dans le repertoire de soumission
49cd $local
50pwd
51
52. lmdz_env.sh
53
54ulimit -s unlimited
[4955]55if [[ -f ${type}_0000.nc ]]; then
56  $rebuild -o ${type}.$ym.nc ${type}_[0-9][0-9][0-9][0-9].nc
57else
58  echo "${type}_0000.nc absent"
59fi
60if [[ -f $type.$ym.nc ]]; then
61   ${PUT} $type.$ym.nc ${SIMUDIR}/$type.$ym.nc
62   rm -f ${type}_[0-9][0-9][0-9][0-9].nc
63else
64   echo "La reconstruction de $type.$ym.nc a echoué"
65fi
[4615]66eod
67
[5006]68  echo "Submitting the rebuild job $job using <$SUBMITCMD \"$job\">"
[4986]69  $SUBMITCMD "$job"
[4615]70done
Note: See TracBrowser for help on using the repository browser.