Ignore:
Timestamp:
02/18/13 17:09:13 (11 years ago)
Author:
sdipsl
Message:
  • default and obelix was outdated. They diverged too much from the others.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r782 r800  
    6464# Host and user names 
    6565# $hostname ou hostname 
    66 typeset HOST=${HOST:=$( hostname )} 
     66typeset  HOST=${HOST:=$( hostname )} 
    6767# $username ou whoami 
    68 typeset LOGIN=${LOGIN:=$( whoami )} 
     68typeset  LOGIN=${LOGIN:=$( whoami )} 
    6969# $hostname of the MASTER job 
    7070typeset MASTER=${MASTER:=$( hostname )} 
     
    111111 
    112112#==================================================== 
    113 #- SCRATCHDIR (=> ${R_DONNEES}) 
    114 if [ X${PBS_O_WORKDIR} != X ] ; then 
    115   typeset -r SCRATCHDIR=/scratch/$PBS_O_LOGNAME.$PBS_JOBID 
    116 #==${WORKDIR} 
    117 # cf /usr/Local/Env sur obelix 
    118 else 
    119   typeset -r SCRATCHDIR=/tmp 
    120 fi 
    121 #FOR DEBUG RUN : 
    122 #typeset -r SCRATCHDIR=/home/scratch01/${LOGIN} 
    123  
    124 #==================================================== 
    125113#- SUBMIT_DIR : submission dir 
    126114if [ X${PBS_O_WORKDIR} != X ] ; then 
     
    136124#==================================================== 
    137125#- ARCHIVE (dedicated to large files) 
    138 typeset -r ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}} 
     126typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}} 
    139127 
    140128#==================================================== 
    141129#- STORAGE (dedicated to small/medium files) 
    142 typeset -r STORAGE=${ARCHIVE} 
     130typeset STORAGE=${ARCHIVE} 
    143131 
    144132#==================================================== 
    145133#- R_OUT 
    146 typeset -r R_OUT=${ARCHIVE}/IGCM_OUT 
     134typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    147135 
    148136#==================================================== 
    149137#- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    150 typeset -r R_FIG=${STORAGE}/IGCM_OUT 
     138typeset R_FIG=${STORAGE}/IGCM_OUT 
    151139 
    152140#==================================================== 
    153141#- R_BUF (ONLY FOR double copy an scratch) 
    154 typeset -r R_BUF=/home/scratch01/${LOGIN}/IGCM_OUT 
     142typeset -r R_BUF=${STORAGE}/IGCM_OUT 
    155143 
    156144#==================================================== 
    157145#- BIG_DIR : BIG_DIR to store files waiting for rebuild 
    158 typeset -r BIG_DIR=${BIG_DIR:=${SCRATCHDIR}/REBUILD} 
     146typeset -r BIG_DIR=${BIG_DIR:=${STORAGE}/REBUILD} 
    159147 
    160148#==================================================== 
    161149#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    162 typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/tmp$$} 
     150typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=/scratch/$PBS_O_LOGNAME.$PBS_JOBID} 
    163151 
    164152#==================================================== 
    165153#- HOST_MPIRUN_COMMAND 
    166154typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time mpirun"} 
    167  
    168 #========================================================= 
    169 #- Add "time" before mpirun command 
    170 MPIRUN_COMMAND="time "${MPIRUN_COMMAND} 
    171 echo ${MPIRUN_COMMAND} 
    172155 
    173156#==================================================== 
     
    201184#D-#================================================== 
    202185#D-function IGCM_sys_RshMaster 
    203 #D-* Purpose: Just a fake command to wrapp 
    204 #D-           IGCM_card call in post-treatment 
    205 #D-           Ulam do not see brodie filesystem 
    206 #D-           Cesium do not see all mercure filesystem 
    207 #D-           That's why we need this hack. 
     186#D-* Purpose: Connection to frontend machine. 
    208187#D-* Examples: 
    209188#D- 
     
    246225#D-* Examples: 
    247226#D- 
    248 (( RshPNum = 0 )) 
    249227function IGCM_sys_RshPost { 
    250228  IGCM_debug_PushStack "IGCM_sys_RshPost" $@ 
     
    252230    echo "IGCM_sys_RshPost :" $@ 
    253231  fi 
    254   ssh obelix3 exec /bin/ksh $@ > out_RshPost.${RshPNum} 
     232 
     233  #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL 
     234  #cat tmp_IGCM_sys_RshPost_$$ 
     235  # keep standard input (stdin) for the loop onto temporary file 
     236  cat >tmp_IGCM_sys_RshPost_$$ 
     237 
     238# ============ FRONTEND START ============ # 
     239 
     240    ssh obelix3 exec /bin/ksh <tmp_IGCM_sys_RshPost_$$ 
    255241  if [ $? -gt 0 ] ; then 
    256242    echo "IGCM_sys_RshPost : erreur." 
    257243    IGCM_debug_Exit "IGCM_sys_RshPost" 
    258244  fi 
    259   (( RshPNum = RshPNum + 1 )) 
     245  # delete temporary file 
     246  \rm tmp_IGCM_sys_RshPost_$$ 
    260247  IGCM_debug_PopStack "IGCM_sys_RshPost" 
    261248} 
     
    285272  Job ended   : ${DateEnd} 
    286273  Output files are available in ${R_SAVE} 
     274  Files to be rebuild are temporarily available in ${REBUILD_DIR} 
     275  Pre-packed files are temporarily available in ${R_BUFR} 
    287276  Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 
    288277END_MAIL 
     
    461450 
    462451#D-#================================================== 
     452#D-function IGCM_sys_IsFileArchived 
     453#D-* Purpose: Test file that must NOT EXISTS on Archive 
     454#D-* Examples: 
     455#D- 
     456function IGCM_sys_IsFileArchived { 
     457  IGCM_debug_PushStack "IGCM_sys_IsFileArchived" $@ 
     458  if ( $DEBUG_sys ) ; then 
     459    echo "IGCM_sys_IsFileArchived :" $@ 
     460  fi 
     461  typeset IsArchivedFlag 
     462  # Never archived for this system 
     463  IsArchivedFlag=1 
     464  IGCM_debug_PopStack "IGCM_sys_IsFileArchived" 
     465 
     466  return ${IsArchivedFlag} 
     467} 
     468 
     469#D-#================================================== 
    463470#D-function IGCM_sys_TestFileArchive 
    464471#D-* Purpose: Test file that must NOT EXISTS on Archive 
     
    578585    echo "IGCM_sys_Qsub :" $@ 
    579586  fi 
    580 #    /usr/local/bin/qsub -q short -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 
    581587  /usr/local/bin/qsub -q medium -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 
    582588  if [ $? -gt 0 ] ; then 
     
    12631269  eval ${2}=${dateF[5]} 
    12641270 
    1265     # donne la date filesys d'un fichier sur la machine work 
     1271  # donne la date filesys d'un fichier sur la machine work 
    12661272  IGCM_debug_PopStack "IGCM_sys_FichWork" 
    12671273} 
     
    13501356  list_opt=$@ 
    13511357 
    1352   # Invert Axis : t,x -> x,t  
     1358  # Invert Axis : t,x -> x,t 
    13531359  #               t,pres,x -> x,t,pres 
    13541360  # So that we can concatenate along x 
     
    14131419#      j3=${proc_stn[${iStation}]} 
    14141420      # Extract station 
    1415       # Invert Axis : t,x -> x,t  
     1421      # Invert Axis : t,x -> x,t 
    14161422      #               t,pres,x -> x,t,pres 
    14171423      # So that we can concatenate along x 
     
    14561462 
    14571463############################################################ 
    1458 # Build run file 
     1464# Build MPI/OMP scripts run file (dummy function) 
    14591465 
    14601466function IGCM_sys_build_run_file { 
     
    17371743# NCO OPERATOR 
    17381744 
    1739  
    17401745function IGCM_sys_ncap2 { 
    17411746  IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     
    17591764      \rm out_rsync 
    17601765      IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1766      sleep $DELAI 
    17611767    else 
    17621768      \rm out_rsync 
     
    17951801      \rm out_rsync 
    17961802      IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1803      sleep $DELAI 
    17971804    else 
    17981805      \rm out_rsync 
     
    18311838      \rm out_rsync 
    18321839      IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1840      sleep $DELAI 
    18331841    else 
    18341842      \rm out_rsync 
     
    18671875      \rm out_rsync 
    18681876      IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1877      sleep $DELAI 
    18691878    else 
    18701879      \rm out_rsync 
     
    19031912      \rm out_rsync 
    19041913      IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1914      sleep $DELAI 
    19051915    else 
    19061916      \rm out_rsync 
     
    19391949      \rm out_rsync 
    19401950      IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1951      sleep $DELAI 
    19411952    else 
    19421953      \rm out_rsync 
     
    19751986      \rm out_rsync 
    19761987      IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1988      sleep $DELAI 
    19771989    else 
    19781990      \rm out_rsync 
     
    20112023      \rm out_rsync 
    20122024      IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2025      sleep $DELAI 
    20132026    else 
    20142027      \rm out_rsync 
     
    20472060      \rm out_rsync 
    20482061      IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2062      sleep $DELAI 
    20492063    else 
    20502064      \rm out_rsync 
     
    20832097      \rm out_rsync 
    20842098      IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2099      sleep $DELAI 
    20852100    else 
    20862101      \rm out_rsync 
     
    21192134      \rm out_rsync 
    21202135      IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2136      sleep $DELAI 
    21212137    else 
    21222138      \rm out_rsync 
     
    21552171      \rm out_rsync 
    21562172      IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2173      sleep $DELAI 
    21572174    else 
    21582175      \rm out_rsync 
     
    21912208      \rm out_rsync 
    21922209      IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     2210      sleep $DELAI 
    21932211    else 
    21942212      \rm out_rsync 
Note: See TracChangeset for help on using the changeset viewer.