Changeset 467


Ignore:
Timestamp:
05/17/11 18:11:55 (13 years ago)
Author:
mafoipsl
Message:

On titane :

  • add RUN_DIR to keep TMPDIR files like in the same directory
  • keep orginal request name in ccc_msub for rebuild job
  • delete temporary files
  • add IGCM_sys_RMRunDir function to support rebuild job on titane itself
File:
1 edited

Legend:

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

    r463 r467  
    151151#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    152152if [ ! X${LSB_QUEUE} = Xmono ] ; then 
    153     typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}} 
     153    typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/RUN_DIR/${LSB_JOBID}} 
    154154else 
    155155    typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/TMPDIR_IGCM/tmp$$} 
     
    246246            IGCM_debug_Exit "IGCM_sys_RshPost" 
    247247        fi 
     248        # delete temporary file 
     249        \rm tmp_IGCM_sys_RshPost_$$ 
    248250    else 
    249251        # number of tentative 
     
    264266        done 
    265267        # delete temporary file 
    266         /bin/rm tmp_IGCM_sys_RshPost_$$ 
     268        \rm tmp_IGCM_sys_RshPost_$$ 
    267269 
    268270        if [ ${status} -gt 0 ] ; then 
     
    577579        echo "IGCM_sys_Qsub :" $@ 
    578580    fi 
    579     /usr/local/bin/ccc_msub -o ${Script_Output} -e ${Script_Output} -r ${config_UserChoices_JobName}.${CumulPeriod} < $1 
     581 
     582    if [ ${config_UserChoices_JobName}.${CumulPeriod} = "." ] ; then 
     583        /usr/local/bin/ccc_msub -o ${Script_Output} -e ${Script_Output} < $1 
     584    else 
     585        /usr/local/bin/ccc_msub -o ${Script_Output} -e ${Script_Output} -r ${config_UserChoices_JobName}.${CumulPeriod} < $1 
     586    fi 
     587 
    580588    if [ $? -gt 0 ] ; then 
    581589        echo "IGCM_sys_Qsub : erreur " $@ 
     
    803811    fi 
    804812    IGCM_debug_PopStack "IGCM_sys_Rm" 
     813} 
     814 
     815#D-#================================================== 
     816#D-function IGCM_sys_RmRunDir 
     817#D-* Purpose: rm tmpdir (dummy function most of the time batch 
     818#D-                      scheduler will do the job) 
     819#D-* Examples: 
     820#D- 
     821function IGCM_sys_RmRunDir { 
     822    IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     823    if ( $DEBUG_sys ) ; then 
     824        echo "IGCM_sys_RmRunDir :" $@ 
     825    fi 
     826 
     827    typeset RET 
     828 
     829    echo rm $@ > out_rsync 2>&1 
     830    \rm $@ >> out_rsync 2>&1 
     831    RET=$? 
     832 
     833    if [ ${RET} -gt 0 ] ; then 
     834        echo "IGCM_sys_RmRunDir : error." 
     835        cat out_rsync 
     836        IGCM_debug_Exit "IGCM_sys_RmRunDir" 
     837    else 
     838        \rm out_rsync 
     839    fi 
     840 
     841    IGCM_debug_PopStack "IGCM_sys_RmRunDir" 
    805842} 
    806843 
Note: See TracChangeset for help on using the changeset viewer.