source: tags/libIGCM_v1_2/libIGCM_sys/libIGCM_sys_calculo.ksh @ 234

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

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

  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

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