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_mercurex9.ksh

    r719 r725  
    128128 
    129129#==================================================== 
    130 #- ARCHIVE (dedicated to large files) 
    131 typeset -r ARCHIVE=${CCCSTOREDIR} 
    132  
    133 #- ARCHIVE (dedicated to small/medium files) 
    134 typeset -r STORAGE=${CCCWORKDIR} 
    135  
    136 #==================================================== 
    137130#- IN 
    138131typeset -r R_IN=${R_IN:=/ccc/work/cont003/dsm/p86ipsl/IGCM} 
     
    140133 
    141134#==================================================== 
     135#- ARCHIVE (dedicated to large files) 
     136typeset ARCHIVE=${CCCSTOREDIR} 
     137 
     138#==================================================== 
     139#- STORAGE (dedicated to small/medium files) 
     140typeset STORAGE=${CCCWORKDIR} 
     141 
     142#==================================================== 
    142143#- R_OUT 
    143 typeset -r R_OUT=${ARCHIVE}/IGCM_OUT 
     144typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    144145 
    145146#==================================================== 
    146147#- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    147 typeset -r R_FIG=${STORAGE}/IGCM_OUT 
     148typeset R_FIG=${STORAGE}/IGCM_OUT 
    148149 
    149150#==================================================== 
     
    183184(( DEFAULT_NUM_PROC_ATM = BATCH_NUM_PROC_TOT - 1 )) 
    184185DEFAULT_NUM_PROC_TOTAL=${BATCH_NUM_PROC_TOT} 
     186 
     187#D-#================================================== 
     188#D-function IGCM_sys_ChangeArchive 
     189#D-* Purpose: if SpaceName=TEST everything is stored on SCRATCHDIR 
     190#D-* Examples: 
     191#D- 
     192function IGCM_sys_ChangeArchive { 
     193  IGCM_debug_PushStack "IGCM_sys_ChangeArchive" 
     194 
     195  ARCHIVE=${SCRATCHDIR} 
     196  STORAGE=${SCRATCHDIR} 
     197  R_OUT=${ARCHIVE}/IGCM_OUT 
     198  R_FIG=${STORAGE}/IGCM_OUT 
     199 
     200  IGCM_debug_Print 1 "ARCHIVE has been redefined = ${ARCHIVE}" 
     201  IGCM_debug_Print 1 "STORAGE has been redefined = ${STORAGE}" 
     202  IGCM_debug_Print 1 "R_OUT   has been redefined = ${R_OUT}" 
     203  IGCM_debug_Print 1 "R_FIG   has been redefined = ${R_FIG}" 
     204 
     205  IGCM_debug_PopStack "IGCM_sys_ChangeArchive" 
     206} 
    185207 
    186208#D-#================================================== 
     
    15671589  fi 
    15681590 
    1569   typeset NB_ESSAI DELAI status i 
     1591  typeset NB_ESSAI DELAI status i lastArg 
    15701592  # number of tentative 
    15711593  NB_ESSAI=3 
     
    15821604      \rm out_rsync 
    15831605      IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 
     1606      eval lastArg=\$$# 
     1607      \rm ${lastArg} 
    15841608    else 
    15851609      \rm out_rsync 
     
    15891613  done 
    15901614 
    1591   if [ $? -gt 0 ] ; then 
     1615  if [ ${status} -gt 0 ] ; then 
    15921616    echo "IGCM_sys_rebuild : rebuild error" 
    15931617    IGCM_debug_Exit "rebuild" 
Note: See TracChangeset for help on using the changeset viewer.