[4615] | 1 | #!/bin/bash |
---|
[5415] | 2 | ## Headers managed by sed |
---|
| 3 | #@JZ#JeanZay |
---|
| 4 | #@JZ#SBATCH --job-name=NOM_SIMU # nom du job |
---|
| 5 | #@JZ# Nombre de processus MPI : |
---|
| 6 | #@JZ#SBATCH --ntasks=8 |
---|
| 7 | #@JZ##### number of MPI processes per node : 40(procs/node on Jean-Zay) / cpus-per-task (ex : =5 for 8 OMP) |
---|
| 8 | #@JZ####SBATCH --ntasks-per-node=5 # if specified, also add "#SBATCH --nodes= ..." with nodes=ntasks/(ntasks-per-node) |
---|
| 9 | #@JZ# nombre de threads OpenMP |
---|
| 10 | #@JZ#SBATCH --cpus-per-task=8 |
---|
| 11 | #@JZ# de Slurm "multithread" fait bien reference a l'hyperthreading. |
---|
| 12 | #@JZ#SBATCH --hint=nomultithread # 1 thread par coeur physique (pas d'hyperthreading) |
---|
| 13 | #@JZ#SBATCH --time=00:30:00 # Temps d execution maximum demande (HH:MM:SS) |
---|
| 14 | #@JZ#SBATCH --output=outNOM_SIMU%j # Nom du fichier de sortie |
---|
| 15 | #@JZ#SBATCH --error=outNOM_SIMU%j # Nom du fichier d'erreur (ici commun avec la sortie) |
---|
| 16 | #@JZ# To submit to test queue ; "time" (above) must be max 30 min |
---|
| 17 | #@JZ#TESTQ#SBATCH --qos=qos_cpu-dev |
---|
| 18 | #@SP#Spirit |
---|
| 19 | #@SP#SBATCH --job-name=NOM_SIMU |
---|
| 20 | #@SP#SBATCH --ntasks=8 |
---|
| 21 | #@SP#SBATCH --cpus-per-task=8 |
---|
| 22 | #@SP#SBATCH --time=00:30:00 |
---|
| 23 | #@SP#SBATCH --output=outNOM_SIMU%j |
---|
| 24 | #@SP#SBATCH --error=outNOM_SIMU%j |
---|
| 25 | #@ADS#Adastra |
---|
| 26 | #@ADS#SBATCH --job-name=NOM_SIMU |
---|
| 27 | #@ADS#SBATCH --ntasks=8 |
---|
| 28 | #@ADS#SBATCH --cpus-per-task=8 |
---|
| 29 | #@ADS#SBATCH --ntasks-per-node=8 |
---|
| 30 | #@ADS#SBATCH --time=00:30:00 |
---|
| 31 | #@ADS#SBATCH --output=outNOM_SIMU%j |
---|
| 32 | #@ADS#SBATCH --error=outNOM_SIMU%j |
---|
| 33 | #@ADS#SBATCH --exclusive |
---|
[4615] | 34 | |
---|
[5415] | 35 | set -eux |
---|
[4615] | 36 | |
---|
[4796] | 37 | # Number of MPI processes : |
---|
[4615] | 38 | ntasks=8 |
---|
[5415] | 39 | # number of OpenMP threads |
---|
| 40 | nthreads=8 |
---|
| 41 | export OMP_NUM_THREADS=$nthreads |
---|
| 42 | #@JZ#export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK # For Jean-Zay (replacing the next 3 lines, commented out) |
---|
[4615] | 43 | # private memory for each thread |
---|
| 44 | export OMP_STACKSIZE=800M |
---|
| 45 | |
---|
[5415] | 46 | |
---|
| 47 | #@JZ#export OMP_PLACES=cores # "binding" present in old script_SIMU, but terribly reduces performance on Spirit... |
---|
[4615] | 48 | ulimit -s unlimited |
---|
[5415] | 49 | #@SP ulimit -Ss 8192 |
---|
[4615] | 50 | |
---|
[5415] | 51 | simul=NOM_SIMU |
---|
| 52 | |
---|
[4615] | 53 | reseau_local=0 |
---|
| 54 | #veget=y |
---|
| 55 | veget=CMIP6 |
---|
[5415] | 56 | if [[ $veget = "none" ]] ; then VEGET=n ; else VEGET=y ; fi |
---|
[4615] | 57 | |
---|
| 58 | isotopes=n |
---|
| 59 | # If isotopes=y, initialisation_iso will be changed to 0 in iso.def after the 1st run period, to read isotopes in restart files |
---|
| 60 | |
---|
| 61 | # Choice of aerosols : n / clim / spla |
---|
| 62 | aerosols=clim |
---|
| 63 | stopsim=201101 |
---|
| 64 | ok_guide=y # y/n guidage ou non |
---|
| 65 | climato=1 |
---|
| 66 | |
---|
| 67 | echo '##############################################################' |
---|
| 68 | echo '# Gestion des repertoires de lancement ' |
---|
| 69 | echo '##############################################################' |
---|
| 70 | |
---|
| 71 | # Repertoires de la simulation |
---|
| 72 | SCRATCHD=$SCRATCH |
---|
| 73 | STORED=$STORE |
---|
| 74 | MAINDIR=LMDZOR96x95x79 |
---|
| 75 | SIMU_dir=$MAINDIR/$simul |
---|
| 76 | SIMUDIR=$STORED/$SIMU_dir |
---|
| 77 | |
---|
| 78 | # Repertoires de travail |
---|
[5420] | 79 | WWORKD=$SCRATCHD/$simul$$ |
---|
[5415] | 80 | if [[ -d $WWORKD ]]; then # useful when running on local computer, where jobs aren't submitted |
---|
[5421] | 81 | #rm -rf "$WWORKD" |
---|
| 82 | mv $WWORKD $WWORKD$$ |
---|
[5415] | 83 | fi |
---|
[4615] | 84 | mkdir -p $WWORKD |
---|
| 85 | cd $WWORKD |
---|
[5421] | 86 | SCRIPTDIR=$SCRATCHD |
---|
[4615] | 87 | |
---|
[5415] | 88 | cp "$STORED/$MAINDIR/lmdz_env.sh" .; . lmdz_env.sh |
---|
| 89 | cp "$STORED/$MAINDIR/slurm_set_cpu_binding.sh" . |
---|
| 90 | |
---|
[4615] | 91 | ERADIR=$STORED/$MAINDIR/GUIDE |
---|
| 92 | if [ "$aerosols" = "spla" ] ; then ERA10mDIR=$STORED/$MAINDIR/ERA10m ; fi |
---|
| 93 | LIMITDIR=$STORED/$MAINDIR/LIMIT |
---|
| 94 | DEFDIR=$SIMUDIR/DEF |
---|
| 95 | |
---|
| 96 | GET='ln -s' |
---|
| 97 | PUT='mv ' |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | echo '##################################################################' |
---|
| 101 | echo 'Gestion des mois et annees' |
---|
| 102 | echo '##################################################################' |
---|
| 103 | |
---|
| 104 | $GET $SIMUDIR/etat |
---|
| 105 | year=`tail -1 etat | awk ' { print $1 } ' | cut -c1-4` |
---|
| 106 | month=`tail -1 etat | awk ' { print $1 } ' | cut -c5-` |
---|
| 107 | echo year $year month $month |
---|
| 108 | |
---|
| 109 | if [ "$month" = "" ] ; then |
---|
| 110 | paran=1 |
---|
| 111 | ym=$year |
---|
| 112 | next=`expr $ym + 1` |
---|
| 113 | else |
---|
| 114 | paran=0 |
---|
| 115 | if [ $month = 12 ] ; then |
---|
| 116 | nextmonth=1 |
---|
| 117 | nextyear=`expr $year + 1` |
---|
| 118 | else |
---|
| 119 | nextmonth=`expr $month + 1` |
---|
| 120 | nextyear=$year |
---|
| 121 | fi |
---|
| 122 | if [ `echo $nextmonth | wc -m` = 2 ] ; then |
---|
| 123 | nextmonth=0$nextmonth |
---|
| 124 | fi |
---|
| 125 | ym=$year$month |
---|
| 126 | next=$nextyear$nextmonth |
---|
| 127 | fi |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | echo ym $ym |
---|
| 131 | echo mois ancien : $ym |
---|
| 132 | echo mois nouveau : $next |
---|
| 133 | |
---|
| 134 | echo '#################################################################' |
---|
| 135 | echo 'Modification de run.def et gcm.def pour prendre en compte la duree du' |
---|
| 136 | echo 'du mois en question.' |
---|
| 137 | echo 'le dayref est modifie pour tricher avec le calendrier (ecrit pour' |
---|
| 138 | echo 'une annee de 260 jours dans le modele).' |
---|
| 139 | echo 'On passe donc comme jour de reference le numero du jour du mois dans' |
---|
| 140 | echo 'une annee en 360 jours.' |
---|
| 141 | echo '#################################################################' |
---|
| 142 | |
---|
| 143 | # Choix du calendrier |
---|
| 144 | #AS: La condition if "$climato" = "0" suffit, car "$ok_guide" = "y" est interdit avec $climato" = "1" dans setup.sh (exit ligne 160) |
---|
| 145 | ##calend=earth_360d |
---|
| 146 | ##if [ "$ok_guide" = "y" -o "$climato" = "0" ] ; then calend=gregorian ; fi |
---|
| 147 | if [ "$climato" = "0" ] ; then calend=gregorian ; else calend=earth_360d ; fi |
---|
| 148 | bisextile=0 |
---|
[5415] | 149 | if [[ $(( year % 4 )) = 0 && $calend = gregorian ]] ; then bisextile=1 ; fi |
---|
[4615] | 150 | if [ $paran = 0 ] ; then |
---|
| 151 | if [ "$calend" = "gregorian" ] ; then |
---|
| 152 | ndays=( 31 28 31 30 31 30 31 31 30 31 30 31 ) |
---|
| 153 | if [ $bisextile = 1 ] ; then ndays[1]=29 ; fi |
---|
| 154 | else |
---|
| 155 | ndays=( 30 30 30 30 30 30 30 30 30 30 30 30 ) |
---|
| 156 | fi |
---|
| 157 | #Constants with a leading 0 are interpreted as octal numbers. |
---|
| 158 | # You can remove the leading zero by parameter expansion: hour=${hour#0} |
---|
| 159 | |
---|
| 160 | nday=${ndays[(( ${month#0} - 1 ))]} |
---|
| 161 | ndayh=$nday |
---|
| 162 | dayref=1 ; mm=1 ; while [ $mm -lt ${month#0} ] ; do |
---|
| 163 | (( dayref = $dayref + ${ndays[(( $mm - 1 ))]} )) ; (( mm = $mm + 1 )) ; done |
---|
| 164 | else |
---|
| 165 | dayref=1 |
---|
| 166 | if [ "$calend" = "gregorian" ] ; then |
---|
| 167 | if [ $bisextile = 0 ] ; then nday=365 ; else nday=366 ; fi |
---|
| 168 | else |
---|
| 169 | nday=360 ; ndayh=30 |
---|
[5422] | 170 | # nday=3 ; ndayh=1 # Pratique pour des tests rapides |
---|
[4615] | 171 | fi |
---|
| 172 | fi |
---|
| 173 | |
---|
| 174 | echo CALENDRIER $calend : longueur du mois vrai $year $month $nday dayref=$dayref |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | echo '####################################################################' |
---|
| 178 | echo '# On va chercher les fichiers necessaires a la simulation' |
---|
| 179 | echo '####################################################################' |
---|
| 180 | #Reminder : we are in $WWORKD = $SCRATCHD/$SIMU_dir = $SCRATCHD/$MAINDIR/$simul |
---|
| 181 | |
---|
| 182 | echo DEFDIR $DEFDIR |
---|
| 183 | echo SIMUDIR $SIMUDIR |
---|
| 184 | echo simul $simul |
---|
| 185 | |
---|
| 186 | if [ $reseau_local = 0 ] ; then mkdir DEF ; cd DEF ; $GET $DEFDIR/* . ; cd .. ; fi |
---|
| 187 | |
---|
| 188 | cp -f DEF/* . |
---|
| 189 | |
---|
[5438] | 190 | # Forcing some parameters in run.def and config.def |
---|
| 191 | sed -e 's/nday=.*.$/nday='$nday'/' -e 's/dayref=.*.$/dayref='${dayref}'/' \ |
---|
| 192 | -e 's/anneeref=.*.$/anneeref='$year'/' DEF/run.def >| run.def |
---|
[4615] | 193 | sed -e 's/phys_out_filetimesteps=[[:space:]]*[0-9][0-9]day/phys_out_filetimesteps= '$ndayh'day/' DEF/config.def >| config.def |
---|
| 194 | |
---|
| 195 | ${GET} $SIMUDIR/start.$ym.nc start.nc |
---|
| 196 | ${GET} $SIMUDIR/startphy.$ym.nc startphy.nc |
---|
| 197 | if [ $climato = 1 ] ; then |
---|
| 198 | ${GET} $LIMITDIR/limit.nc limit.nc |
---|
| 199 | else |
---|
| 200 | ${GET} $LIMITDIR/limit.$year.nc limit.nc |
---|
| 201 | fi |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | echo '####################################################################' |
---|
| 205 | echo '# Imports des fichiers aerosols si flag_aerosol>0 dans config.def, ' |
---|
| 206 | echo '# et si dans setup.sh on a "aerosols=clim" ou "aerosols=spla". ' |
---|
| 207 | echo '# NOTE: Si "aerosols=n" dans setup.sh, script_SIMU met flag_aerosol=0 et on tourne SANS aerosols' |
---|
| 208 | echo '####################################################################' |
---|
[5438] | 209 | |
---|
[4615] | 210 | if [ "`grep 'flag_aerosol=' config.def | head -1 | cut -d= -f2`" != 0 ] ; then |
---|
| 211 | if [ $aerosols = clim ] ; then |
---|
| 212 | # if [ $climato = 1 ] ; then suf=clim ; else suf=$year ; fi |
---|
[5438] | 213 | suf=clim # pas d'aerosols interannuels jusque là |
---|
[4615] | 214 | ${GET} $LIMITDIR/aerosols.$suf.nc aerosols$year.nc |
---|
[5438] | 215 | if [ ! -f aerosols1980.nc ] ; then |
---|
| 216 | ${GET} $LIMITDIR/aerosols.$suf.nc aerosols1980.nc |
---|
| 217 | fi |
---|
[4615] | 218 | ${GET} $LIMITDIR/aerosols.nat.nc aerosols.nat.nc |
---|
| 219 | fi |
---|
| 220 | |
---|
[5426] | 221 | if [[ $aerosols = "spla" ]]; then |
---|
[5429] | 222 | get_input_files ln_from_pub SPLA_WA/emissions |
---|
[5438] | 223 | ln -s dust$month.nc dust.nc |
---|
| 224 | for var in u10m v10m u v ; do |
---|
| 225 | ln_from_pub 3DInputData/SPLA_WA/ERA5/$year/$month $var.nc |
---|
| 226 | done |
---|
| 227 | # Le calcul d'emissions de sels marins utilise les vents ERA-10m |
---|
| 228 | # interpoles sur grille_s (lonv,latu) avec le script era2gcm_uv10m.sh |
---|
| 229 | # NB : GET=ln -s ; ERA10mDIR contient lui-meme le lien ERA10m vers le |
---|
| 230 | #le repertoire des vents interpoles $REA_uv10m (REA=ERA5, ERAI ou OPERA) |
---|
| 231 | |
---|
[4615] | 232 | fi |
---|
| 233 | fi |
---|
| 234 | |
---|
[5438] | 235 | #-------------------------------------------------------------------------- |
---|
| 236 | # Noveaux forcages a activer a l'avenir (commentes en attendant) : |
---|
| 237 | # climoz_LMDZ.nc solarforcing.nc taulwstrat.2D.nc tauswstrat.2D.nc ; do |
---|
| 238 | #-------------------------------------------------------------------------- |
---|
[4615] | 239 | |
---|
| 240 | ${GET} $SIMUDIR/gcm.e gcm.e ; chmod +x gcm.e |
---|
| 241 | |
---|
| 242 | |
---|
| 243 | if [ $VEGET = y ] ; then |
---|
[5429] | 244 | |
---|
[4615] | 245 | set +e ; for t in stomate sechiba ; do cp $SIMUDIR/start_$t.$ym.nc ${t}_rest_in.nc ; done ; set -e |
---|
[5438] | 246 | #For Orchidee trunk (post-CMIP6), orchidee_pft.def must be copied |
---|
| 247 | # in addition to orchidee.def |
---|
[4615] | 248 | \cp -f DEF/orchidee*.def . |
---|
| 249 | |
---|
[5438] | 250 | # If no sechiba restart file, the restart files for sechiba, stomate, |
---|
| 251 | # and routing are created on line, thus requiring Orchidee input files |
---|
[4615] | 252 | if [ ! -f sechiba_rest_in.nc ] ; then |
---|
[5429] | 253 | |
---|
[5438] | 254 | get_input_files ln_from_pub Orchidee # linking orchidee input files |
---|
[5429] | 255 | |
---|
[4615] | 256 | ln -sf alb_bg_modisopt_2D_ESA_v2.nc alb_bg.nc |
---|
| 257 | echo ATTENTION : ON UTILISE LES FICHIERS DE L ANNEE 2000 |
---|
[5429] | 258 | ln -s PFTmap_15PFT.v1_2000.nc PFTmap.nc |
---|
| 259 | ln -s woodharvest_2000.nc woodharvest.nc |
---|
[4615] | 260 | sed -e 's/^SECHIBA_restart_in.*./SECHIBA_restart_in=NONE/' \ |
---|
| 261 | -e 's/^STOMATE_RESTART_FILEIN.*./STOMATE_RESTART_FILEIN=NONE/' \ |
---|
| 262 | -i orchidee.def |
---|
[5429] | 263 | fi |
---|
[4615] | 264 | |
---|
[5429] | 265 | # Input files for routing are always needed |
---|
| 266 | if [ "`grep RIVER_ROUTING orchidee.def |grep -i y`" ] ; then |
---|
| 267 | set +e |
---|
| 268 | ln_from_pub 3DInputData/Orchideee routing.nc |
---|
| 269 | ln_from_pub 3DInputData/Orchideee routing_simple.nc |
---|
| 270 | cp $SIMUDIR/start_routing.$ym.nc routing_start.nc |
---|
| 271 | set -e |
---|
[4615] | 272 | fi |
---|
| 273 | |
---|
| 274 | fi |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | echo '#################################################################' |
---|
| 278 | echo 'Repertoire contenant les fichiers de reanalyses' |
---|
| 279 | echo '#################################################################' |
---|
| 280 | |
---|
| 281 | if [ "$ok_guide" = "y" ] ; then |
---|
| 282 | \rm -f u.nc v.nc T.nc hur.nc |
---|
| 283 | if [ -f u.nc ] ; then |
---|
| 284 | echo PROBLEME D EFFACEMENT DES FICHIERS DE REANALYSES |
---|
[5415] | 285 | exit 1 |
---|
[4615] | 286 | fi |
---|
| 287 | for var in u v T hur ; do $GET $ERADIR/$year/$month/$var.nc $var.nc ; done |
---|
| 288 | echo Fin du rapatriement des fichiers de guidage |
---|
| 289 | fi |
---|
| 290 | |
---|
| 291 | echo '##################################################################' |
---|
| 292 | echo 'liste des fichiers avant le lancement de la simulation' |
---|
| 293 | echo '##################################################################' |
---|
| 294 | ls -lrt |
---|
| 295 | #diff DEF ./ |
---|
| 296 | |
---|
| 297 | echo '##################################################################' |
---|
| 298 | echo 'Lancement de la simulation' |
---|
| 299 | echo '##################################################################' |
---|
| 300 | |
---|
[5415] | 301 | #@ADS if 1; then |
---|
| 302 | time $MPICMD $ntasks ./gcm.e > listing |
---|
| 303 | #@ADS else |
---|
| 304 | #@ADS srun --cpu-bind=none --mem-bind=none -- ./slurm_set_cpu_binding.sh ./gcm.e > listing |
---|
| 305 | #@ADS fi |
---|
| 306 | |
---|
[4615] | 307 | if [ ! -f restartphy.nc ] ; then |
---|
| 308 | echo PROBLEME PAS DE FICHIER RESTARTPHY |
---|
| 309 | exit |
---|
| 310 | fi |
---|
| 311 | |
---|
| 312 | echo '##################################################################' |
---|
| 313 | echo 'sauvegarde des fichiers de sortie' |
---|
| 314 | echo '##################################################################' |
---|
| 315 | |
---|
| 316 | # listing |
---|
| 317 | ${PUT} listing ${SIMUDIR}/list$ym |
---|
[4752] | 318 | # if the listing for Orchidee is also needed, then uncomment the following line : |
---|
| 319 | #if [ $VEGET = y ] ; then ${PUT} out_orchidee_0000.0000 ${SIMUDIR}/out_orchidee$ym ; fi |
---|
[4615] | 320 | |
---|
| 321 | # restart(s) |
---|
| 322 | ${PUT} restart.nc ${SIMUDIR}/start.$next.nc |
---|
| 323 | ${PUT} restartphy.nc ${SIMUDIR}/startphy.$next.nc |
---|
| 324 | if [ $VEGET = y ] ; then for t in sechiba stomate ; do |
---|
| 325 | f=${t}_rest_out.nc ; if [ -f $f ] ; then ${PUT} $f ${SIMUDIR}/start_$t.$next.nc ; fi ; done |
---|
| 326 | f=routing_restart.nc ; if [ -f $f ] ; then ${PUT} $f ${SIMUDIR}/start_routing.$next.nc ; fi |
---|
| 327 | fi |
---|
| 328 | |
---|
| 329 | # fichiers "histoires" |
---|
| 330 | # Si on tourne avec xios (et type="one_file") au lieu de ioipsl, on n'a pas besoin de rebuild, on doit juste copier les fichiers |
---|
| 331 | liste_out="histmth histday histhf histmthCOSP Xhistins XhistLES sechiba_history sechiba_history_4dim sechiba_out_2 stomate_history stomate_ipcc_history diag_routing dynzon" |
---|
| 332 | xios_used=0 |
---|
| 333 | |
---|
| 334 | for fileout in $liste_out ; do |
---|
| 335 | if [ -f $fileout.nc ] ; then |
---|
| 336 | ${PUT} $fileout.nc ${SIMUDIR}/$fileout.$ym.nc |
---|
| 337 | xios_used=1 |
---|
| 338 | fi |
---|
| 339 | done |
---|
| 340 | |
---|
| 341 | if [ $xios_used = 0 ] ; then |
---|
| 342 | $GET $SIMUDIR/reb.sh |
---|
| 343 | chmod +x reb.sh |
---|
| 344 | ./reb.sh $ym $SIMUDIR $liste_out |
---|
| 345 | fi |
---|
| 346 | |
---|
| 347 | if [ -f guide_ins.nc ] ; then ${PUT} guide_ins.nc ${SIMUDIR}/guide_ins.$ym.nc ; fi |
---|
| 348 | |
---|
| 349 | echo '##################################################################' |
---|
| 350 | echo 'preparation et lancement de la simulation suivante' |
---|
| 351 | echo '##################################################################' |
---|
| 352 | |
---|
| 353 | # Gestion du fichier etat de controle de la simulation |
---|
| 354 | echo $ym OK >> etat |
---|
| 355 | echo $next a faire >> etat |
---|
| 356 | # ${PUT} etat $SIMUDIR/etat # Pas necessaire car etat est un lien vers $SIMUDIR/etat |
---|
| 357 | |
---|
| 358 | # set initialisation_iso to 0 for next run to read isotopes from restart files |
---|
| 359 | if [ $isotopes = y ] ; then |
---|
| 360 | sed -i 's/^initialisation_iso=.*.$/initialisation_iso=0/' $SIMUDIR/DEF/iso.def |
---|
| 361 | fi |
---|
| 362 | set +e ; \rm out* sec* sta* list* rest* gcm.e aer* ; set -e |
---|
| 363 | |
---|
| 364 | # Arret si on est arrive au bout |
---|
| 365 | if [ $next = $stopsim ] ; then |
---|
| 366 | echo 'On arrive au bout, simulation next:'$next', stopsim:'$stopsim |
---|
| 367 | # Cas particulier ou on veut chainer plusieurs simulations multi annuelles. |
---|
| 368 | # pour le tuning automatique. |
---|
| 369 | # Ici on passe de SCM_1-019 a SCM_1-029 |
---|
| 370 | if [ "${simul:0:3}" = "SCM" ] ; then |
---|
| 371 | pre="SCM_1-" |
---|
| 372 | num=`echo $simul | sed -e 's/'$pre'//'` |
---|
| 373 | # (( num = $num + 10 )) change a cause d un probleme avec 008 |
---|
| 374 | num=`echo $num | awk ' { print $1 + 10 } '` |
---|
| 375 | num=`printf "%03d\n" $num` |
---|
| 376 | simul_new=$pre$num |
---|
| 377 | cd $SCRIPTDIR |
---|
| 378 | if [ $num -le 250 ] ; then |
---|
| 379 | sed -e 's/^simul=.*.$/simul='$simul_new'/' -e 's/^\# @ job_nam.*.=.*.$/\# @ job_name = '$simul_new'/' tmp_$simul >| tmp_$simul_new |
---|
[5422] | 380 | submitcmd tmp_$simul_new |
---|
[4615] | 381 | fi |
---|
| 382 | fi |
---|
| 383 | exit |
---|
| 384 | fi |
---|
| 385 | |
---|
| 386 | echo '##################################################################' |
---|
| 387 | echo 'lancement de la simulation suivante tmp_'$simul' depuis :' |
---|
| 388 | echo '##################################################################' |
---|
| 389 | pwd |
---|
| 390 | cd $SCRIPTDIR |
---|
[5422] | 391 | submitcmd tmp_$simul |
---|
| 392 | #$SUBMITCMD tmp_$simul |
---|