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

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

Delete useless sleep.

  • 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
792        #USUAL WAY
793        rcp -r ${MASTER}:$1 $2 > out_rsync 2>&1
794        RET=$?
795
796        if [ ${RET} -gt 0 ] ; then
797            echo "IGCM_sys_Get_Master : error."
798            cat out_rsync
799            IGCM_debug_Exit "IGCM_sys_Get_Master"
800        fi
801    else
802        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
803    fi
804    IGCM_debug_PopStack "IGCM_sys_Get_Master"
805}
806
807#D-#==================================================
808#D-function IGCM_sys_Put_Out
809#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
810#D-* Examples:
811#D-
812function IGCM_sys_Put_Out {
813    IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
814    if ( $DEBUG_sys ) ; then
815        echo "IGCM_sys_Put_Out :" $@
816    fi
817    if [ $DRYRUN = 0 ]; then
818        if [ ! -f ${1} ] ; then
819            echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
820            IGCM_debug_PopStack "IGCM_sys_Put_Out"
821            return 1
822        fi
823
824        typeset RET
825        #
826        if [ X${JobType} = XRUN ] ; then
827            if [ X${3} = X ] ; then
828                IGCM_sys_Chmod 444 ${1}
829            fi
830        fi
831        #
832        #
833        # USUAL WAY
834        mfput $1 $2 > out_rsync 2>&1
835        RET=$?
836
837#       #RSYNC WITH NETWORK RSH CALL
838#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
839#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
840
841#       #RSYNC WITH NFS USE
842#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
843#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
844
845#       RET=$?
846#       IGCM_sys_Rsync_out $RET
847
848#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
849#       (( RET=RET+$? ))
850
851        if [ ${RET} -gt 0 ] ; then
852            echo "IGCM_sys_Put_Out : error."
853            cat out_rsync
854            IGCM_debug_Print 1 "mfput failed. Make a second try :"
855            #
856            mfput $1 $2 > out_rsync 2>&1
857            RET=$?
858            #
859            if [ ${RET} -gt 0 ] ; then
860                echo "IGCM_sys_Put_Out : error."
861                IGCM_debug_Print 1 "mfput failed twice. You have a problem"
862                cat out_rsync
863                IGCM_debug_Exit "IGCM_sys_Put_Out"
864            fi
865        fi
866    else
867        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
868    fi
869    IGCM_debug_PopStack "IGCM_sys_Put_Out"
870    return 0
871}
872
873#D-#==================================================
874#D-function IGCM_sys_Get
875#D-* Purpose: Get a file from ${ARCHIVE}
876#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
877#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
878function IGCM_sys_Get {
879    IGCM_debug_PushStack "IGCM_sys_Get" $@
880
881    typeset DEST RET dm_liste ifile target
882
883    if ( $DEBUG_sys ) ; then
884        echo "IGCM_sys_Get :" $@
885    fi
886    if [ $DRYRUN -le 2 ]; then
887        if [ X${1} = X'/l' ] ; then
888            # test if the first file is present in the old computation :
889            eval set +A dm_liste \${${2}}
890        else
891            dm_liste=${1}
892        fi
893        eval DEST=\${${#}}
894
895        # test if the (first) file is present in the old computation :
896        IGCM_sys_TestFileArchive ${dm_liste[0]}
897        RET=$?
898        if [ ${RET} -gt 0 ] ; then
899            echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
900            IGCM_debug_Exit "IGCM_sys_Get"
901            #IGCM_debug_PopStack "IGCM_sys_Get"
902            #return
903        fi
904
905        # SD : dm_liste is not suited for computing job
906        #      because we change filename during transfert
907        #      dm_liste is better suited for post-treatment
908        # SD : dm_liste necessary only with RSYNC
909
910        #dm_liste=" "
911        #(( ifile=1 ))
912        #while [ $ifile -lt $# ] ; do
913        #    dm_liste=$( eval echo ${dm_liste[*]} " "\${${ifile}} )
914        #    (( ifile = ifile + 1 ))
915        #done
916        #DEST=$( eval echo \${${#}} )
917
918        #USUAL WAY
919        ##mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
920        for BugFileIdris in ${dm_liste[*]} ; do
921            echo ${BugFileIdris}
922            mfget ${BugFileIdris} ${DEST} >>out_rsync 2>&1
923            RET=$?
924            if [ ${RET} -gt 0 ] ; then
925                echo "IGCM_sys_Get : copy error."
926                cat out_rsync
927                #IGCM_debug_Exit "IGCM_sys_Get"
928            fi
929        done
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.