source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh @ 452

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