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

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