Ignore:
Timestamp:
08/14/13 14:17:29 (11 years ago)
Author:
sdipsl
Message:

Once per simulation send email containing estimated consumed hours for the whole simulation and a recommended PeriodNb?

File:
1 edited

Legend:

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

    r918 r922  
    256256  fi 
    257257 
    258   if ( ${ExitFlag} ) ; then 
     258  if [ X${1} = XAccounting ] ; then 
     259    status=Accounting 
     260    mailText=jobAccounting.mail 
     261  elif ( ${ExitFlag} ) ; then 
    259262    status=failed 
     263    mailText=jobEnd.mail 
    260264  else 
    261265    status=completed 
    262   fi 
    263  
    264   cat  << END_MAIL > job_end.mail 
    265 Dear ${LOGIN}, 
    266  
    267   Simulation ${config_UserChoices_JobName} is ${status} on supercomputer `hostname`. 
    268   Job started : ${DateBegin} 
    269   Job ended   : ${DateEnd} 
    270   Output files are available in ${R_SAVE} 
    271   Files to be rebuild are temporarily available in ${REBUILD_DIR} 
    272   Pre-packed files are temporarily available in ${R_BUFR} 
    273   Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 
    274 END_MAIL 
     266    mailText=jobEnd.mail 
     267  fi 
     268 
     269  # Update selected mail template 
     270  while read -r line; do 
     271    eval echo $line >> mail.txt ; 
     272  done < ${libIGCM}/libIGCM_sys/${mailText} 
    275273 
    276274  if [ ! -z ${config_UserChoices_MailName} ] ; then 
    277     mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail 
     275    mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
    278276  elif [ -f ~/.forward ] ; then 
    279     mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
     277    mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
    280278  fi 
    281279 
    282280  sleep 10 
    283   rm -f job_end.mail 
    284  
    285   if [ $? -gt 0 ] ; then 
    286     echo "IGCM_sys_SendMail : erreur." 
    287     IGCM_debug_Exit "IGCM_sys_SendMail" 
    288   fi 
     281  rm -f mail.txt 
     282 
    289283  IGCM_debug_PopStack "IGCM_sys_SendMail" 
    290284} 
     
    14821476#D-#================================================== 
    14831477#D-function IGCM_sys_rebuild_station 
    1484 #D-* Purpose: rebuild parallel files describing station  
     1478#D-* Purpose: rebuild parallel files describing station 
    14851479#D-* Examples: 
    14861480#D- 
     
    15111505  IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 
    15121506 
    1513   # Station re-ordering is too expansive to be run within libICGM 
     1507  # Station re-ordering is too expansive to be run within libIGCM 
    15141508  # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 
    15151509  # This re-ordering must be done "in memory" by the cmorization process 
Note: See TracChangeset for help on using the changeset viewer.