source: tags/libIGCM_v1_2/libIGCM_sys/libIGCM_sys_claude.ksh @ 487

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

SD : - correct bug with post-processing in case of asynchronous rebuild.

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