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

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