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

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