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

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

SD : - Tweak IGCM_sys_RshArchive function for non IDRIS machine

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