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

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