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

Last change on this file since 345 was 345, checked in by mmaipsl, 14 years ago

I have forget a 'rm' command, sorry.

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