source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_claude.ksh @ 67

Last change on this file since 67 was 67, checked in by sdipsl, 15 years ago

libIGCM is ready for ulam except concerning the monitoring

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