Changeset 57


Ignore:
Timestamp:
03/13/09 17:33:37 (15 years ago)
Author:
brocksce
Message:

PB: - Reformat run.card

  • Add monitoring card analysis feature
  • Rename Script_Output
  • Remove obsolete comments in run.card.init
Location:
trunk/libIGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r52 r57  
    55#-Q- platine #BSUB -J ::Jobname::       # nom de la requete 
    66#-Q- platine #BSUB -N                   # message a la fin du job 
    7 #-Q- platine #BSUB -o Script_Output_::Jobname::.1    # nom du fichier de sortie 
     7#-Q- platine #BSUB -o Script_Output_::Jobname::.000001    # nom du fichier de sortie 
    88#-Q- platine #BSUB -n ::JobNumProcTot::             # reservation des processeurs pour le job 
    99#-Q- platine #BSUB -W 1:00           # Limite temps 
     
    1515#-Q- sx8brodie #PBS -m a                   # message a la fin du job 
    1616#-Q- sx8brodie #PBS -j o                   # regroupement des sorties du job : standard error et output 
    17 #-Q- sx8brodie #PBS -o Script_Output_::Jobname::.1  # nom du fichier de sortie 
     17#-Q- sx8brodie #PBS -o Script_Output_::Jobname::.000001  # nom du fichier de sortie 
    1818#-Q- sx8brodie #PBS -S /usr/bin/ksh        # shell de soumission 
    1919#-Q- sx8brodie #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: 
     
    2929#-Q- sx8mercure #PBS -m a                     # message a la fin du job 
    3030#-Q- sx8mercure #PBS -j o                     # regroupement des sorties du job : standard error et output 
    31 #-Q- sx8mercure #PBS -o Script_Output_::Jobname::.1   # nom du fichier de sortie 
     31#-Q- sx8mercure #PBS -o Script_Output_::Jobname::.000001   # nom du fichier de sortie 
    3232#-Q- sx8mercure #PBS -S /usr/bin/ksh          # shell de soumission 
    3333#-Q- sx8mercure #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: 
     
    325325        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} > ${Exe_Output} 2>&1" 
    326326        typeset RET 
     327        RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) 
    327328        ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} > ${Exe_Output} 2>&1 
    328329        RET=$? 
     330        RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' ) 
    329331        if [ ${RET} -gt 0 ] ; then 
    330332            echo "Return code of executable :" ${RET} 
     
    332334            IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/${PREFIX}_${Exe_Output}_error 
    333335        fi 
    334         echo ${REAL_DATE_INIT} >> ${Exe_Output} 
    335         date >> ${Exe_Output} 
     336        echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}" >> ${Exe_Output} 
     337        echo "libIGCM RunDateEnd=${RUN_DATE_END}" >> ${Exe_Output} 
    336338    else 
    337339        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN 
  • trunk/libIGCM/AA_monitoring

    r36 r57  
    9494    if [ ! "X${liste_file_monitoring}" = X ] ; then 
    9595        IGCM_sys_Get /l liste_file_monitoring ${RUN_DIR} 
    96         monitoring01 -q -p ${comp} -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${FER_ATLAS}/${monitoring_file} ${RUN_DIR} 
     96        monitoring01 -q -c ${CARD_DIR} -p ${comp} -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${FER_ATLAS}/${monitoring_file} ${RUN_DIR} 
    9797    fi 
    9898    # 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r52 r57  
    289289            typeset LastPeriod Last_Script_Output_Name 
    290290            (( LastPeriod=CumulPeriod-PeriodNb )) 
    291             Last_Script_Output_Name="${Script_Output_Prefix}_${config_UserChoices_JobName}.${LastPeriod}" 
     291            Last_Script_Output_Name="${Script_Output_Prefix}_${config_UserChoices_JobName}.$( printf "%06d" ${LastPeriod} )" 
    292292            #eval ls -l ${SUBMIT_DIR}/${Last_Script_Output_Name} 
    293293            #eval IGCM_sys_Put_Out ${SUBMIT_DIR}/${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name} > /dev/null 2>&1 
     
    425425 
    426426    # ExeDate = ATM_Jun_12_09:34-SRF_Jun_12_09:34-OCE_Jun_12_09:34-ICE_Jun_12_09:34-CPL_Jun_12_09:33 
     427    # Would be nice to have next line but no way to format ls output (need to ls -l --time-style "+%Y-%m-%dT%H:%M") 
     428    # ExeDate = ATM_2009-06-12T09:34+SRF_2009-06-12T09:34+OCE_2009-06-12T09:34+ICE_2009-06-12T09:34+CPL_2009-06-12T09:34 
    427429    ExeDate="" 
    428430    NextExeSize="( " 
     
    442444            IGCM_sys_FileSize ${LS_bin} ExeSize 
    443445 
    444             set +A LS_comp -- $( ls -l ${LS_bin} ) 
     446            set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} ) 
    445447            if [ X${ExeDate} = X ] ; then  
    446448                # First component exe date 
     
    478480        ExeCpuLog=$( ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt ) 
    479481        RET=$? 
    480         if [ $RET -eq 0 ] ; then  
    481             echo "("${CumulPeriod} " , " ${PeriodDateBegin} " , " ${PeriodDateEnd} \ 
    482                 " , " ${ExeCpuLog} " , "             ${ExeDate}") \\" >> ${SUBMIT_DIR}/run.card 
     482        if [ $RET -eq 0 ] ; then 
     483            # ExeCpuLog variable contents 5 fields 
     484            echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" | \ 
     485             awk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ 
     486                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card 
    483487        fi 
    484488        eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt" 
     
    619623 
    620624        # Name of next Ksh Script output : 
    621         eval Script_Output="${Script_Output_Prefix}_${config_UserChoices_JobName}.${CumulPeriod}" 
     625        eval Script_Output="${Script_Output_Prefix}_${config_UserChoices_JobName}.$( printf "%06d" ${CumulPeriod} )" 
    622626 
    623627        IGCM_debug_Print 1 "Submit next job" 
  • trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk

    r7 r57  
    1313#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC 
    1414# History: 
    15 # Modification: 
     15# Modification: Patrick.Brockmann@cea.fr 
    1616# 
    1717#************************************************************** 
     
    7676 
    7777  counter=0 
    78 #  StartTime=[] 
    79 #  EndTime=[] 
    80   Date_found=0 
    81  
    82  
    83 #   print ENVIRON["LC_ALL"] 
    84 #   ENVIRON["LC_ALL"]="fr_FR" 
    85 #   print ENVIRON["LC_ALL"] 
     78 
    8679} 
    8780 
     
    199192    } 
    200193 
    201     if( info=="Start Time (date)" ) { 
    202       StartTime[counter]=Res 
    203       next   
    204     } 
    205  
    206     if( info=="End   Time (date)" ) { 
    207       EndTime[counter]=Res 
    208       Information_found=0 
    209       next 
    210     } 
    211  
    212194  } 
    213195# Get information with time output on other hosts 
     
    245227 
    246228  } 
    247 # date end 
    248 # date begin 
    249   else if (Date_found == 0 && (match($0, "[a-z]+ *[a-z]+ *[0-9]+ *[0-9][0-9]:[0-9][0-9]:[0-9][0-9] *CET *[0-9]+"))) 
    250   { 
     229 
     230# RUN_DATE_BEGIN 
     231if ($0 ~ /RunDateBegin.*=/) { 
    251232    myprint( "start date" ) 
    252  
    253     Date_found=1 
    254     StartTime[counter]=$0 
    255  
    256   } 
    257   else if (Date_found == 1 && (match($0, "[a-z]+ *[a-z]+ *[0-9]+ *[0-9][0-9]:[0-9][0-9]:[0-9][0-9] *CET *[0-9]+"))) 
    258   { 
     233    split($0,a,"=") 
     234    RunDateBegin=a[2] 
     235} 
     236 
     237# RUN_DATE_END 
     238if ($0 ~ /RunDateEnd.*=/) { 
    259239    myprint( "end date" ) 
    260  
    261     EndTime[counter]=$0 
    262  
    263     exit 
    264  
     240    split($0,a,"=") 
     241    RunDateEnd=a[2] 
    265242  } 
    266243 
     
    293270 
    294271      myprint("Date of executables :") 
    295       for (i=1; i<=counter; i++) {   
    296         myprint("Start Time (date)      :" StartTime[i]) 
    297         myprint("End   Time (date)      :" EndTime[i]) 
    298       } 
    299       printf("%s , %s , %.5f , %.5f , %.5f", StartTime[counter], EndTime[counter], RealTime, UserTime, SysTime)  
     272      myprint("Start Time             :" RunDateBegin) 
     273      myprint("End   Time             :" RunDateEnd) 
     274 
     275      printf("%s %s %.5f %.5f %.5f", RunDateBegin, RunDateEnd, RealTime, UserTime, SysTime)  
    300276      exit(0) 
    301277    } 
  • trunk/libIGCM/run.card.init

    r22 r57  
    55#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC 
    66 
    7 # contient la date du run en cours ou du run en attente  
    8 # last date of loop == .suivi 
     7#======================================================================== 
    98[Configuration] 
    109#last PREFIX 
    1110OldPrefix= 
    12 #Compute date of loop == .suivi 
     11#Compute date of loop 
    1312PeriodDateBegin= 
    1413PeriodDateEnd= 
     
    1716PeriodState="Start" 
    1817 
    19 # contient la trace des executions 
     18#======================================================================== 
    2019[PostProcessing] 
    21 # postraitements state == .date 
    2220 
    2321#RebuildRunning=y/n 
     
    3028SeasonalRunning=n 
    3129 
    32 # machine time == .log 
     30#======================================================================== 
    3331[Log] 
    3432# Executables Size 
    3533LastExeSize=() 
    36 # CumulPeriod | PeriodDateBegin | PeriodDateEnd | RunDateBegin      | RunDateEnd        | RealCpuTime | UserCpuTime | SysCpuTime | ExeDate  
    37 ExeLog = \ 
     34 
     35#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
     36# CumulPeriod | PeriodDateBegin |   PeriodDateEnd |        RunDateBegin |          RunDateEnd |     RealCpuTime |     UserCpuTime |      SysCpuTime | ExeDate 
     37#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
Note: See TracChangeset for help on using the changeset viewer.