source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex8.ksh @ 434

Last change on this file since 434 was 434, checked in by mmaipsl, 13 years ago

correct a typo in Message send by mail.

  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Revision Author Date
File size: 34.4 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Sebastien Denvil, Martial Mancip
5# Contact: Martial.Mancip__at__ipsl.jussieu.fr
6# $Revision::                                          $ Revision of last commit
7# $Author::                                            $ Author of last commit
8# $Date::                                              $ Date of last commit
9# IPSL (2006)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11#
12#**************************************************************
13
14#=========================================================
15# The documentation of this file can be automatically generated
16# if you use the prefix #D- for comments to be extracted.
17# Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
18#=========================================================
19
20#D-#==================================================
21#D-LibIGCM_sys for Mercure SX8-R
22#D-#==================================================
23#D-
24#D- This ksh library if a layer under some usefull
25#D-environment variables and shell commands.
26#D-All those definitions depend on host particularities.
27#D-It manages a stack mechanism and test validity of operations.
28#D-All function described bellow must be prefixed by IGCM_sys.
29
30#====================================================
31# libIGCM_sys PARAMETERS
32#====================================================
33
34# gawk specific location on SX9
35export PATH=/applications/gawk-3.0.4/bin:${PATH}
36
37#====================================================
38# set DEBUG_sys to true to output calls of function
39typeset -r DEBUG_sys=${DEBUG_sys:=true}
40
41#====================================================
42# Turn in dry run mode ? (sys_Put_Rest, sys_Put_Out, sys_Get)
43typeset -r DRYRUN=${DRYRUN:=0}
44
45# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
46# -------------------------------------------------------------------------------------
47# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
48# |          |  Cp/Exe param files |            |  Chmod  |                           |
49# |          |      Qsub           |            |         |                           |
50# -------------------------------------------------------------------------------------
51# |    0     |       yes           |    yes     |  yes    |      yes                  |
52# -------------------------------------------------------------------------------------
53# |    1     |       yes           |    yes     |  yes    |      no                   |
54# -------------------------------------------------------------------------------------
55# |    2     |       yes           |    yes     |  no     |      no                   |
56# -------------------------------------------------------------------------------------
57# |    3     |       yes           |    no      |  no     |      no                   |
58# -------------------------------------------------------------------------------------
59
60#=====================================================
61# Global Variables :
62#=====================================================
63# Language : "fr" or "en"
64typeset -r MYLANG="fr"
65
66#=====================================================
67# Host and user names
68# $hostname ou hostname
69typeset  HOST=${HOST:=$( hostname )}
70# $username ou whoami
71typeset  LOGIN=${LOGIN:=$( whoami )}
72# $hostname of the MASTER job
73typeset -r MASTER=mercure
74
75#D-
76#D-#==================================================
77#D-Program used in libIGCM
78#D-#==================================================
79
80# rsync with path
81typeset -r RSYNC=/home/cont003/p86denv/SX_RSYNC/bin/rsync
82# RSYNC_opt args to rsync
83typeset -r RSYNC_opt="-va"
84# ie storage filesystem
85typeset -r RHOST=mercure
86
87#====================================================
88# Host specific DIRECTORIES
89#====================================================
90
91#====================================================
92#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin )
93typeset -r R_EXE="${MODIPSL}/bin"
94
95#====================================================
96#- SUBMIT_DIR : submission dir
97typeset SUBMIT_DIR=${SUBMIT_DIR:=${PBS_O_WORKDIR}}
98
99#====================================================
100#- ARCHIVE
101typeset -r ARCHIVE=${DMFDIR}
102
103# ============ CESIUM START ============ #
104
105#====================================================
106#- Mirror libIGCM from mercure to cesium if needed
107#ROOTSYS=$( echo ${libIGCM} | gawk -F"/" '{print $2}' )
108#if [ ! ${ROOTSYS} = "home" ] ; then
109#    typeset -r MirrorlibIGCM=${MirrorlibIGCM:=true}
110#else
111#    typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
112#fi
113
114#====================================================
115#- libIGCM_POST
116#if ( ${MirrorlibIGCM} ) ; then
117#    PATHlibIGCM=$( echo ${libIGCM} | gawk -F"${LOGIN}/" '{print $2}' | sed -e "s&/libIGCM&&" )
118#    typeset -r libIGCM_POST=${HOME}/MIRROR/${PATHlibIGCM}/libIGCM
119#else
120#    typeset -r libIGCM_POST=${libIGCM}
121#fi
122
123# ============ CESIUM  END  ============ #
124
125#====================================================
126#- Mirror libIGCM from mercure to cesium if needed
127typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
128
129#====================================================
130#- libIGCM_POST
131typeset -r libIGCM_POST=${libIGCM}
132
133#====================================================
134#- IN
135typeset -r R_IN=${R_IN:=/dmnfs/cont003/p86ipsl/IGCM}
136typeset -r R_IN_ECMWF=${R_IN:=/dmnfs/cont003/p24data}
137
138#====================================================
139#- OUT
140typeset -r R_OUT=${ARCHIVE}/IGCM_OUT
141
142#====================================================
143#- OUT_POST
144typeset -r R_OUT_POST=${SCRATCHDIR}/IGCM_OUT
145
146#====================================================
147#- RUN_DIR_PATH : Temporary working directory (=> TMP)
148typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${LOCALTMPDIR}}
149
150#====================================================
151#- BIG_DIR : BIG_DIR to store files waiting for rebuild
152typeset -r BIG_DIR=${BIG_DIR:=${SCRATCHDIR}/REBUILD}
153
154#====================================================
155#- HOST_MPIRUN_COMMAND
156typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="mpirun"}
157
158#====================================================
159#- Max number of arguments passed to nco operator or demigration command
160UNIX_MAX_LIMIT=360
161
162#D-#==================================================
163#D-function IGCM_sys_RshArchive
164#D-* Purpose: Archive rsh command
165#D-* Examples:
166#D-
167function IGCM_sys_RshArchive {
168    IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
169    /bin/ksh <<-EOF
170${@}
171EOF
172    if [ $? -gt 0 ] ; then
173        echo "IGCM_sys_RshArchive : erreur."
174        IGCM_debug_Exit "IGCM_sys_RshArchive"
175    fi
176    IGCM_debug_PopStack "IGCM_sys_RshArchive"
177}
178
179#D-#==================================================
180#D-function IGCM_sys_RshPost
181#D-* Purpose: Post-process rsh command
182#D-* Examples:
183#D-
184function IGCM_sys_RshPost {
185    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
186    if ( $DEBUG_sys ) ; then
187        echo "IGCM_sys_RshPost :" $@
188    fi
189
190# ============ CESIUM START ============ #
191#    typeset NB_ESSAI DELAI status
192#    #nombre d'essai avant abandon
193#    NB_ESSAI=5
194#    #temps entre chaque essai
195#    DELAI=10
196#    i=0
197#    while [ $i -ne $NB_ESSAI ] ; do
198#        ssh -t mercure ssh cesium /bin/ksh ${@} 2>/dev/null
199#        status=$?
200#        if [ ${status} -ne 0 ];
201#        then
202#            sleep $DELAI
203#        else
204#            break
205#        fi
206#        let i=$i+1
207#    done
208# ============ CESIUM  END  ============ #
209
210
211    /bin/ksh ${@}
212    if [ $? -gt 0 ] ; then
213        echo "IGCM_sys_RshPost : erreur."
214        IGCM_debug_Exit "IGCM_sys_RshPost"
215    fi
216    IGCM_debug_PopStack "IGCM_sys_RshPost"
217}
218
219#D-#==================================================
220#D-function IGCM_sys_SendMail
221#D-* Purpose: Send mail when simulation is over
222#D-* Examples:
223#D-
224function IGCM_sys_SendMail {
225    IGCM_debug_PushStack "IGCM_sys_SendMail" $@
226    if ( $DEBUG_sys ) ; then
227        echo "IGCM_sys_SendMail :" $@
228    fi
229
230    ssh mercure /bin/ksh <<-EOF
231    export LOGIN=${LOGIN}
232    export config_UserChoices_JobName=${config_UserChoices_JobName}
233    export config_UserChoices_MailName=${config_UserChoices_MailName}
234    export DateBegin=${DateBegin}
235    export DateEnd=${DateEnd}
236    export R_SAVE=${R_SAVE}
237    export SUBMIT_DIR=${SUBMIT_DIR}
238
239    cat  << END_MAIL > job_end.mail
240Dear ${LOGIN},
241
242  Simulation ${config_UserChoices_JobName} is finished on supercomputer `hostname`.
243  Job started : ${DateBegin}
244  Job ended   : ${DateEnd}
245  Output files are available in ${R_SAVE}
246  Script files and Script Outputs are available in ${SUBMIT_DIR}
247END_MAIL
248
249    if [ ! -z ${config_UserChoices_MailName} ] ; then
250       mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} <  job_end.mail
251    elif [ -f ~/.forward ] ; then
252       mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail
253    fi
254
255    sleep 10
256    rm -f job_end.mail
257EOF
258
259    if [ $? -gt 0 ] ; then
260        echo "IGCM_sys_SendMail : erreur."
261        IGCM_debug_Exit "IGCM_sys_SendMail"
262    fi
263    IGCM_debug_PopStack "IGCM_sys_SendMail"
264}
265
266#D-#==================================================
267#D-function IGCM_sys_Mkdir
268#D-* Purpose: Master locale mkdir command
269#D-* Examples:
270#D-
271function IGCM_sys_Mkdir {
272    IGCM_debug_PushStack "IGCM_sys_Mkdir" $@
273    if ( $DEBUG_sys ) ; then
274        echo "IGCM_sys_Mkdir :" $@
275    fi
276    if [ ! -d ${1} ]; then
277        \mkdir -p $1
278        if [ $? -gt 0 ] ; then
279            echo "IGCM_sys_Mkdir : erreur."
280            IGCM_debug_Exit "IGCM_sys_Mkdir"
281        fi
282    fi
283    # vérification :
284    if [ ! -d ${1} ] ; then
285        echo "IGCM_sys_Mkdir : erreur."
286        IGCM_debug_Exit "IGCM_sys_Mkdir"
287    fi
288    IGCM_debug_PopStack "IGCM_sys_Mkdir"
289}
290
291#D-#==================================================
292#D-function IGCM_sys_MkdirArchive
293#D-* Purpose: Mkdir on Archive
294#D-* Examples:
295#D-
296function IGCM_sys_MkdirArchive {
297    IGCM_debug_PushStack "IGCM_sys_MkdirArchive" $@
298    if ( $DEBUG_sys ) ; then
299        echo "IGCM_sys_MkdirArchive :" $@
300    fi
301    #- creation de repertoire sur le serveur fichier
302    if [ ! -d ${1} ]; then 
303        \mkdir -p $1
304        if [ $? -gt 0 ] ; then
305            echo "IGCM_sys_MkdirArchive : erreur."
306            IGCM_debug_Exit "IGCM_sys_MkdirArchive"
307        fi
308    fi
309    IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
310}
311
312#D-#==================================================
313#D-function IGCM_sys_MkdirWork
314#D-* Purpose: Mkdir on Work
315#D-* Examples:
316#D-
317function IGCM_sys_MkdirWork {
318    IGCM_debug_PushStack "IGCM_sys_MkdirWork" $@
319    if ( $DEBUG_sys ) ; then
320        echo "IGCM_sys_MkdirWork :" $@
321    fi
322    #- creation de repertoire sur le serveur fichier
323    if [ ! -d ${1} ]; then 
324        \mkdir -p $1
325        if [ $? -gt 0 ] ; then
326            echo "IGCM_sys_MkdirWork : erreur."
327            IGCM_debug_Exit "IGCM_sys_MkdirWork"
328        fi
329    fi
330    IGCM_debug_PopStack "IGCM_sys_MkdirWork"
331}
332
333#D-#==================================================
334#D-function IGCM_sys_Cd
335#D-* Purpose: master cd command
336#D-* Examples:
337#D-
338function IGCM_sys_Cd {
339    IGCM_debug_PushStack "IGCM_sys_Cd" $@
340    if ( $DEBUG_sys ) ; then
341        echo "IGCM_sys_Cd :" $@
342    fi
343    \cd $1
344    if [ $? -gt 0 ] ; then
345        echo "IGCM_sys_Cd : erreur."
346        IGCM_debug_Exit "IGCM_sys_Cd"
347    fi
348    IGCM_debug_PopStack "IGCM_sys_Cd"
349}
350
351#D-#==================================================
352#D-function IGCM_sys_Chmod
353#D-* Purpose: Chmod
354#D-* Examples:
355#D-
356function IGCM_sys_Chmod {
357    IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@
358    if ( $DEBUG_sys ) ; then
359        echo "IGCM_sys_Chmod :" $@
360    fi
361    if [ $DRYRUN -le 1 ]; then
362        \chmod $@
363        if [ $? -gt 0 ] ; then
364            echo "IGCM_sys_Chmod : erreur."
365            IGCM_debug_Exit "IGCM_sys_Chmod"
366        fi
367    else
368        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
369    fi
370    IGCM_debug_PopStack "IGCM_sys_Chmod"
371}
372
373#D-#==================================================
374#D-function IGCM_sys_FileSize
375#D-* Purpose: Filesize
376#D-* Examples:
377#D-
378function IGCM_sys_FileSize {
379    IGCM_debug_PushStack "IGCM_sys_FileSize" $@
380
381    typeset sizeF
382    set +A sizeF -- $( ls -la ${1} )
383    if [ $? -gt 0 ] ; then
384        IGCM_debug_Exit "IGCM_sys_FileSize"
385    fi
386    eval ${2}=${sizeF[4]}
387
388    IGCM_debug_PopStack "IGCM_sys_FileSize"
389}
390
391#D-#==================================================
392#D-function IGCM_sys_TestDir
393#D-* Purpose: Test Directory that must exists
394#D-* Examples:
395#D-
396function IGCM_sys_TestDir {
397    IGCM_debug_PushStack "IGCM_sys_TestDir" $@
398    if ( $DEBUG_sys ) ; then
399        echo "IGCM_sys_TestDir :" $@
400    fi
401    typeset ExistFlag
402    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
403    IGCM_debug_PopStack "IGCM_sys_TestDir"
404
405    return ${ExistFlag}
406}
407
408#D-#==================================================
409#D-function IGCM_sys_TestDirArchive
410#D-* Purpose: Test Directory that must exists on Archive
411#D-* Examples:
412#D-
413function IGCM_sys_TestDirArchive {
414    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
415    if ( $DEBUG_sys ) ; then
416        echo "IGCM_sys_TestDirArchive :" $@
417    fi
418    typeset ExistFlag
419    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
420    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
421
422    return ${ExistFlag}
423}
424
425#D-#==================================================
426#D-function IGCM_sys_TestFileArchive
427#D-* Purpose: Test file that must NOT EXISTS on Archive
428#D-* Examples:
429#D-
430function IGCM_sys_TestFileArchive {
431    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
432    typeset ExistFlag
433    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 )
434    IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
435
436    return ${ExistFlag}
437}
438
439#D-#==================================================
440#D-function IGCM_sys_CountFileArchive
441#D-* Purpose: Count files on Archive filesystem
442#D-* Examples:
443#D-
444function IGCM_sys_CountFileArchive {
445    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
446    ls ${@} 2>/dev/null | wc -l
447    if [ $? -gt 0 ] ; then
448        echo "IGCM_sys_CountFileArchive : erreur."
449    fi
450    IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
451}
452
453#D-#==================================================
454#D-function IGCM_sys_Tree
455#D-* Purpose: Tree directories with files on ${ARCHIVE}
456#D-* Examples: IGCM_sys_Tree ${R_IN} ${R_OUT}
457#D-
458function IGCM_sys_Tree {
459    IGCM_debug_PushStack "IGCM_sys_Tree" $@
460    if ( $DEBUG_sys ) ; then
461        echo "IGCM_sys_Tree :" $@
462    fi
463
464    \ls -lR ${@}
465
466    IGCM_debug_PopStack "IGCM_sys_Tree"
467}
468
469#D-#==================================================
470#D-function IGCM_sys_Tar
471#D-* Purpose: master un-tar command
472#D-* Examples:
473#D-
474function IGCM_sys_Tar {
475    IGCM_debug_PushStack "IGCM_sys_Tar" $@
476    if ( $DEBUG_sys ) ; then
477        echo "IGCM_sys_Tar :" $@
478    fi
479    \tar xvf $1
480    if [ $? -gt 0 ] ; then
481        echo "IGCM_sys_Tar : erreur."
482        IGCM_debug_Exit "IGCM_sys_Tar"
483    fi
484    IGCM_debug_PopStack "IGCM_sys_Tar"
485}
486
487#D-#==================================================
488#D-function IGCM_sys_UnTar
489#D-* Purpose: master un-tar command
490#D-* Examples:
491#D-
492function IGCM_sys_UnTar {
493    IGCM_debug_PushStack "IGCM_sys_UnTar" $@
494    if ( $DEBUG_sys ) ; then
495        echo "IGCM_sys_UnTar :" $@
496    fi
497    \tar xvf $1
498    if [ $? -gt 0 ] ; then
499        echo "IGCM_sys_UnTar : erreur."
500        IGCM_debug_Exit "IGCM_sys_UnTar"
501    fi
502    IGCM_debug_PopStack "IGCM_sys_UnTar"
503}
504
505#D-#==================================================
506#D-function IGCM_sys_Qsub
507#D-* Purpose: Qsub new job
508#D-* Examples:
509#D-
510function IGCM_sys_Qsub {
511    IGCM_debug_PushStack "IGCM_sys_Qsub" $@
512    if ( $DEBUG_sys ) ; then
513        echo "IGCM_sys_Qsub :" $@
514    fi
515    /usr/bin/nqsII/qsub -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1
516    if [ $? -gt 0 ] ; then
517        echo "IGCM_sys_Qsub : erreur -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} $@."
518        IGCM_debug_Exit "IGCM_sys_Qsub"
519    fi
520    IGCM_debug_PopStack "IGCM_sys_Qsub"
521}
522
523#D-#==================================================
524#D-function IGCM_sys_QsubPost
525#D-* Purpose: Qsub new job on scalaire
526#D-* Examples:
527#D-
528function IGCM_sys_QsubPost {
529    IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
530    if ( $DEBUG_sys ) ; then
531        echo "IGCM_sys_QsubPost :" $@
532    fi
533    # ============ CESIUM START ============ #
534    #/usr/local/bin/ccc_msub -o ${POST_DIR}/${Script_Post_Output}.out -e ${POST_DIR}/${Script_Post_Output}.e.out -E "-v ${listVarEnv}" ${libIGCM_POST}/$1.job
535    # ============ CESIUM  END  ============ #
536    /usr/bin/nqsII/qsub -o ${POST_DIR}/${Script_Post_Output}.out ${libIGCM}/$1.job -v ${listVarEnv}
537    if [ $? -gt 0 ] ; then
538        echo "IGCM_sys_QsubPost : erreur " $@
539        IGCM_debug_Exit "IGCM_sys_QsubPost"
540    fi
541    IGCM_debug_PopStack "IGCM_sys_QsubPost"
542}
543
544#D-*************************
545#D- File transfer functions
546#D-*************************
547#D-
548
549#D-#==================================================
550#D-function IGCM_sys_Rsync_out
551#D-* Purpose: treat return val of rsync
552#D-* Examples: IGCM_sys_Rsync_out out_RET_rsync
553#D-  Error values and explanations can depend on your system version.
554function IGCM_sys_Rsync_out {
555    RET=$1
556    if [ ! $RET ] ; then
557        echo "rsync error !"
558    fi
559
560    if [ $MYLANG = "fr" ]; then
561        case $RET in
562            0)  return ;;
563            1)  echo "Erreur de rsync ; RERR_SYNTAX : "
564                echo "Erreur de syntaxe ou d'utilisation."
565                return;;
566            2)  echo "Erreur de rsync ; RERR_PROTOCOL : "
567                echo "Incompatibilité de protocole."
568                return;;
569            3)  echo "Erreur de rsync ; RERR_FILESELECT 3"
570                echo "Erreurs  lors  de  la  sélection des fichiers d'entrée sortie et"
571                echo "répertoires"
572                return;;
573            4)  echo "Erreur de rsync ; RERR_UNSUPPORTED"
574                echo "Action demandée non supportée : une tentative de manipulation de"
575                echo "fichiers  64-bits  sur une plate-forme qui ne les supporte pas a"
576                echo "été faite ; ou une option qui est supportée par le  client  mais"
577                echo "pas par le serveur a été spécifiée."
578                return;;
579            10) echo "Erreur de rsync ; RERR_SOCKETIO"
580                echo "Erreur dans le socket d'entrée sortie"
581                return;;
582            11) echo "Erreur de rsync ; RERR_FILEIO"
583                echo "Erreur d'entrée sortie fichier"
584                return;;
585            12) echo "Erreur de rsync ; RERR_STREAMIO"
586                echo "Erreur dans flux de donnée du protocole rsync"
587                return;;
588            13) echo "Erreur de rsync ; RERR_MESSAGEIO"
589                echo "Erreur avec les diagnostics du programme"
590                return;;
591            14) echo "Erreur de rsync ; RERR_IPC"
592                echo "Erreur dans le code IPC"
593                return;;
594            20) echo "Erreur de rsync ; RERR_SIGNAL"
595                echo "SIGUSR1 ou SIGINT reçu"
596                return;;
597            21) echo "Erreur de rsync ; RERR_WAITCHILD"
598                echo "Une erreur retournée par waitpid()"
599                return;;
600            22) echo "Erreur de rsync ; RERR_MALLOC"
601                echo "Erreur lors de l'allocation des tampons de mémoire de coeur"
602                return;;
603            23) echo ""
604                echo "Erreur fichier inexistant"
605                return;;
606            30) echo "Erreur de rsync ; RERR_TIMEOUT"
607                echo "Temps d'attente écoulé dans l'envoi/réception de données"
608                return;;
609            *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
610                return;;
611        esac
612    elif [ $MYLANG = "en" ] ; then
613        case $RET in
614            0)  return;;               
615            1)  echo "rsync error : Syntax or usage error "
616                return;;
617            2)  echo "rsync error : Protocol incompatibility "
618                return;;
619            3)  echo "rsync error : Errors selecting input/output files, dirs"
620                return;;
621            4)  echo "rsync error : Requested action not supported: an attempt"
622                echo "was made to manipulate 64-bit files on a platform that cannot support"
623                echo "them; or an option was specified that is supported by the client and"
624                echo "not by the server."
625                return;;
626            5)  echo "rsync error : Error starting client-server protocol"
627                return;;
628            10) echo "rsync error : Error in socket I/O "
629                return;;
630            11) echo "rsync error : Error in file I/O "
631                return;;
632            12) echo "rsync error : Error in rsync protocol data stream "
633                return;;
634            13) echo "rsync error : Errors with program diagnostics "
635                return;;
636            14) echo "rsync error : Error in IPC code "
637                return;;
638            20) echo "rsync error : Received SIGUSR1 or SIGINT "
639                return;;
640            21) echo "rsync error : Some error returned by waitpid() "
641                return;;
642            22) echo "rsync error : Error allocating core memory buffers "
643                return;;
644            23) echo "rsync error : Partial transfer due to error"
645                return;;
646            24) echo "rsync error : Partial transfer due to vanished source files"
647                return;;
648            30) echo "rsync error : Timeout in data send/receive "
649                return;;
650            *)  echo "rsync error : return code of rsync unknown :" $RET
651                return;;
652        esac
653    else
654        echo "unknown language $MYLANG."
655        return
656    fi
657}
658   
659
660#D-#==================================================
661#D-function IGCM_sys_Miror_libIGCM
662#D-* Purpose: Mirror libIGCM PATH and lib to cesium
663#D-* Examples:
664#D-
665function IGCM_sys_Mirror_libIGCM {
666    IGCM_debug_PushStack "IGCM_sys_Mirror_libIGCM"
667    if ( $DEBUG_sys ) ; then
668        echo "IGCM_sys_Mirror_libIGCM"
669    fi
670
671    typeset RET DEST
672
673    mkdir -p ${HOME}/MIRROR/${PATHlibIGCM}
674
675    echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
676    ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
677    RET=$?
678
679    if [ ${RET} -gt 0 ] ; then
680        echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium."
681        cat out_rsync
682    fi
683    IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
684}
685
686#====================================================
687#- Call IGCM_sys_Mirror_libIGCM now !
688if ( $MirrorlibIGCM ) ; then
689    IGCM_sys_Mirror_libIGCM
690fi
691
692#D-#==================================================
693#D-function IGCM_sys_Cp
694#D-* Purpose: generic cp
695#D-* Examples:
696#D-
697function IGCM_sys_Cp {
698    IGCM_debug_PushStack "IGCM_sys_Cp" $@
699    if ( $DEBUG_sys ) ; then
700        echo "IGCM_sys_Cp :" $@
701    fi
702
703    typeset RET
704
705    echo cp $@ > out_rsync 2>&1
706    \cp $@ >> out_rsync 2>&1
707    RET=$?
708
709    if [ ${RET} -gt 0 ] ; then
710        echo "IGCM_sys_Cp : error."
711        cat out_rsync
712        IGCM_debug_Exit "IGCM_sys_Cp"
713     else
714         \rm out_rsync
715    fi
716    IGCM_debug_PopStack "IGCM_sys_Cp"
717}
718
719#D-#==================================================
720#D-function IGCM_sys_Rm
721#D-* Purpose: generic rm
722#D-* Examples:
723#D-
724function IGCM_sys_Rm {
725    IGCM_debug_PushStack "IGCM_sys_Rm" -- $@
726    if ( $DEBUG_sys ) ; then
727        echo "IGCM_sys_Rm :" $@
728    fi
729
730    typeset RET
731
732    echo rm $@ > out_rsync 2>&1
733    \rm $@ >> out_rsync 2>&1
734    RET=$?
735
736    if [ ${RET} -gt 0 ] ; then
737        echo "IGCM_sys_Rm : error."
738        cat out_rsync
739        IGCM_debug_Exit "IGCM_sys_Rm"
740    else
741        \rm out_rsync
742    fi
743    IGCM_debug_PopStack "IGCM_sys_Rm"
744}
745
746#D-#==================================================
747#D-function IGCM_sys_Mv
748#D-* Purpose: generic move
749#D-* Examples:
750#D-
751function IGCM_sys_Mv {
752    IGCM_debug_PushStack "IGCM_sys_Mv" $@
753    if ( $DEBUG_sys ) ; then
754        echo "IGCM_sys_Mv :" $@
755    fi
756
757    if [ $DRYRUN = 0 ]; then
758
759        typeset RET
760           
761        echo mv $@ > out_rsync 2>&1
762        \mv $@ >> out_rsync 2>&1
763        RET=$?
764   
765        if [ ${RET} -gt 0 ] ; then
766            echo "IGCM_sys_Mv : error in mv."
767            cat out_rsync
768            IGCM_debug_Exit "IGCM_sys_Mv"
769        else
770            \rm out_rsync
771        fi
772    else
773        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
774    fi
775
776    IGCM_debug_PopStack "IGCM_sys_Mv"
777}
778
779#D-#==================================================
780#D-function IGCM_sys_Put_Dir
781#D-* Purpose: Copy a complete directory on $(ARCHIVE)
782#D-* Examples:
783#D-
784function IGCM_sys_Put_Dir {
785    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@
786    if ( $DEBUG_sys ) ; then
787        echo "IGCM_sys_Put_Dir :" $@
788    fi
789    if [ $DRYRUN = 0 ]; then
790        if [ ! -d ${1} ] ; then
791            echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ."
792            IGCM_debug_PopStack "IGCM_sys_Put_Dir"
793            return
794        fi
795
796        typeset RET
797
798        # Only if we use rsync
799        #IGCM_sys_TestDirArchive $( dirname $2 )
800        #
801        #USUAL WAY
802        \cp -r $1 $2 > out_rsync 2>&1
803        RET=$?
804
805        if [ ${RET} -gt 0 ] ; then
806            echo "IGCM_sys_Put_Dir : error."
807            cat out_rsync
808            IGCM_debug_Exit "IGCM_sys_Put_Dir"
809        else
810            \rm out_rsync
811        fi
812    else
813        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
814    fi
815    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
816}
817
818#D-#==================================================
819#D-function IGCM_sys_Get_Dir
820#D-* Purpose: Copy a complete directory from $(ARCHIVE)
821#D-* Examples:
822#D-
823function IGCM_sys_Get_Dir {
824    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@
825    if ( $DEBUG_sys ) ; then
826        echo "IGCM_sys_Get_Dir :" $@
827    fi
828    if [ $DRYRUN = 0 ]; then
829        if [ ! -d ${1} ] ; then
830            echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
831            IGCM_debug_PopStack "IGCM_sys_Get_Dir"
832            return
833        fi
834
835        typeset RET
836
837        # Only if we use rsync
838        #IGCM_sys_TestDirArchive $( dirname $2 )
839        #
840        #USUAL WAY
841        \cp -r $1 $2 > out_rsync 2>&1
842        RET=$?
843
844        if [ ${RET} -gt 0 ] ; then
845            echo "IGCM_sys_Get_Dir : error."
846            cat out_rsync
847            IGCM_debug_Exit "IGCM_sys_Get_Dir"
848        else
849            \rm out_rsync
850        fi
851    else
852        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
853    fi
854    IGCM_debug_PopStack "IGCM_sys_Get_Dir"
855}
856
857#D-#==================================================
858#D-function IGCM_sys_Put_Rest
859#D-* Purpose: Put computied restarts on $(ARCHIVE).
860#D-           File and target directory must exist.
861#D-* Examples:
862#D-
863function IGCM_sys_Put_Rest {
864    IGCM_debug_PushStack "IGCM_sys_Put_Rest" $@
865    if ( $DEBUG_sys ) ; then
866        echo "IGCM_sys_Put_Rest :" $@
867    fi
868    if [ $DRYRUN = 0 ]; then
869        if [ ! -f ${1} ] ; then
870            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ."
871            IGCM_debug_Exit "IGCM_sys_Put_Rest"
872        fi
873
874        typeset RET
875        #
876        if [ X${JobType} = XRUN ] ; then
877            IGCM_sys_Chmod 444 ${1}
878        fi
879        #
880        IGCM_sys_TestDirArchive $( dirname $2 )
881        #
882        # USUAL WAY
883        putfer $1 $2 > out_rsync 2>&1
884        RET=$?
885
886#       #RSYNC WITH NETWORK SSH CALL
887#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
888#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
889
890#       #RSYNC WITH NFS USE
891#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
892#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
893
894#       RET=$?
895#       IGCM_sys_Rsync_out $RET
896
897#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
898#       (( RET=RET+$? ))
899
900        if [ ${RET} -gt 0 ] ; then
901            echo "IGCM_sys_Put_Rest : error."
902            cat out_rsync
903            IGCM_debug_Exit "IGCM_sys_Put_Rest"
904        else
905            \rm out_rsync
906        fi
907    else
908        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
909    fi
910    IGCM_debug_PopStack "IGCM_sys_Put_Rest"
911}
912
913#D-#==================================================
914#D-function IGCM_sys_Put_Out
915#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
916#D-* Examples:
917#D-
918function IGCM_sys_Put_Out {
919    IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
920    if ( $DEBUG_sys ) ; then
921        echo "IGCM_sys_Put_Out :" $@
922    fi
923    if [ $DRYRUN = 0 ]; then
924        if [ ! -f ${1} ] ; then
925            echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
926            IGCM_debug_PopStack "IGCM_sys_Put_Out"
927            return 1
928        fi
929        #
930        IGCM_sys_MkdirArchive $( dirname $2 )
931        #
932        typeset RET
933
934        #=====================================================
935        #         COMMENT OUT DOUBLE COPY ON SCRATCHDIR
936        #=====================================================
937
938        #echo ${2} | grep "${R_OUT}" > /dev/null 2>&1
939        #if [ $? -eq 0 ] ; then
940        #    typeset WORKPATH FILEPATH
941        #    WORKPATH=$( dirname $2 | sed -e "s|${R_OUT}|${R_OUT_SCR}|" )
942        #    IGCM_sys_MkdirWork ${WORKPATH}
943        #    FILEPATH=${WORKPATH}/$( basename $2 )
944        #    #
945        #    IGCM_sys_Cp ${1} ${FILEPATH}
946        #fi
947
948        if [ X${JobType} = XRUN ] ; then
949            if [ X${3} = X ] ; then
950                IGCM_sys_Chmod 444 ${1}
951            fi
952        fi
953        #
954        # USUAL WAY
955        putfer $1 $2 > out_rsync 2>&1
956        RET=$?
957
958#       #RSYNC WITH NETWORK SSH CALL
959#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
960#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
961
962#       #RSYNC WITH NFS USE
963#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
964#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
965
966#       RET=$?
967#       IGCM_sys_Rsync_out $RET
968
969#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
970#       (( RET=RET+$? ))
971
972        if [ ${RET} -gt 0 ] ; then
973            echo "IGCM_sys_Put_Out : error."
974            cat out_rsync
975            IGCM_debug_Exit "IGCM_sys_Put_Out"
976        else
977            \rm out_rsync
978        fi
979    else
980        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
981    fi
982    IGCM_debug_PopStack "IGCM_sys_Put_Out"
983    return 0
984}
985
986#D-#==================================================
987#D-function IGCM_sys_Get
988#D-* Purpose: Get a file from ${ARCHIVE}
989#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
990#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
991function IGCM_sys_Get {
992    IGCM_debug_PushStack "IGCM_sys_Get" $@
993
994    typeset DEST RET dm_liste ifile target file_work
995
996    if ( $DEBUG_sys ) ; then
997        echo "IGCM_sys_Get :" $@
998    fi
999    if [ $DRYRUN -le 2 ]; then
1000        if [ X${1} = X'/l' ] ; then
1001            # test if the first file is present in the old computation :
1002            eval set +A dm_liste \${${2}}
1003        else
1004            eval set +A dm_liste ${1}
1005        fi
1006        eval DEST=\${${#}}
1007
1008        #=====================================================
1009        #         COMMENT OUT DOUBLE COPY ON SCRATCHDIR
1010        #=====================================================
1011
1012        # Is it an R_OUT file (not R_IN) ?
1013        #echo ${dm_liste[0]} | grep "${R_OUT}" > /dev/null 2>&1
1014        #if [ $? -eq 0 ] ; then
1015        #    # Yes  ? then we try to get it in SCRATCHDIR
1016        #    set +A file_work $( echo ${dm_liste[*]} | sed -e "s|${R_OUT}|${R_OUT_SCR}|" )
1017        #    if [ -f ${file_work[0]} ] ; then
1018        #       IGCM_sys_Cp ${file_work[*]} ${DEST}
1019        #       IGCM_debug_PopStack "IGCM_sys_Get"
1020        #       return
1021        #    fi
1022        #fi
1023
1024        # test if the (first) file is present in the old computation :
1025        IGCM_sys_TestFileArchive ${dm_liste[0]}
1026        RET=$?
1027        if [ ${RET} -gt 0 ] ; then
1028            echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
1029            IGCM_debug_Exit "IGCM_sys_Get"
1030            IGCM_debug_PopStack "IGCM_sys_Get"
1031            return
1032        fi
1033
1034        dmget ${dm_liste[*]} > out_rsync 2>&1
1035        RET=$?
1036        if [ ${RET} -gt 0 ] ; then
1037            echo "IGCM_sys_Get : demigration error."
1038            cat out_rsync
1039            IGCM_debug_Exit "IGCM_sys_Get"
1040        fi
1041
1042        #USUAL WAY
1043        if [ X${1} = X'/l' ] ; then
1044            (( RET=0 ))
1045            for target in ${dm_liste[*]} ; do
1046                local_file=$( basename ${target} )
1047                \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
1048                (( RET = RET + $? ))
1049            done
1050        else
1051            \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
1052            RET=$?
1053        fi
1054
1055#       #RSYNC WITH NETWORK SSH CALL
1056#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
1057#       ${RSYNC} ${RSYNC_opt} -e ssh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
1058
1059#       #RSYNC WITH NFS USE
1060#       echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
1061#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
1062
1063#       RET=$?
1064#       IGCM_sys_Rsync_out $RET
1065
1066#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
1067#       (( RET=RET+$? ))
1068
1069        if [ ${RET} -gt 0 ] ; then
1070            echo "IGCM_sys_Get : copy error."
1071            cat out_rsync
1072            IGCM_debug_Exit "IGCM_sys_Get"
1073        else
1074            \rm out_rsync
1075        fi
1076    else
1077        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
1078    fi
1079    IGCM_debug_PopStack "IGCM_sys_Get"
1080}
1081
1082############################################################## A FINIR !!
1083
1084#D-#==================================================
1085#D-function IGCM_sys_GetDate_FichWork
1086#D-* Purpose: donne la date filesys d'un fichier sur le filesystem WORK
1087#D-* Examples:
1088#D-
1089function IGCM_sys_GetDate_FichWork {
1090    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
1091    if ( $DEBUG_sys ) ; then
1092        echo "IGCM_sys_GetDate_FichWork :" $@
1093    fi
1094    # donne la date filesys d'un fichier sur la machine work
1095    IGCM_debug_PopStack "IGCM_sys_FichWork"
1096}
1097
1098#D-#==================================================
1099#D-function IGCM_sys_GetDate_FichArchive
1100#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE
1101#D-* Examples:
1102#D-
1103function IGCM_sys_GetDate_FichArchive {
1104    IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
1105    if ( $DEBUG_sys ) ; then
1106        echo "IGCM_sys_GetDate_FichArchive :" $@
1107    fi
1108    IGCM_debug_PopStack "IGCM_sys_FichArchive"
1109}
1110
1111##############################################################
1112# REBUILD OPERATOR
1113
1114function IGCM_sys_rebuild {
1115    IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
1116    if ( $DEBUG_sys ) ; then
1117        echo "IGCM_sys_rebuild :" $@
1118    fi
1119    /home/cont003/p86ipsl/SX8/bin/rebuild -f -o $@
1120    if [ $? -gt 0 ] ; then
1121       echo "IGCM_sys_rebuild : erreur ${@}."
1122       IGCM_debug_Exit "rebuild"
1123    fi
1124
1125    IGCM_debug_PopStack "IGCM_sys_rebuild"
1126}
1127
1128############################################################
1129# Activate Running Environnment Variables
1130
1131function IGCM_sys_activ_variables {
1132    IGCM_debug_PushStack "IGCM_sys_activ_variables"
1133    if ( $DEBUG_sys ) ; then
1134        echo "IGCM_sys_activ_variables"
1135    fi
1136
1137# --------------------------------------------------------------------
1138#D- MPI specifications
1139# --------------------------------------------------------------------
1140
1141#D-- MPISUSPEND
1142    export MPISUSPEND=${MPISUSPEND:=OFF}
1143
1144#D-- MPIPROGINF #other choices : ALL_DETAIL2
1145    export MPIPROGINF=ALL
1146#D- activate ftrace (with -ftrace)
1147    export F_FTRACE=YES
1148#D- communication information (with -ftrace)
1149    export MPICOMMINF=DETAIL
1150
1151# --------------------------------------------------------------------
1152#D- Other specifications
1153# --------------------------------------------------------------------
1154
1155#D- max number of character/line in output job
1156    export F_SYSLEN=5000
1157#D- number of error that can be admitted on the NEC
1158    export F_ERRCNT=0
1159#D- global performance
1160    export F_PROGINF=DETAIL
1161
1162#D- I/O performance (FORTRAN I/O only not netCDF)
1163    export F_FILEINF=${F_FILEINF:=NO}
1164#D- netCDF I/O performance
1165    export NC_FILEINF=${NC_FILEINF:=NO}
1166
1167    IGCM_debug_PopStack "IGCM_sys_activ_variables"
1168}
1169
1170############################################################
1171# Desactivate Running Environnment Variables
1172
1173function IGCM_sys_desactiv_variables {
1174    IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
1175    if ( $DEBUG_sys ) ; then
1176        echo "IGCM_sys_desactiv_variables"
1177    fi
1178# --------------------------------------------------------------------
1179#D- MPI specifications
1180# --------------------------------------------------------------------
1181
1182#D-- MPIPROGINF
1183    export MPIPROGINF=NO
1184
1185# --------------------------------------------------------------------
1186#D- Other specifications
1187# --------------------------------------------------------------------
1188
1189#D- global performance
1190    export F_PROGINF=NO 
1191
1192    IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
1193}
1194
1195############################################################
1196# Build run file
1197
1198function IGCM_sys_build_run_file {
1199    IGCM_debug_PushStack "IGCM_sys_build_run_file" $@
1200    if ( $DEBUG_sys ) ; then
1201        echo "IGCM_sys_build_run_file " $@
1202    fi
1203    (( NUM_PROC_ATM = BATCH_NUM_PROC_TOT - 1 ))
1204    (( NUM_PROC_OASIS = BATCH_NUM_PROC_TOT - NUM_PROC_ATM ))
1205    (( NUM_PROC_OCE = BATCH_NUM_PROC_TOT - NUM_PROC_ATM ))
1206   
1207    if [ $1 = MPI2 ]; then
1208        cat <<EOF > run_file
1209-p 1 -np 1 -e ./oasis
1210EOF
1211        (( NUM_PROCESS = BATCH_NUM_PROC_TOT + 1 ))
1212        config_UserChoices_JobRunOptions='"-max_np ${NUM_PROCESS} -f"'
1213
1214    elif [ $1 = MPI1 ]; then
1215        cat <<EOF > run_file
1216-p $NUM_PROC_OASIS -e ./oasis
1217-p $NUM_PROC_ATM -e ./lmdz.x
1218-p $NUM_PROC_OCE -e ./opa.xx
1219EOF
1220 
1221    fi
1222
1223    IGCM_debug_PopStack "IGCM_sys_build_run_file"
1224 
1225}
Note: See TracBrowser for help on using the repository browser.