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

Last change on this file since 640 was 640, checked in by mafoipsl, 12 years ago

Add norerun option on SX front-end. Transfer specific files ie config.card COMP ... with IGCM_sys_Get_Master and modify IGCM_sys_Get_Master to allow file transfer. tested on ulam and SX front-end.

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