source: tags/libIGCM_v1_4/libIGCM_sys/libIGCM_sys_calculo.ksh @ 860

Last change on this file since 860 was 173, checked in by mafoipsl, 15 years ago

Add DRYRUN capability in Sys_Mv for all systems supported.

  • 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.5 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 IPSL calculo
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. /usr/local/ferret/ferret_paths_ksh
85. /home/brocksce/.atlas_env_calcul_ksh
86
87export FER_DATA="$FER_DATA /home/mc2ipsl/temp_local/grids"
88
89#====================================================
90# Host specific DIRECTORIES
91#====================================================
92
93#====================================================
94#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin )
95typeset -r R_EXE="${MODIPSL}/bin"
96
97#====================================================
98#- SCRATCHDIR (=> ${R_DONNEES})
99typeset -r SCRATCHDIR=/home/${LOGIN}/TEMP_LOCAL
100
101#====================================================
102#- SUBMIT_DIR : submission dir
103typeset SUBMIT_DIR=${SUBMIT_DIR:=${PWD}}
104
105#====================================================
106#- ARCHIVE
107typeset -r ARCHIVE=/home
108
109#====================================================
110#- libIGCM_POST
111typeset -r libIGCM_POST=${libIGCM}
112
113#====================================================
114#- IN
115typeset -r R_IN=${R_IN:=${ARCHIVE}/${LOGIN}/TEMP_LOCAL/SCRIPTS}
116
117#====================================================
118#- OUT
119typeset -r R_OUT=${ARCHIVE}/${LOGIN}/TEMP_LOCAL/SCRIPTS/IGCM_OUT
120
121#====================================================
122#- OUT_POST
123typeset -r R_OUT_POST=${SCRATCHDIR}
124
125#====================================================
126#- RUN_DIR_PATH : Temporary working directory (=> TMP)
127typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/tmp$$}
128
129#=========================================================
130#- Add "time" before mpirun command
131MPIRUN_COMMAND="time "${MPIRUN_COMMAND}
132echo ${MPIRUN_COMMAND}
133
134#====================================================
135#- Max number of arguments passed to nco operator or demigration command
136UNIX_MAX_LIMIT=360
137
138#D-#==================================================
139#D-function IGCM_sys_RshMaster
140#D-* Purpose: Master rsh command
141#D-* Examples:
142#D-
143function IGCM_sys_RshMaster {
144    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
145    ssh ${HOST} /bin/ksh  <<-EOF
146    export libIGCM=${libIGCM}
147    export DEBUG_debug=${DEBUG_debug}
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_RshPost
178#D-* Purpose: Master rsh command
179#D-* Examples:
180#D-
181(( RshPNum = 0 ))
182function IGCM_sys_RshPost {
183    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
184    if ( $DEBUG_sys ) ; then
185        echo "IGCM_sys_RshPost :" $@
186    fi
187    #ssh ${HOST} exec /bin/ksh -vx $@ > out_RshPost.${RshPNum}
188    ssh ${HOST} exec /bin/ksh $@ > out_RshPost.${RshPNum}
189    if [ $? -gt 0 ] ; then
190        echo "IGCM_sys_RshPost : erreur."
191        IGCM_debug_Exit "IGCM_sys_RshPost"
192    fi
193    (( RshPNum = RshPNum + 1 ))
194    IGCM_debug_PopStack "IGCM_sys_RshPost"
195}
196
197#D-#==================================================
198#D-function IGCM_sys_Mkdir
199#D-* Purpose: Master locale mkdir command
200#D-* Examples:
201#D-
202function IGCM_sys_Mkdir {
203    IGCM_debug_PushStack "IGCM_sys_Mkdir" $@
204    if ( $DEBUG_sys ) ; then
205        echo "IGCM_sys_Mkdir :" $@
206    fi
207    if [ ! -d ${1} ]; then
208        \mkdir -p $1
209        if [ $? -gt 0 ] ; then
210            echo "IGCM_sys_Mkdir : erreur."
211            IGCM_debug_Exit "IGCM_sys_Mkdir"
212        fi
213    fi
214    # vérification :
215    if [ ! -d ${1} ] ; then
216        echo "IGCM_sys_Mkdir : erreur."
217        IGCM_debug_Exit "IGCM_sys_Mkdir"
218    fi
219    IGCM_debug_PopStack "IGCM_sys_Mkdir"
220}
221
222#D-#==================================================
223#D-function IGCM_sys_MkdirArchive
224#D-* Purpose: Mkdir on Archive
225#D-* Examples:
226#D-
227function IGCM_sys_MkdirArchive {
228    IGCM_debug_PushStack "IGCM_sys_MkdirArchive" $@
229    if ( $DEBUG_sys ) ; then
230        echo "IGCM_sys_MkdirArchive :" $@
231    fi
232    #- creation de repertoire sur le serveur fichier
233    if [ ! -d ${1} ]; then 
234        \mkdir -p $1
235        if [ $? -gt 0 ] ; then
236            echo "IGCM_sys_MkdirArchive : erreur."
237            IGCM_debug_Exit "IGCM_sys_MkdirArchive"
238        fi
239    fi
240    # vérification ?? :
241    if [ ! -d ${1} ] ; then
242        echo "IGCM_sys_MkdirArchive : erreur."
243        IGCM_debug_Exit "IGCM_sys_MkdirArchive"
244    fi
245    IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
246}
247
248#D-#==================================================
249#D-function IGCM_sys_MkdirWork
250#D-* Purpose: Mkdir on Work
251#D-* Examples:
252#D-
253function IGCM_sys_MkdirWork {
254    IGCM_debug_PushStack "IGCM_sys_MkdirWork" $@
255    if ( $DEBUG_sys ) ; then
256        echo "IGCM_sys_MkdirWork :" $@
257    fi
258    #- creation de repertoire sur le serveur fichier
259    if [ ! -d ${1} ]; then 
260        \mkdir -p $1
261        if [ $? -gt 0 ] ; then
262            echo "IGCM_sys_MkdirWork : erreur."
263            IGCM_debug_Exit "IGCM_sys_MkdirWork"
264        fi
265    fi
266    # vérification ?? :
267    if [ ! -d ${1} ] ; then
268        echo "IGCM_sys_MkdirWork : erreur."
269        IGCM_debug_Exit "IGCM_sys_MkdirWork"
270    fi
271    IGCM_debug_PopStack "IGCM_sys_MkdirWork"
272}
273IGCM_sys_MkdirWork ${RUN_DIR_PATH}
274echo "RUN_DIR_PATH ${RUN_DIR_PATH} ok."
275
276#D-#==================================================
277#D-function IGCM_sys_Cd
278#D-* Purpose: master cd command
279#D-* Examples:
280#D-
281function IGCM_sys_Cd {
282    IGCM_debug_PushStack "IGCM_sys_Cd" $@
283    if ( $DEBUG_sys ) ; then
284        echo "IGCM_sys_Cd :" $@
285    fi
286    \cd $1
287    if [ $? -gt 0 ] ; then
288        echo "IGCM_sys_Cd : erreur."
289        IGCM_debug_Exit "IGCM_sys_Cd"
290    fi
291    IGCM_debug_PopStack "IGCM_sys_Cd"
292}
293
294#D-#==================================================
295#D-function IGCM_sys_Chmod
296#D-* Purpose: Chmod
297#D-* Examples:
298#D-
299function IGCM_sys_Chmod {
300    IGCM_debug_PushStack "IGCM_sys_Chmod" $@
301    if ( $DEBUG_sys ) ; then
302        echo "IGCM_sys_Chmod :" $@
303    fi
304    if [ $DRYRUN -le 1 ]; then
305        \chmod $@
306        if [ $? -gt 0 ] ; then
307            echo "IGCM_sys_Chmod : erreur."
308            IGCM_debug_Exit "IGCM_sys_Chmod"
309        fi
310    else
311        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
312    fi
313    IGCM_debug_PopStack "IGCM_sys_Chmod"
314}
315
316#D-#==================================================
317#D-function IGCM_sys_FileSize
318#D-* Purpose: Filesize
319#D-* Examples:
320#D-
321function IGCM_sys_FileSize {
322    IGCM_debug_PushStack "IGCM_sys_FileSize" $@
323
324    typeset sizeF
325    set +A sizeF -- $( ls -la ${1} )
326    if [ $? -gt 0 ] ; then
327        IGCM_debug_Exit "IGCM_sys_FileSize"
328    fi
329    eval ${2}=${sizeF[4]}
330
331    IGCM_debug_PopStack "IGCM_sys_FileSize"
332}
333
334#D-#==================================================
335#D-function IGCM_sys_TestDir
336#D-* Purpose: Test Directory that must exists
337#D-* Examples:
338#D-
339function IGCM_sys_TestDir {
340    IGCM_debug_PushStack "IGCM_sys_TestDir" $@
341    if ( $DEBUG_sys ) ; then
342        echo "IGCM_sys_TestDir :" $@
343    fi
344    typeset ExistFlag
345    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
346    IGCM_debug_PopStack "IGCM_sys_TestDir"
347
348    return ${ExistFlag}
349}
350
351#D-#==================================================
352#D-function IGCM_sys_TestDirArchive
353#D-* Purpose: Test Directory that must exists on Archive
354#D-* Examples:
355#D-
356function IGCM_sys_TestDirArchive {
357    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
358    if ( $DEBUG_sys ) ; then
359        echo "IGCM_sys_TestDirArchive :" $@
360    fi
361    typeset ExistFlag
362    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
363    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
364
365    return ${ExistFlag}
366}
367
368#D-#==================================================
369#D-function IGCM_sys_TestFileArchive
370#D-* Purpose: Test file that must NOT EXISTS on Archive
371#D-* Examples:
372#D-
373function IGCM_sys_TestFileArchive {
374    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
375    if ( $DEBUG_sys ) ; then
376        echo "IGCM_sys_TestFileArchive :" $@
377    fi
378    typeset ExistFlag
379    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 )
380    IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
381
382    return ${ExistFlag}
383}
384
385#D-#==================================================
386#D-function IGCM_sys_CountFileArchive
387#D-* Purpose: Count files on Archive filesystem
388#D-* Examples:
389#D-
390function IGCM_sys_CountFileArchive {
391    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
392    ls ${@} 2>/dev/null | wc -l
393    if [ $? -gt 0 ] ; then
394        echo "IGCM_sys_CountFileArchive : erreur."
395    fi
396    IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
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    /home/mmaipsl/BIN/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    if [ $DRYRUN = 0 ]; then
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    else
683        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
684    fi
685
686    IGCM_debug_PopStack "IGCM_sys_Mv"
687}
688
689#D-#==================================================
690#D-function IGCM_sys_Put_Dir
691#D-* Purpose: Copy a complete directory on $(ARCHIVE)
692#D-* Examples:
693#D-
694function IGCM_sys_Put_Dir {
695    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@
696    if ( $DEBUG_sys ) ; then
697        echo "IGCM_sys_Put_Dir :" $@
698    fi
699    if [ $DRYRUN = 0 ]; then
700        if [ ! -d ${1} ] ; then
701            echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ."
702            IGCM_debug_PopStack "IGCM_sys_Put_Dir"
703            return
704        fi
705
706        typeset RET
707
708        #
709        #USUAL WAY
710        \cp -R $1 $2 > out_rsync 2>&1
711        RET=$?
712
713        if [ ${RET} -gt 0 ] ; then
714            echo "IGCM_sys_Put_Dir : error."
715            cat out_rsync
716            IGCM_debug_Exit "IGCM_sys_Put_Dir"
717        fi
718    else
719        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
720    fi
721    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
722}
723
724#D-#==================================================
725#D-function IGCM_sys_Get_Dir
726#D-* Purpose: Copy a complete directory from $(ARCHIVE)
727#D-* Examples:
728#D-
729function IGCM_sys_Get_Dir {
730    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@
731    if ( $DEBUG_sys ) ; then
732        echo "IGCM_sys_Get_Dir :" $@
733    fi
734    if [ $DRYRUN = 0 ]; then
735        if [ ! -d ${1} ] ; then
736            echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
737            IGCM_debug_PopStack "IGCM_sys_Get_Dir"
738            return
739        fi
740
741        typeset RET
742
743        # Only if we use rsync
744        #IGCM_sys_TestDirArchive $( dirname $2 )
745        #
746        #USUAL WAY
747        \cp -R $1 $2 > out_rsync 2>&1
748        RET=$?
749
750        if [ ${RET} -gt 0 ] ; then
751            echo "IGCM_sys_Get_Dir : error."
752            cat out_rsync
753            IGCM_debug_Exit "IGCM_sys_Get_Dir"
754        fi
755    else
756        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
757    fi
758    IGCM_debug_PopStack "IGCM_sys_Get_Dir"
759}
760
761#D-#==================================================
762#D-function IGCM_sys_Get_Master
763#D-* Purpose: Copy a complete directory from MASTER filesystem
764#D-* Examples:
765#D-
766function IGCM_sys_Get_Master {
767    IGCM_debug_PushStack "IGCM_sys_Get_Master" $@
768    if ( $DEBUG_sys ) ; then
769        echo "IGCM_sys_Get_Master :" $@
770    fi
771    if [ $DRYRUN = 0 ]; then
772        if [ ! -d ${1} ] ; then
773            echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ."
774            IGCM_debug_PopStack "IGCM_sys_Get_Master"
775            return
776        fi
777
778        typeset RET
779        sleep 60
780
781        #USUAL WAY
782        \cp -R $1 $2 > out_rsync 2>&1
783        RET=$?
784
785        if [ ${RET} -gt 0 ] ; then
786            echo "IGCM_sys_Get_Master : error."
787            cat out_rsync
788            IGCM_debug_Exit "IGCM_sys_Get_Master"
789        fi
790    else
791        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
792    fi
793    IGCM_debug_PopStack "IGCM_sys_Get_Master"
794}
795
796#D-#==================================================
797#D-function IGCM_sys_Put_Rest
798#D-* Purpose: commande de transfert des restarts $(ARCHIVE).
799#D-           Quitte si le fichier ou si le répertoire d'arriver n'existe pas.
800#D-* Examples:
801#D-
802function IGCM_sys_Put_Rest {
803    IGCM_debug_PushStack "IGCM_sys_Put_Rest" $@
804    if ( $DEBUG_sys ) ; then
805        echo "IGCM_sys_Put_Rest :" $@
806    fi
807    if [ $DRYRUN = 0 ]; then
808
809        IGCM_sys_TestDirArchive $( dirname $2 )
810
811        if [ ! -f ${1} ] ; then
812            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ."
813            IGCM_debug_Exit "IGCM_sys_Put_Rest"
814        fi
815        if [ X${JobType} = XRUN ] ; then
816            IGCM_sys_Chmod 444 ${1}
817        fi
818        typeset RET
819
820        echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
821        ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync 2>&1
822        RET=$?
823        IGCM_sys_Rsync_out $RET
824
825        ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
826        (( RET=RET+$? ))
827
828        if [ ${RET} -gt 0 ] ; then
829            echo "IGCM_sys_Put_Rest : error."
830            cat out_rsync
831            IGCM_debug_Exit "IGCM_sys_Put_Rest"
832        fi
833    else
834        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
835    fi
836    IGCM_debug_PopStack "IGCM_sys_Put_Rest"
837}
838
839#D-#==================================================
840#D-function IGCM_sys_Put_Out
841#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
842#D-* Examples:
843#D-
844function IGCM_sys_Put_Out {
845    IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
846    if ( $DEBUG_sys ) ; then
847        echo "IGCM_sys_Put_Out :" $@
848    fi
849    if [ $DRYRUN = 0 ]; then
850        if [ -f ${1} ] ; then
851            if [ ! -d $( dirname $2 ) ] ; then
852                IGCM_sys_MkdirArchive $( dirname $2 )
853            fi
854        else
855            echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
856            IGCM_debug_PopStack "IGCM_sys_Put_Out"
857            return 1
858        fi
859
860        typeset RET
861        #
862        if [ X${JobType} = XRUN ] ; then
863            IGCM_sys_Chmod 444 ${1}
864        fi
865        #
866
867        echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
868        ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync 2>&1
869        RET=$?
870        IGCM_sys_Rsync_out $RET
871
872        ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
873        (( RET=RET+$? ))
874
875        if [ ${RET} -gt 0 ] ; then
876            echo "IGCM_sys_Put_Out : error."
877            cat out_rsync
878            IGCM_debug_Exit "IGCM_sys_Put_Out"
879        fi
880    else
881        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
882    fi
883    IGCM_debug_PopStack "IGCM_sys_Put_Out"
884    return 0
885}
886
887#D-#==================================================
888#D-function IGCM_sys_Get
889#D-* Purpose: Get a file from ${ARCHIVE}
890#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
891#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
892function IGCM_sys_Get {
893    IGCM_debug_PushStack "IGCM_sys_Get" $@
894
895    typeset DEST RET dm_liste ifile target
896
897    if ( $DEBUG_sys ) ; then
898        echo "IGCM_sys_Get :" $@
899    fi
900    if [ $DRYRUN -le 2 ]; then
901        if [ X${1} = X'/l' ] ; then
902            # test if the first file is present in the old computation :
903            eval set +A dm_liste \${${2}}
904        else
905            dm_liste=${1}
906        fi
907        eval DEST=\${${#}}
908
909        # test if the (first) file is present in the old computation :
910        IGCM_sys_TestFileArchive ${dm_liste[0]}
911        RET=$?
912        if [ ${RET} -gt 0 ] ; then
913            echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
914            IGCM_debug_Exit "IGCM_sys_Get"
915            #return
916        fi
917
918        (( RET=0 ))
919        for target in ${dm_liste[*]} ; do
920          ln -s ${target} ${DEST} >> out_rsync 2>&1
921          (( RET=RET+$? ))
922        done
923
924#       echo ${RSYNC} ${RSYNC_opt} $@ > out_rsync 2>&1
925#       ${RSYNC} ${RSYNC_opt} $@ >> out_rsync 2>&1
926#       RET=$?
927#       IGCM_sys_Rsync_out $RET
928
929#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
930#       (( RET=RET+$? ))
931
932        if [ ${RET} -gt 0 ] ; then
933            echo "IGCM_sys_Get : copy error."
934            cat out_rsync
935            IGCM_debug_Exit "IGCM_sys_Get"
936        fi
937    else
938        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
939    fi
940    IGCM_debug_PopStack "IGCM_sys_Get"
941}
942
943#D-#==================================================
944#D-function IGCM_sys_Put_Dods
945#D-* Purpose: DO NOTHING ! Put $(ARCHIVE) files on DODS internet protocole.
946#D-* Examples:
947#D-
948function IGCM_sys_Put_Dods {
949    IGCM_debug_PushStack "IGCM_sys_Put_Dods" $@
950    if ( $DEBUG_sys ) ; then
951        echo "IGCM_sys_Put_Dods :" $@
952    fi
953    if [ $DRYRUN = 0 ]; then
954        if [ ! -f ${1} ] ; then
955            echo "WARNING : IGCM_sys_Put_Dods ${1} DOES NOT EXIST ."
956            IGCM_debug_PopStack "IGCM_sys_Put_Dods"
957            return
958        fi
959        #DO NOTHING
960    else
961        IGCM_err "DRYRUN mode = " $DRYRUN
962    fi
963    IGCM_debug_PopStack "IGCM_sys_Put_Dods"
964}
965
966############################################################## A REVOIR !!
967
968#D-#==================================================
969#D-function IGCM_sys_Rapatrie
970#D-* Purpose: Rapatrie
971#D-* Examples:
972#D-
973function IGCM_sys_Rapatrie {
974    IGCM_debug_PushStack "IGCM_sys_Rapatrie" $@
975    if ( $DEBUG_sys ) ; then
976        echo "IGCM_sys_Rapatrie :" $@
977    fi
978
979    typeset RET=0
980
981    IGCM_sys_Get ${R_STOCKAGE}/$2 $1 ;
982    let $(( RET=RET+$? ))
983    IGCM_sys_Cd $1 ;
984    let $(( RET=RET+$? ))
985    IGCM_sys_UnTar $2 ;
986    let $(( RET=RET+$? ))
987
988    if [ ${RET} -gt 0 ] ; then
989        echo "IGCM_sys_Rapatrie : erreur."
990        IGCM_debug_Exit "IGCM_sys_Rapatrie"
991    fi
992    IGCM_debug_PopStack "IGCM_sys_Rapatrie"
993}
994
995############################################################## A FINIR !!
996
997#D-#==================================================
998#D-function IGCM_sys_GetDate_FichWork
999#D-* Purpose: donne la date filesys d'un fichier sur le filesystem WORK
1000#D-* Examples:
1001#D-
1002function IGCM_sys_GetDate_FichWork {
1003    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
1004    if ( $DEBUG_sys ) ; then
1005        echo "IGCM_sys_GetDate_FichWork :" $@
1006    fi
1007    # donne la date filesys d'un fichier sur la machine work
1008    IGCM_debug_PopStack "IGCM_sys_FichWork"
1009}
1010
1011#D-#==================================================
1012#D-function IGCM_sys_GetDate_FichArchive
1013#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE
1014#D-* Examples:
1015#D-
1016function IGCM_sys_GetDate_FichArchive {
1017    IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
1018    if ( $DEBUG_sys ) ; then
1019        echo "IGCM_sys_GetDate_FichArchive :" $@
1020    fi
1021    IGCM_debug_PopStack "IGCM_sys_FichArchive"
1022}
1023
1024
1025##############################################################
1026# REBUILD OPERATOR
1027
1028function IGCM_sys_rebuild {
1029    IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
1030    if ( $DEBUG_sys ) ; then
1031        echo "IGCM_sys_rebuild :" $@
1032    fi
1033    /home/mmaipsl/TEMP_LOCAL/PARALLEL/modipsl/bin/rebuild -f -o $@
1034    if [ $? -gt 0 ] ; then
1035       echo "IGCM_sys_rebuild : erreur ${@}."
1036       IGCM_debug_Exit "rebuild"
1037    fi
1038
1039    IGCM_debug_PopStack "IGCM_sys_rebuild"
1040}
1041
1042##############################################################
1043# NCO OPERATOR
1044
1045function IGCM_sys_ncap {
1046    IGCM_debug_PushStack "IGCM_sys_ncap" -- $@
1047    if ( $DEBUG_sys ) ; then
1048        echo "IGCM_sys_ncap :" $@
1049    fi
1050    /usr/local/bin/ncap $@
1051    if [ $? -gt 0 ] ; then
1052       echo "IGCM_sys_ncap : erreur ${@}."
1053#       IGCM_debug_Exit "ncap"
1054    fi
1055
1056    IGCM_debug_PopStack "IGCM_sys_ncap"
1057}
1058
1059ncatted=/usr/local/bin/ncatted
1060# Problem with ksh and string passed in this function to ncatted !
1061# function IGCM_sys_ncatted {
1062#     IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
1063#     if ( $DEBUG_sys ) ; then
1064#       echo "IGCM_sys_ncatted :" $@
1065#     fi
1066#     /usr/local/bin/ncatted $@
1067#     if [ $? -gt 0 ] ; then
1068#        echo "IGCM_sys_ncatted : erreur ${@}."
1069#        IGCM_debug_Exit "ncatted"
1070#     fi
1071
1072#     IGCM_debug_PopStack "IGCM_sys_ncatted"
1073# }
1074
1075function IGCM_sys_ncbo {
1076    IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
1077    if ( $DEBUG_sys ) ; then
1078        echo "IGCM_sys_ncbo :" $@
1079    fi
1080    /usr/local/bin/ncbo $@
1081    if [ $? -gt 0 ] ; then
1082       echo "IGCM_sys_ncbo : erreur ${@}."
1083#       IGCM_debug_Exit "ncbo"
1084    fi
1085
1086    IGCM_debug_PopStack "IGCM_sys_ncbo"
1087}
1088
1089function IGCM_sys_ncdiff {
1090    IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
1091    if ( $DEBUG_sys ) ; then
1092        echo "IGCM_sys_ncdiff :" $@
1093    fi
1094    /usr/local/bin/ncdiff $@
1095    if [ $? -gt 0 ] ; then
1096       echo "IGCM_sys_ncdiff : erreur ${@}."
1097#       IGCM_debug_Exit "ncdiff"
1098    fi
1099
1100    IGCM_debug_PopStack "IGCM_sys_ncdiff"
1101}
1102
1103function IGCM_sys_ncea {
1104    IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
1105    if ( $DEBUG_sys ) ; then
1106        echo "IGCM_sys_ncea :" $@
1107    fi
1108    /usr/local/bin/ncea $@
1109    if [ $? -gt 0 ] ; then
1110       echo "IGCM_sys_ncea : erreur ${@}."
1111#       IGCM_debug_Exit "ncea"
1112    fi
1113
1114    IGCM_debug_PopStack "IGCM_sys_ncea"
1115}
1116
1117function IGCM_sys_ncecat {
1118    IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
1119    if ( $DEBUG_sys ) ; then
1120        echo "IGCM_sys_ncecat :" $@
1121    fi
1122    /usr/local/bin/ncecat $@
1123    if [ $? -gt 0 ] ; then
1124       echo "IGCM_sys_ncecat : erreur ${@}."
1125#       IGCM_debug_Exit "ncecat"
1126    fi
1127
1128    IGCM_debug_PopStack "IGCM_sys_ncecat"
1129}
1130
1131function IGCM_sys_ncflint {
1132    IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
1133    if ( $DEBUG_sys ) ; then
1134        echo "IGCM_sys_ncflint :" $@
1135    fi
1136    /usr/local/bin/ncflint $@
1137    if [ $? -gt 0 ] ; then
1138       echo "IGCM_sys_ncflint : erreur ${@}."
1139#       IGCM_debug_Exit "ncflint"
1140    fi
1141
1142    IGCM_debug_PopStack "IGCM_sys_ncflint"
1143}
1144
1145function IGCM_sys_ncks {
1146    IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
1147    if ( $DEBUG_sys ) ; then
1148        echo "IGCM_sys_ncks :" $@
1149    fi
1150    /usr/local/bin/ncks $@
1151    if [ $? -gt 0 ] ; then
1152       echo "IGCM_sys_ncks : erreur ${@}."
1153#       IGCM_debug_Exit "ncks"
1154    fi
1155
1156    IGCM_debug_PopStack "IGCM_sys_ncks"
1157}
1158
1159function IGCM_sys_ncpdq {
1160    IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
1161    if ( $DEBUG_sys ) ; then
1162        echo "IGCM_sys_ncpdq :" $@
1163    fi
1164    /usr/local/bin/ncpdq $@
1165    if [ $? -gt 0 ] ; then
1166       echo "IGCM_sys_ncpdq : erreur ${@}."
1167#       IGCM_debug_Exit "ncpdq"
1168    fi
1169
1170    IGCM_debug_PopStack "IGCM_sys_ncpdq"
1171}
1172
1173function IGCM_sys_ncra {
1174    IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
1175    if ( $DEBUG_sys ) ; then
1176        echo "IGCM_sys_ncra :" $@
1177    fi
1178    /usr/local/bin/ncra $@
1179    if [ $? -gt 0 ] ; then
1180       echo "IGCM_sys_ncra : erreur ${@}."
1181#       IGCM_debug_Exit "ncra"
1182    fi
1183
1184    IGCM_debug_PopStack "IGCM_sys_ncra"
1185}
1186
1187function IGCM_sys_ncrcat {
1188    IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
1189    if ( $DEBUG_sys ) ; then
1190        echo "IGCM_sys_ncrcat :" $@
1191    fi
1192    /usr/local/bin/ncrcat $@
1193    if [ $? -gt 0 ] ; then
1194       echo "IGCM_sys_ncrcat : erreur ${@}."
1195#       IGCM_debug_Exit "ncrcat"
1196    fi
1197
1198    IGCM_debug_PopStack "IGCM_sys_ncrcat"
1199}
1200
1201function IGCM_sys_ncrename {
1202    IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
1203    if ( $DEBUG_sys ) ; then
1204        echo "IGCM_sys_ncrename :" $@
1205    fi
1206    /usr/local/bin/ncrename $@
1207    if [ $? -gt 0 ] ; then
1208       echo "IGCM_sys_ncrename : erreur ${@}."
1209#       IGCM_debug_Exit "ncrename"
1210    fi
1211
1212    IGCM_debug_PopStack "IGCM_sys_ncrename"
1213}
1214
1215function IGCM_sys_ncwa {
1216    IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
1217    if ( $DEBUG_sys ) ; then
1218        echo "IGCM_sys_ncwa :" $@
1219    fi
1220    /usr/local/bin/ncwa $@
1221    if [ $? -gt 0 ] ; then
1222       echo "IGCM_sys_ncwa : erreur ${@}."
1223#       IGCM_debug_Exit "ncwa"
1224    fi
1225
1226    IGCM_debug_PopStack "IGCM_sys_ncwa"
1227}
1228
1229############################################################
1230# Activate Running Environnment Variables
1231
1232function IGCM_sys_activ_variables {
1233    IGCM_debug_PushStack "IGCM_sys_activ_variables"
1234    if ( $DEBUG_sys ) ; then
1235        echo "IGCM_sys_activ_variables"
1236    fi
1237    IGCM_debug_PopStack "IGCM_sys_activ_variables"
1238}
1239
1240############################################################
1241# Desactivate Running Environnment Variables
1242
1243function IGCM_sys_desactiv_variables {
1244    IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
1245    if ( $DEBUG_sys ) ; then
1246        echo "IGCM_sys_desactiv_variables "
1247    fi
1248    IGCM_debug_PopStack "IGCM_sys_desactiv_variables "
1249}
1250
1251############################################################
1252# Build run file
1253
1254function IGCM_sys_build_run_file {
1255    IGCM_debug_PushStack "IGCM_sys_build_run_file"
1256    if ( $DEBUG_sys ) ; then
1257        echo "IGCM_sys_build_run_file "
1258    fi
1259    IGCM_debug_PopStack "IGCM_sys_build_run_file "
1260}
Note: See TracBrowser for help on using the repository browser.