Changeset 523


Ignore:
Timestamp:
12/05/11 10:47:17 (12 years ago)
Author:
mmaipsl
Message:

insert SaveSourceModifications?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r522 r523  
    572572 
    573573#=================================== 
     574function IGCM_config_SaveSourceModifications 
     575{ 
     576    IGCM_debug_PushStack "IGCM_config_SaveSourceModifications" 
     577#set -vx 
     578    echo "In SaveSourceModifications." 
     579 
     580    ExeOutDateMax=$1 
     581 
     582    listVarEnv="MODIPSL,ExeOutDateMax,R_OUT_EXE,PREFIX,SUBMIT_DIR" 
     583    IGCM_sys_RshMaster "export MODIPSL=${MODIPSL};\ 
     584       export ExeOutDateMax=${ExeOutDateMax};\ 
     585       export R_OUT_EXE=${R_OUT_EXE};\ 
     586       export PREFIX=${PREFIX};\ 
     587       export SUBMIT_DIR=${SUBMIT_DIR};\ 
     588       export listVarEnv=${listVarEnv};\ 
     589       Script_Output=out_SaveSourceModifications;\ 
     590       IGCM_sys_Qsub ${libIGCM}/SaveSourceModifications" 
     591 
     592    echo "out SaveSourceModifications." 
     593 
     594    IGCM_debug_PopStack "IGCM_config_SaveSourceModifications" 
     595} 
     596 
     597#=================================== 
    574598function IGCM_config_PeriodEnd 
    575599{ 
     
    593617    typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize 
    594618    typeset comp i     
    595     typeset ExeNameIn ExeNameOut  
     619    typeset ExeNameIn ExeNameOut UpdateExe ExeOutDate ExeOutDateMax 
    596620 
    597621    #==================================# 
     
    619643    NextExeSize="( " 
    620644    (( i=0 )) 
    621  
     645    UpdateExe=false 
     646    (( ExeOutDateMax = 0 )) 
    622647    for comp in ${config_ListOfComponents[*]} ; do 
    623648 
     
    662687            fi 
    663688            eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw 
     689            UpdateExe=true 
     690 
     691            ExeOutDate=$( ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${ExeNameOut} | gawk -F  ' ' '{print $6}' ) 
     692            ExeOutDateMax=$(( ( $ExeOutDateMax > $ExeOutDate ) ? $ExeOutDateMax : $ExeOutDate )) 
    664693        fi 
    665694    done 
     695 
     696    if ( ${UpdateExe} ) ; then 
     697        echo "Launch SaveSourceModifications." 
     698        IGCM_config_SaveSourceModifications ${ExeOutDateMax} 
     699    fi 
    666700 
    667701    NextExeSize=${NextExeSize}" )" 
Note: See TracChangeset for help on using the changeset viewer.