source: tags/libIGCM_v2.0_beta2/libIGCM_sys/libIGCM_sys_ulam.ksh @ 1456

Last change on this file since 1456 was 651, checked in by aclsce, 12 years ago

Added check to be sure there is enough space on temporary filesystems (only on vargas, titane and mercure sx9).
If there is not enough space, we stop.

  • Property svn:keywords set to Revision Author Date
File size: 35.1 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  typeset ExistFlag FileNameToTest
404  # modified 17/10/2011 /u is not known on ulam, use /homegaya instead to test dir locally on ulam
405  FileNameToTest=$(echo $1 | sed 's,/u/,/homegaya/,')
406  ExistFlag=$( IGCM_sys_RshArchive "[ -f ${FileNameToTest} ] && echo 0 || echo 1" )
407  IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
408
409  return ${ExistFlag}
410}
411
412#D-#==================================================
413#D-function IGCM_sys_CountFileArchive
414#D-* Purpose: Count files on Archive filesystem
415#D-* Examples:
416#D-
417function IGCM_sys_CountFileArchive {
418  IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
419  IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
420  if [ $? -gt 0 ] ; then
421    echo "IGCM_sys_CountFileArchive : erreur."
422  fi
423  IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
424}
425
426#D-#==================================================
427#D-function IGCM_sys_Tree
428#D-* Purpose: Tree directories with files on ${ARCHIVE}
429#D-* Examples: IGCM_sys_Tree ${R_IN} ${R_OUT}
430#D-
431function IGCM_sys_Tree {
432  IGCM_debug_PushStack "IGCM_sys_Tree" $@
433  if ( $DEBUG_sys ) ; then
434    echo "IGCM_sys_Tree :" $@
435  fi
436
437  \mfls -r $@
438
439  IGCM_debug_PopStack "IGCM_sys_Tree"
440}
441
442#D-#==================================================
443#D-function IGCM_sys_Tar
444#D-* Purpose: master un-tar command
445#D-* Examples:
446#D-
447function IGCM_sys_Tar {
448  IGCM_debug_PushStack "IGCM_sys_Tar" $@
449  if ( $DEBUG_sys ) ; then
450    echo "IGCM_sys_Tar :" $@
451  fi
452  \tar cvf $@
453  if [ $? -gt 0 ] ; then
454    echo "IGCM_sys_Tar : erreur."
455    IGCM_debug_Exit "IGCM_sys_Tar"
456  fi
457  \tar tvf $1
458
459  IGCM_debug_PopStack "IGCM_sys_Tar"
460}
461
462#D-#==================================================
463#D-function IGCM_sys_UnTar
464#D-* Purpose: master un-tar command
465#D-* Examples:
466#D-
467function IGCM_sys_UnTar {
468  IGCM_debug_PushStack "IGCM_sys_UnTar" $@
469  if ( $DEBUG_sys ) ; then
470    echo "IGCM_sys_UnTar :" $@
471  fi
472  \tar xvf $1
473  if [ $? -gt 0 ] ; then
474    echo "IGCM_sys_UnTar : erreur."
475    IGCM_debug_Exit "IGCM_sys_UnTar"
476  fi
477  IGCM_debug_PopStack "IGCM_sys_UnTar"
478}
479
480#D-#==================================================
481#D-function IGCM_sys_QsubPost
482#D-* Purpose: Qsub new job on scalaire
483#D-* Examples:
484#D-
485function IGCM_sys_QsubPost {
486  IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
487  if ( $DEBUG_sys ) ; then
488    echo "IGCM_sys_QsubPost :" $@
489  fi
490  cd ${POST_DIR}
491  /opt/ibmll/LoadL/full/bin/llsubmit ${libIGCM}/$1.job
492  cd -
493  if [ $? -gt 0 ] ; then
494    echo "IGCM_sys_QsubPost : erreur " $@
495    IGCM_debug_Exit "IGCM_sys_QsubPost"
496  fi
497  IGCM_debug_PopStack "IGCM_sys_QsubPost"
498}
499
500#D-*************************
501#D- File transfer functions
502#D-*************************
503#D-
504
505#D-#==================================================
506#D-function IGCM_sys_Rsync_out
507#D-* Purpose: treat return val of rsync
508#D-* Examples: IGCM_sys_Rsync_out out_RET_rsync
509#D-  Error values and explanations can depend on your system version.
510function IGCM_sys_Rsync_out {
511  RET=$1
512  if [ ! $RET ] ; then
513    echo "rsync error !"
514  fi
515
516  if [ $MYLANG = "fr" ]; then
517    case $RET in
518    0)  return ;;
519    1)  echo "Erreur de rsync ; RERR_SYNTAX : "
520      echo "Erreur de syntaxe ou d'utilisation."
521      return;;
522    2)  echo "Erreur de rsync ; RERR_PROTOCOL : "
523      echo "Incompatibilité de protocole."
524      return;;
525    3)  echo "Erreur de rsync ; RERR_FILESELECT 3"
526      echo "Erreurs  lors  de  la  sélection des fichiers d'entrée sortie et"
527      echo "répertoires"
528      return;;
529    4)  echo "Erreur de rsync ; RERR_UNSUPPORTED"
530      echo "Action demandée non supportée : une tentative de manipulation de"
531      echo "fichiers  64-bits  sur une plate-forme qui ne les supporte pas a"
532      echo "été faite ; ou une option qui est supportée par le  client  mais"
533      echo "pas par le serveur a été spécifiée."
534      return;;
535    10) echo "Erreur de rsync ; RERR_SOCKETIO"
536      echo "Erreur dans le socket d'entrée sortie"
537      return;;
538    11) echo "Erreur de rsync ; RERR_FILEIO"
539      echo "Erreur d'entrée sortie fichier"
540      return;;
541    12) echo "Erreur de rsync ; RERR_STREAMIO"
542      echo "Erreur dans flux de donnée du protocole rsync"
543      return;;
544    13) echo "Erreur de rsync ; RERR_MESSAGEIO"
545      echo "Erreur avec les diagnostics du programme"
546      return;;
547    14) echo "Erreur de rsync ; RERR_IPC"
548      echo "Erreur dans le code IPC"
549      return;;
550    20) echo "Erreur de rsync ; RERR_SIGNAL"
551      echo "SIGUSR1 ou SIGINT reçu"
552      return;;
553    21) echo "Erreur de rsync ; RERR_WAITCHILD"
554      echo "Une erreur retournée par waitpid()"
555      return;;
556    22) echo "Erreur de rsync ; RERR_MALLOC"
557      echo "Erreur lors de l'allocation des tampons de mémoire de coeur"
558      return;;
559    23) echo ""
560      echo "Erreur fichier inexistant"
561      return;;
562    30) echo "Erreur de rsync ; RERR_TIMEOUT"
563      echo "Temps d'attente écoulé dans l'envoi/réception de données"
564      return;;
565    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
566      return;;
567    esac
568  elif [ $MYLANG = "en" ] ; then
569    case $RET in
570    0)  return;;
571    1)  echo "rsync error : Syntax or usage error "
572      return;;
573    2)  echo "rsync error : Protocol incompatibility "
574      return;;
575    3)  echo "rsync error : Errors selecting input/output files, dirs"
576      return;;
577    4)  echo "rsync error : Requested action not supported: an attempt"
578      echo "was made to manipulate 64-bit files on a platform that cannot support"
579      echo "them; or an option was specified that is supported by the client and"
580      echo "not by the server."
581      return;;
582    5)  echo "rsync error : Error starting client-server protocol"
583      return;;
584    10) echo "rsync error : Error in socket I/O "
585      return;;
586    11) echo "rsync error : Error in file I/O "
587      return;;
588    12) echo "rsync error : Error in rsync protocol data stream "
589      return;;
590    13) echo "rsync error : Errors with program diagnostics "
591      return;;
592    14) echo "rsync error : Error in IPC code "
593      return;;
594    20) echo "rsync error : Received SIGUSR1 or SIGINT "
595      return;;
596    21) echo "rsync error : Some error returned by waitpid() "
597      return;;
598    22) echo "rsync error : Error allocating core memory buffers "
599      return;;
600    23) echo "rsync error : Partial transfer due to error"
601      return;;
602    24) echo "rsync error : Partial transfer due to vanished source files"
603      return;;
604    30) echo "rsync error : Timeout in data send/receive "
605      return;;
606    *)  echo "rsync error : return code of rsync unknown :" $RET
607      return;;
608    esac
609  else
610    echo "unknown language $MYLANG."
611    return
612  fi
613}
614
615#D-#==================================================
616#D-function IGCM_sys_Cp
617#D-* Purpose: generic cp
618#D-* Examples:
619#D-
620function IGCM_sys_Cp {
621  IGCM_debug_PushStack "IGCM_sys_Cp" $@
622  if ( $DEBUG_sys ) ; then
623    echo "IGCM_sys_Cp :" $@
624  fi
625
626  typeset RET
627
628  echo cp $@ > out_rsync 2>&1
629  \cp $@ >> out_rsync 2>&1
630  RET=$?
631
632  if [ ${RET} -gt 0 ] ; then
633    echo "IGCM_sys_Cp : error."
634    cat out_rsync
635    IGCM_debug_Exit "IGCM_sys_Cp"
636  fi
637  IGCM_debug_PopStack "IGCM_sys_Cp"
638}
639
640#D-#==================================================
641#D-function IGCM_sys_Rm
642#D-* Purpose: generic rm
643#D-* Examples:
644#D-
645function IGCM_sys_Rm {
646  IGCM_debug_PushStack "IGCM_sys_Rm" -- $@
647  if ( $DEBUG_sys ) ; then
648    echo "IGCM_sys_Rm :" $@
649  fi
650
651  typeset RET
652
653  echo rm $@ > out_rsync 2>&1
654  \rm $@ >> out_rsync 2>&1
655  RET=$?
656
657  if [ ${RET} -gt 0 ] ; then
658    echo "IGCM_sys_Rm : error."
659    cat out_rsync
660    IGCM_debug_Exit "IGCM_sys_Rm"
661  fi
662  IGCM_debug_PopStack "IGCM_sys_Rm"
663}
664
665#D-#==================================================
666#D-function IGCM_sys_RmRunDir
667#D-* Purpose: rm tmpdir (dummy function most of the time batch
668#D-                      scheduler will do the job)
669#D-* Examples:
670#D-
671function IGCM_sys_RmRunDir {
672  IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@
673  if ( $DEBUG_sys ) ; then
674    echo "IGCM_sys_RmRunDir :" $@
675    echo "Dummy call, let the scheduler do that."
676  fi
677  IGCM_debug_PopStack "IGCM_sys_RmRunDir"
678}
679
680#D-#==================================================
681#D-function IGCM_sys_Mv
682#D-* Purpose: generic move
683#D-* Examples:
684#D-
685function IGCM_sys_Mv {
686  IGCM_debug_PushStack "IGCM_sys_Mv" $@
687  if ( $DEBUG_sys ) ; then
688    echo "IGCM_sys_Mv :" $@
689  fi
690
691  if [ $DRYRUN = 0 ]; then
692
693    typeset RET
694
695    echo mv $@ > out_rsync 2>&1
696    \mv $@ >> out_rsync 2>&1
697    RET=$?
698
699    if [ ${RET} -gt 0 ] ; then
700      echo "IGCM_sys_Mv : error in mv."
701      cat out_rsync
702      IGCM_debug_Exit "IGCM_sys_Mv"
703    fi
704  else
705    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
706  fi
707
708  IGCM_debug_PopStack "IGCM_sys_Mv"
709}
710
711#D-#==================================================
712#D-function IGCM_sys_Put_Dir
713#D-* Purpose: Copy a complete directory on $(ARCHIVE)
714#D-* Examples:
715#D-
716function IGCM_sys_Put_Dir {
717  IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@
718  if ( $DEBUG_sys ) ; then
719    echo "IGCM_sys_Put_Dir :" $@
720  fi
721  if [ $DRYRUN = 0 ]; then
722    if [ ! -d ${1} ] ; then
723      echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ."
724      IGCM_debug_PopStack "IGCM_sys_Put_Dir"
725      return
726    fi
727
728    typeset RET
729
730    # Only if we use rsync
731    #IGCM_sys_TestDirArchive $( dirname $2 )
732    #
733    #USUAL WAY
734    rcp -r $1 gaya:$2 > out_rsync 2>&1
735    RET=$?
736
737    if [ ${RET} -gt 0 ] ; then
738      echo "IGCM_sys_Put_Dir : error."
739      cat out_rsync
740      IGCM_debug_Exit "IGCM_sys_Put_Dir"
741    fi
742
743    # due to rcommand latency
744    sleep 10
745
746  else
747    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
748  fi
749  IGCM_debug_PopStack "IGCM_sys_Put_Dir"
750}
751
752#D-#==================================================
753#D-function IGCM_sys_Get_Dir
754#D-* Purpose: Copy a complete directory from $(ARCHIVE)
755#D-* Examples:
756#D-
757function IGCM_sys_Get_Dir {
758  IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@
759  if ( $DEBUG_sys ) ; then
760    echo "IGCM_sys_Get_Dir :" $@
761  fi
762  if [ $DRYRUN = 0 ]; then
763
764#       if [ ! -d ${1} ] ; then
765#           echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
766#           IGCM_debug_PopStack "IGCM_sys_Get_Dir"
767#           return
768#       fi
769
770    typeset RET
771
772    #USUAL WAY
773    rcp -rp gaya:$1 $2 > out_rsync 2>&1
774    RET=$?
775
776    if [ ${RET} -gt 0 ] ; then
777      echo "IGCM_sys_Get_Dir : error."
778      cat out_rsync
779      IGCM_debug_Exit "IGCM_sys_Get_Dir"
780    fi
781  else
782    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
783  fi
784  IGCM_debug_PopStack "IGCM_sys_Get_Dir"
785}
786
787#D-#==================================================
788#D-function IGCM_sys_Get_Master
789#D-* Purpose: Copy a complete directory from MASTER filesystem
790#D-* Examples:
791#D-
792function IGCM_sys_Get_Master {
793  IGCM_debug_PushStack "IGCM_sys_Get_Master" $@
794  if ( $DEBUG_sys ) ; then
795    echo "IGCM_sys_Get_Master :" $@
796  fi
797  if [ $DRYRUN = 0 ]; then
798    TEST=$( IGCM_sys_RshMaster ( [ -d $1 ] || [ -f $1 ] ) && echo 1 || echo 0 )
799    if [ ${TEST} -ne 1 ] ; then
800      echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ON ${MASTER}."
801      IGCM_debug_PopStack "IGCM_sys_Get_Master"
802      return
803    fi
804
805    typeset RET
806
807    #USUAL WAY
808    rcp -r ${MASTER}:$1 $2 > out_rsync 2>&1
809    RET=$?
810
811    if [ ${RET} -gt 0 ] ; then
812      echo "IGCM_sys_Get_Master : error."
813      cat out_rsync
814      IGCM_debug_Exit "IGCM_sys_Get_Master"
815    fi
816  else
817    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
818  fi
819  IGCM_debug_PopStack "IGCM_sys_Get_Master"
820}
821
822#D-#==================================================
823#D-function IGCM_sys_Put_Out
824#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
825#D-* Examples:
826#D-
827function IGCM_sys_Put_Out {
828  IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
829  if ( $DEBUG_sys ) ; then
830    echo "IGCM_sys_Put_Out :" $@
831  fi
832  if [ $DRYRUN = 0 ]; then
833    if [ ! -f ${1} ] ; then
834      echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
835      IGCM_debug_PopStack "IGCM_sys_Put_Out"
836      return 1
837    fi
838
839    typeset RET
840        #
841    if [ X${JobType} = XRUN ] ; then
842      if [ X${3} = X ] ; then
843        IGCM_sys_Chmod 444 ${1}
844      fi
845    fi
846    #
847    #
848    # USUAL WAY
849    mfput $1 $2 > out_rsync 2>&1
850    RET=$?
851
852#       #RSYNC WITH NETWORK RSH CALL
853#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
854#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
855
856#       #RSYNC WITH NFS USE
857#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
858#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
859
860#       RET=$?
861#       IGCM_sys_Rsync_out $RET
862
863#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
864#       (( RET=RET+$? ))
865
866    if [ ${RET} -gt 0 ] ; then
867      echo "IGCM_sys_Put_Out : error."
868      cat out_rsync
869      IGCM_debug_Print 1 "mfput failed. Make a second try :"
870            #
871      mfput $1 $2 > out_rsync 2>&1
872      RET=$?
873            #
874      if [ ${RET} -gt 0 ] ; then
875        echo "IGCM_sys_Put_Out : error."
876        IGCM_debug_Print 1 "mfput failed twice. You have a problem"
877        cat out_rsync
878        IGCM_debug_Exit "IGCM_sys_Put_Out"
879      fi
880    fi
881  else
882    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
883  fi
884  IGCM_debug_PopStack "IGCM_sys_Put_Out"
885  return 0
886}
887
888#D-#==================================================
889#D-function IGCM_sys_Get
890#D-* Purpose: Get a file from ${ARCHIVE}
891#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
892#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
893function IGCM_sys_Get {
894  IGCM_debug_PushStack "IGCM_sys_Get" $@
895
896  typeset DEST RET dm_liste ifile target
897
898  if ( $DEBUG_sys ) ; then
899    echo "IGCM_sys_Get :" $@
900  fi
901  if [ $DRYRUN -le 2 ]; then
902    if [ X${1} = X'/l' ] ; then
903      # test if the first file is present in the old computation :
904      eval set +A dm_liste \${${2}}
905    else
906      dm_liste=${1}
907    fi
908    eval DEST=\${${#}}
909
910    # test if the (first) file is present in the old computation :
911    IGCM_sys_TestFileArchive ${dm_liste[0]}
912    RET=$?
913    if [ ${RET} -gt 0 ] ; then
914      echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
915      IGCM_debug_Exit "IGCM_sys_Get"
916      #IGCM_debug_PopStack "IGCM_sys_Get"
917      #return
918    fi
919
920    # SD : dm_liste is not suited for computing job
921    #      because we change filename during transfert
922    #      dm_liste is better suited for post-treatment
923    # SD : dm_liste necessary only with RSYNC
924
925    #dm_liste=" "
926    #(( ifile=1 ))
927    #while [ $ifile -lt $# ] ; do
928    #    dm_liste=$( eval echo ${dm_liste[*]} " "\${${ifile}} )
929    #    (( ifile = ifile + 1 ))
930    #done
931    #DEST=$( eval echo \${${#}} )
932
933    #USUAL WAY
934    mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
935
936#   #RSYNC WITH NETWORK RSH CALL
937#   echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
938#   ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
939
940#   #RSYNC WITH NFS USE
941#   echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
942#   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
943
944#   RET=$?
945#   IGCM_sys_Rsync_out $RET
946
947#   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
948#   (( RET=RET+$? ))
949
950  else
951    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
952  fi
953  IGCM_debug_PopStack "IGCM_sys_Get"
954}
955
956#D-#==================================================
957#D-function IGCM_sys_Put_Dods
958#D-* Purpose: Put $(ARCHIVE) files on DODS internet protocole.
959#D-* Examples:
960#D-
961function IGCM_sys_Put_Dods {
962  IGCM_debug_PushStack "IGCM_sys_Put_Dods" $@
963  if ( $DEBUG_sys ) ; then
964    echo "IGCM_sys_Put_Dods :" $@
965  fi
966  if [ $DRYRUN = 0 ]; then
967    # We take our time on that
968    sleep 10
969    IGCM_sys_TestDirArchive ${R_SAVE}/${1}
970    if [ $? != 0 ] ; then
971      echo "WARNING : IGCM_sys_Put_Dods ${R_SAVE}/${1} DOES NOT EXIST ."
972      IGCM_debug_PopStack "IGCM_sys_Put_Dods"
973      return
974    fi
975
976    typeset RET
977    #
978    rsh gaya exec /bin/ksh <<EOF
979          cd ${R_SAVE}
980          /usr/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS}/${1} > /dev/null 2>&1
981          /bin/chmod -R u+w ${R_SAVE}/${1}
982          /usr/local/bin/dods_cp ${1} DODS/pub/${LOGIN}/${R_DODS} > /dev/null 2>&1
983          /bin/chmod -R +rX ${R_SAVE}/${1}
984          /bin/chmod -R u+w ${R_SAVE}/${1}
985EOF
986    RET=$?
987
988    if [ ${RET} -gt 0 ] ; then
989      echo "IGCM_sys_Put_Dods : error."
990      IGCM_debug_Exit "IGCM_sys_Put_Dods"
991    fi
992  else
993    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
994  fi
995  IGCM_debug_PopStack "IGCM_sys_Put_Dods"
996}
997
998############################################################## A FINIR !!
999
1000#D-#==================================================
1001#D-function IGCM_sys_GetDate_FichWork
1002#D-* Purpose: donne la date filesys d'un fichier sur le filesystem WORK
1003#D-* Examples:
1004#D-
1005function IGCM_sys_GetDate_FichWork {
1006  IGCM_debug_PushStack "IGCM_sys_FichWork" $@
1007  if ( $DEBUG_sys ) ; then
1008    echo "IGCM_sys_GetDate_FichWork :" $@
1009  fi
1010    # donne la date filesys d'un fichier sur la machine work
1011  IGCM_debug_PopStack "IGCM_sys_FichWork"
1012}
1013
1014#D-#==================================================
1015#D-function IGCM_sys_GetDate_FichArchive
1016#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE
1017#D-* Examples:
1018#D-
1019function IGCM_sys_GetDate_FichArchive {
1020  IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
1021  if ( $DEBUG_sys ) ; then
1022    echo "IGCM_sys_GetDate_FichArchive :" $@
1023  fi
1024  IGCM_debug_PopStack "IGCM_sys_FichArchive"
1025}
1026
1027##############################################################
1028# REBUILD OPERATOR
1029
1030function IGCM_sys_rebuild {
1031  IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
1032  if ( $DEBUG_sys ) ; then
1033    echo "IGCM_sys_rebuild :" $@
1034  fi
1035  /home/rech/psl/rpsl035/bin/rebuild -f -o $@
1036  if [ $? -gt 0 ] ; then
1037    echo "IGCM_sys_rebuild : erreur ${@}."
1038    IGCM_debug_Exit "rebuild"
1039  fi
1040
1041  IGCM_debug_PopStack "IGCM_sys_rebuild"
1042}
1043##############################################################
1044# NCO OPERATOR
1045
1046function IGCM_sys_ncap2 {
1047  IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
1048  if ( $DEBUG_sys ) ; then
1049    echo "IGCM_sys_ncap2 :" $@
1050  fi
1051  ncap2 "$@"
1052  if [ $? -gt 0 ] ; then
1053    echo "IGCM_sys_ncap2 : erreur ${@}."
1054    IGCM_debug_Exit "ncap2"
1055  fi
1056
1057  IGCM_debug_PopStack "IGCM_sys_ncap2"
1058}
1059
1060function IGCM_sys_ncatted {
1061  IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
1062  if ( $DEBUG_sys ) ; then
1063    echo "IGCM_sys_ncatted :" $@
1064  fi
1065  ncatted "$@"
1066  if [ $? -gt 0 ] ; then
1067    echo "IGCM_sys_ncatted : erreur ${@}."
1068    IGCM_debug_Exit "ncatted"
1069  fi
1070
1071  IGCM_debug_PopStack "IGCM_sys_ncatted"
1072}
1073
1074function IGCM_sys_ncbo {
1075  IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
1076  if ( $DEBUG_sys ) ; then
1077    echo "IGCM_sys_ncbo :" $@
1078  fi
1079  ncbo $@
1080  if [ $? -gt 0 ] ; then
1081    echo "IGCM_sys_ncbo : erreur ${@}."
1082    IGCM_debug_Exit "ncbo"
1083  fi
1084
1085  IGCM_debug_PopStack "IGCM_sys_ncbo"
1086}
1087
1088function IGCM_sys_ncdiff {
1089  IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
1090  if ( $DEBUG_sys ) ; then
1091    echo "IGCM_sys_ncdiff :" $@
1092  fi
1093  ncdiff $@
1094  if [ $? -gt 0 ] ; then
1095    echo "IGCM_sys_ncdiff : erreur ${@}."
1096    IGCM_debug_Exit "ncdiff"
1097  fi
1098
1099  IGCM_debug_PopStack "IGCM_sys_ncdiff"
1100}
1101
1102function IGCM_sys_ncea {
1103  IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
1104  if ( $DEBUG_sys ) ; then
1105    echo "IGCM_sys_ncea :" $@
1106  fi
1107  ncea $@
1108  if [ $? -gt 0 ] ; then
1109    echo "IGCM_sys_ncea : erreur ${@}."
1110    IGCM_debug_Exit "ncea"
1111  fi
1112
1113  IGCM_debug_PopStack "IGCM_sys_ncea"
1114}
1115
1116function IGCM_sys_ncecat {
1117  IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
1118  if ( $DEBUG_sys ) ; then
1119    echo "IGCM_sys_ncecat :" $@
1120  fi
1121  ncecat $@
1122  if [ $? -gt 0 ] ; then
1123    echo "IGCM_sys_ncecat : erreur ${@}."
1124    IGCM_debug_Exit "ncecat"
1125  fi
1126
1127  IGCM_debug_PopStack "IGCM_sys_ncecat"
1128}
1129
1130function IGCM_sys_ncflint {
1131  IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
1132  if ( $DEBUG_sys ) ; then
1133    echo "IGCM_sys_ncflint :" $@
1134  fi
1135  ncflint $@
1136  if [ $? -gt 0 ] ; then
1137    echo "IGCM_sys_ncflint : erreur ${@}."
1138    IGCM_debug_Exit "ncflint"
1139  fi
1140
1141  IGCM_debug_PopStack "IGCM_sys_ncflint"
1142}
1143
1144function IGCM_sys_ncks {
1145  IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
1146  if ( $DEBUG_sys ) ; then
1147    echo "IGCM_sys_ncks :" $@
1148  fi
1149  ncks $@
1150  if [ $? -gt 0 ] ; then
1151    echo "IGCM_sys_ncks : erreur ${@}."
1152    IGCM_debug_Exit "ncks"
1153  fi
1154
1155  IGCM_debug_PopStack "IGCM_sys_ncks"
1156}
1157
1158function IGCM_sys_ncpdq {
1159  IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
1160  if ( $DEBUG_sys ) ; then
1161    echo "IGCM_sys_ncpdq :" $@
1162  fi
1163  ncpdq $@
1164  if [ $? -gt 0 ] ; then
1165    echo "IGCM_sys_ncpdq : erreur ${@}."
1166    IGCM_debug_Exit "ncpdq"
1167  fi
1168
1169  IGCM_debug_PopStack "IGCM_sys_ncpdq"
1170}
1171
1172function IGCM_sys_ncra {
1173  IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
1174  if ( $DEBUG_sys ) ; then
1175    echo "IGCM_sys_ncra :" $@
1176  fi
1177  ncra $@
1178  if [ $? -gt 0 ] ; then
1179    echo "IGCM_sys_ncra : erreur ${@}."
1180    IGCM_debug_Exit "ncra"
1181  fi
1182
1183  IGCM_debug_PopStack "IGCM_sys_ncra"
1184}
1185
1186function IGCM_sys_ncrcat {
1187  IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
1188  if ( $DEBUG_sys ) ; then
1189    echo "IGCM_sys_ncrcat :" $@
1190  fi
1191  ncrcat $@
1192  if [ $? -gt 0 ] ; then
1193    echo "IGCM_sys_ncrcat : erreur ${@}."
1194#       IGCM_debug_Exit "ncrcat"
1195  fi
1196
1197  IGCM_debug_PopStack "IGCM_sys_ncrcat"
1198}
1199
1200function IGCM_sys_ncrename {
1201  IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
1202  if ( $DEBUG_sys ) ; then
1203    echo "IGCM_sys_ncrename :" $@
1204  fi
1205  ncrename $@
1206  if [ $? -gt 0 ] ; then
1207    echo "IGCM_sys_ncrename : erreur ${@}."
1208    IGCM_debug_Exit "ncrename"
1209  fi
1210
1211  IGCM_debug_PopStack "IGCM_sys_ncrename"
1212}
1213
1214function IGCM_sys_ncwa {
1215  IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
1216  if ( $DEBUG_sys ) ; then
1217    echo "IGCM_sys_ncwa :" $@
1218  fi
1219  ncwa $@
1220  if [ $? -gt 0 ] ; then
1221    echo "IGCM_sys_ncwa : erreur ${@}."
1222    IGCM_debug_Exit "ncwa"
1223  fi
1224
1225  IGCM_debug_PopStack "IGCM_sys_ncwa"
1226}
1227
1228##############################################################
1229# CDO OPERATOR
1230
1231function IGCM_sys_cdo {
1232  IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
1233
1234  \cdo $@
1235  if [ $? -gt 0 ] ; then
1236    echo "IGCM_sys_cdo : erreur ${@}."
1237    IGCM_debug_PopStack "IGCM_sys_cdo"
1238    return 1
1239  else
1240    IGCM_debug_PopStack "IGCM_sys_cdo"
1241    return 0
1242  fi
1243
1244  IGCM_debug_PopStack "IGCM_sys_cdo"
1245}
1246
1247############################################################
1248# Activate Running Environnment Variables
1249
1250function IGCM_sys_activ_variables {
1251  IGCM_debug_PushStack "IGCM_sys_activ_variables"
1252  if ( $DEBUG_sys ) ; then
1253    echo "IGCM_sys_activ_variables"
1254  fi
1255  IGCM_debug_PopStack "IGCM_sys_activ_variables"
1256}
1257
1258############################################################
1259# Desactivate Running Environnment Variables
1260
1261function IGCM_sys_desactiv_variables {
1262  IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
1263  if ( $DEBUG_sys ) ; then
1264    echo "IGCM_sys_desactiv_variables"
1265  fi
1266  IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
1267}
1268
1269############################################################
1270# Build run file
1271
1272function IGCM_sys_build_run_file {
1273  IGCM_debug_PushStack "IGCM_sys_build_run_file"
1274  if ( $DEBUG_sys ) ; then
1275    echo "IGCM_sys_build_run_file"
1276  fi
1277  IGCM_debug_PopStack "IGCM_sys_build_run_file"
1278}
1279
1280############################################################
1281# Check of space available on temporary filesytems
1282function IGCM_sys_check_quota {
1283    IGCM_debug_PushStack "IGCM_sys_check_quota"
1284    if ( $DEBUG_sys ) ; then
1285        echo "IGCM_sys_check_quota"
1286    fi
1287    IGCM_debug_PopStack "IGCM_sys_check_quota"
1288}
Note: See TracBrowser for help on using the repository browser.