source: tags/libIGCM_v1_12/libIGCM_sys/libIGCM_sys_ulam.ksh @ 1456

Last change on this file since 1456 was 506, checked in by mafoipsl, 13 years ago

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