Ignore:
Timestamp:
10/18/12 09:13:37 (12 years ago)
Author:
sdipsl
Message:
  • prepare sys lib to be able to run/store on scratchdir when running TEST simulation
  • bugfix : rebuild can't overwrite existing files neither write things in a tmp file before moving it to a final file. So we need to clean things up for him
  • cosmetics
File:
1 edited

Legend:

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

    r719 r725  
    143143 
    144144#==================================================== 
    145 #- ARCHIVE (dedicated to large files) 
    146 typeset -r ARCHIVE=${CCCSTOREDIR} 
    147  
    148 #- ARCHIVE (dedicated to small/medium files) 
    149 typeset -r STORAGE=${CCCWORKDIR} 
    150  
    151 #==================================================== 
    152145#- IN 
    153146typeset -r R_IN=${R_IN:=/ccc/work/cont003/dsm/p86ipsl/IGCM} 
     
    155148 
    156149#==================================================== 
     150#- ARCHIVE (dedicated to large files) 
     151typeset ARCHIVE=${CCCSTOREDIR} 
     152 
     153#==================================================== 
     154#- STORAGE (dedicated to small/medium files) 
     155typeset STORAGE=${CCCWORKDIR} 
     156 
     157#==================================================== 
    157158#- R_OUT 
    158 typeset -r R_OUT=${ARCHIVE}/IGCM_OUT 
     159typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    159160 
    160161#==================================================== 
    161162#- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    162 typeset -r R_FIG=${STORAGE}/IGCM_OUT 
     163typeset R_FIG=${STORAGE}/IGCM_OUT 
    163164 
    164165#==================================================== 
     
    207208DEFAULT_NUM_PROC_TOTAL=${BATCH_NUM_PROC_TOT} 
    208209 
     210#D-#================================================== 
     211#D-function IGCM_sys_ChangeArchive 
     212#D-* Purpose: if SpaceName=TEST everything is stored on SCRATCHDIR 
     213#D-* Examples: 
     214#D- 
     215function IGCM_sys_ChangeArchive { 
     216  IGCM_debug_PushStack "IGCM_sys_ChangeArchive" 
     217 
     218  ARCHIVE=${SCRATCHDIR} 
     219  STORAGE=${SCRATCHDIR} 
     220  R_OUT=${ARCHIVE}/IGCM_OUT 
     221  R_FIG=${STORAGE}/IGCM_OUT 
     222 
     223  IGCM_debug_Print 1 "ARCHIVE has been redefined = ${ARCHIVE}" 
     224  IGCM_debug_Print 1 "STORAGE has been redefined = ${STORAGE}" 
     225  IGCM_debug_Print 1 "R_OUT   has been redefined = ${R_OUT}" 
     226  IGCM_debug_Print 1 "R_FIG   has been redefined = ${R_FIG}" 
     227 
     228  IGCM_debug_PopStack "IGCM_sys_ChangeArchive" 
     229} 
    209230 
    210231#D-#================================================== 
     
    13571378  fi 
    13581379 
    1359   typeset NB_ESSAI DELAI status i exist skip  
     1380  typeset NB_ESSAI DELAI status i exist skip 
    13601381 
    13611382  # number of tentative 
     
    18271848  fi 
    18281849 
    1829   typeset NB_ESSAI DELAI status i 
     1850  typeset NB_ESSAI DELAI status i lastArg 
    18301851  # number of tentative 
    18311852  NB_ESSAI=3 
     
    18421863      \rm out_rsync 
    18431864      IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1865      eval lastArg=\$$# 
     1866      \rm ${lastArg} 
    18441867    else 
    18451868      \rm out_rsync 
     
    18491872  done 
    18501873 
    1851   if [ $? -gt 0 ] ; then 
     1874  if [ ${status} -gt 0 ] ; then 
    18521875    echo "IGCM_sys_rebuild : rebuild error" 
    18531876    IGCM_debug_Exit "rebuild" 
     
    18651888  list_opt=$@ 
    18661889 
    1867   # Invert Axis : t,x -> x,t  
     1890  # Invert Axis : t,x -> x,t 
    18681891  #               t,pres,x -> x,t,pres 
    18691892  # So that we can concatenate along x 
     
    19281951#      j3=${proc_stn[${iStation}]} 
    19291952      # Extract station 
    1930       # Invert Axis : t,x -> x,t  
     1953      # Invert Axis : t,x -> x,t 
    19311954      #               t,pres,x -> x,t,pres 
    19321955      # So that we can concatenate along x 
     
    22262249    fi 
    22272250 
    2228   else # Only one executable.  
     2251  else # Only one executable. 
    22292252      # Check has to be added with : 
    22302253      # Job : 
     
    23082331 
    23092332    if [ "${unit_quota}" = "*" ] ; then 
    2310         IGCM_debug_Print 1 "Please, check your quota of volume on scratch" 
    2311         IGCM_debug_Print 1 "More than 100% of your quota is used" 
    2312         IGCM_debug_Print 1 "Use the ccc_quota command to check" 
    2313         IGCM_debug_Print 1 "You must have more than 10% available to run" 
    2314         IGCM_debug_Exit "Not enough space to run ! STOP HERE" 
    2315         IGCM_debug_Verif_Exit 
     2333        IGCM_debug_Print 1 "Please, check your quota of volume on scratch" 
     2334        IGCM_debug_Print 1 "More than 100% of your quota is used" 
     2335        IGCM_debug_Print 1 "Use the ccc_quota command to check" 
     2336        IGCM_debug_Print 1 "You must have more than 10% available to run" 
     2337        IGCM_debug_Exit "Not enough space to run ! STOP HERE" 
     2338        IGCM_debug_Verif_Exit 
    23162339    fi 
    23172340 
     
    23712394 
    23722395    if [ "${unit_quota}" = "*" ] ; then 
    2373         IGCM_debug_Print 1 "Please, check your quota of inode on scratch" 
    2374         IGCM_debug_Print 1 "More than 100% of your quota is used" 
    2375         IGCM_debug_Print 1 "Use the ccc_quota command to check" 
    2376         IGCM_debug_Print 1 "You must have more than 10% available to run" 
    2377         IGCM_debug_Exit "Not enough space to run ! STOP HERE" 
    2378         IGCM_debug_Verif_Exit 
     2396        IGCM_debug_Print 1 "Please, check your quota of inode on scratch" 
     2397        IGCM_debug_Print 1 "More than 100% of your quota is used" 
     2398        IGCM_debug_Print 1 "Use the ccc_quota command to check" 
     2399        IGCM_debug_Print 1 "You must have more than 10% available to run" 
     2400        IGCM_debug_Exit "Not enough space to run ! STOP HERE" 
     2401        IGCM_debug_Verif_Exit 
    23792402    fi 
    23802403 
Note: See TracChangeset for help on using the changeset viewer.