source: BOL/LMDZ_Setup_amaury/reb.sh @ 5215

Last change on this file since 5215 was 5178, checked in by abarral, 2 months ago

Fix libfabric crash on ADS
Increase rebuild job times

File size: 1.7 KB
Line 
1#!/bin/bash
2
3#    ./reb $type $ym $SIM $SIMUDIR
4
5ym=$1
6SIMUDIR=$2
7SIM=$(basename "$SIMUDIR"); shift 2
8types="$*"
9PUT="mv"
10rebuild=/gpfswork/rech/groupe/rgroupe027/LMDZ20191008.trunkOR3013/modipsl/bin/rebuild
11local=$(pwd)
12
13. lmdz_env.sh
14
15echo "type $type"
16echo "ym $ym"
17echo "SIM $SIM"
18echo "SIMUDIR $SIMUDIR"
19
20for type in $types; do
21  job=$SIM$type
22
23  cat <<eod >| "$job"
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
30#@JZ#SBATCH --time=00:59:00             # temps d execution maximum demande (HH:MM:SS)
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)
33#@SP#Spirit
34#@SP#SBATCH --job-name=Seq
35#@SP#SBATCH --nodes=1
36#@SP#SBATCH --ntasks-per-node=1
37#@SP#SBATCH --time=00:59:00
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
44#@ADS#SBATCH --time=00:59:00
45#@ADS#SBATCH --output=post${type}%j.out
46#@ADS#SBATCH --error=post${type}%j.out
47
48# on se place dans le repertoire de soumission
49cd $local
50pwd
51
52. lmdz_env.sh
53
54ulimit -s unlimited
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
66eod
67
68  echo "Submitting the rebuild job $job using <$SUBMITCMD \"$job\">"
69  $SUBMITCMD "$job"
70done
Note: See TracBrowser for help on using the repository browser.