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

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