source: branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_ulam.ksh @ 559

Last change on this file since 559 was 505, checked in by mafoipsl, 13 years ago

For ulam : adapt /homegaya /u as required since 11/10/2011. Tested with TimeSeries_Checker.job

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