Last change
on this file since 4965 was
4958,
checked in by abarral, 6 months ago
|
(WIP) remove $GROUPE & prepare adastra env
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | # ./reb $type $ym $SIM $SIMUDIR |
---|
4 | |
---|
5 | ym=$1 |
---|
6 | SIMUDIR=$2 |
---|
7 | SIM=$(basename "$SIMUDIR"); shift 2 |
---|
8 | types="$*" |
---|
9 | PUT="mv" |
---|
10 | rebuild=/gpfswork/rech/groupe/rgroupe027/LMDZ20191008.trunkOR3013/modipsl/bin/rebuild |
---|
11 | local=$(pwd) |
---|
12 | |
---|
13 | . lmdz_env.sh |
---|
14 | |
---|
15 | echo "type $type" |
---|
16 | echo "ym $ym" |
---|
17 | echo "SIM $SIM" |
---|
18 | echo "SIMUDIR $SIMUDIR" |
---|
19 | |
---|
20 | for 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:30: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 | |
---|
34 | # on se place dans le repertoire de soumission |
---|
35 | cd $local |
---|
36 | pwd |
---|
37 | |
---|
38 | . lmdz_env.sh |
---|
39 | |
---|
40 | ulimit -s unlimited |
---|
41 | if [[ -f ${type}_0000.nc ]]; then |
---|
42 | $rebuild -o ${type}.$ym.nc ${type}_[0-9][0-9][0-9][0-9].nc |
---|
43 | else |
---|
44 | echo "${type}_0000.nc absent" |
---|
45 | fi |
---|
46 | if [[ -f $type.$ym.nc ]]; then |
---|
47 | ${PUT} $type.$ym.nc ${SIMUDIR}/$type.$ym.nc |
---|
48 | rm -f ${type}_[0-9][0-9][0-9][0-9].nc |
---|
49 | else |
---|
50 | echo "La reconstruction de $type.$ym.nc a echoué" |
---|
51 | fi |
---|
52 | eod |
---|
53 | |
---|
54 | echo "Submitting the rebuild job $job" |
---|
55 | $RUNCMD "$job" |
---|
56 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.