source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh @ 44

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

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

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

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

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

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

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

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

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

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