source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh @ 80

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