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

    r918 r922  
    244244  fi 
    245245 
    246   if ( ${ExitFlag} ) ; then 
     246  if [ X${1} = XAccounting ] ; then 
     247    status=Accounting 
     248    mailText=jobAccounting.mail 
     249  elif ( ${ExitFlag} ) ; then 
    247250    status=failed 
     251    mailText=jobEnd.mail 
    248252  else 
    249253    status=completed 
    250   fi 
    251  
    252   cat  << END_MAIL > job_end.mail 
    253 Dear ${LOGIN}, 
    254  
    255   Simulation ${config_UserChoices_JobName} is ${status} on supercomputer `hostname`. 
    256   Job started : ${DateBegin} 
    257   Job ended   : ${DateEnd} 
    258   Output files are available in ${R_SAVE} 
    259   Files to be rebuild are temporarily available in ${REBUILD_DIR} 
    260   Pre-packed files are temporarily available in ${R_BUFR} 
    261   Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 
    262 END_MAIL 
     254    mailText=jobEnd.mail 
     255  fi 
     256 
     257  # Update selected mail template 
     258  while read -r line; do 
     259    eval echo $line >> mail.txt ; 
     260  done < ${libIGCM}/libIGCM_sys/${mailText} 
    263261 
    264262  if [ ! -z ${config_UserChoices_MailName} ] ; then 
    265     mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail 
     263    mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  mail.txt 
    266264  elif [ -f ~/.forward ] ; then 
    267     mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
     265    mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
    268266  fi 
    269267 
    270268  sleep 10 
    271   rm -f job_end.mail 
    272  
    273   if [ $? -gt 0 ] ; then 
    274     echo "IGCM_sys_SendMail : erreur." 
    275     IGCM_debug_Exit "IGCM_sys_SendMail" 
    276   fi 
     269  rm -f mail.txt 
     270 
    277271  IGCM_debug_PopStack "IGCM_sys_SendMail" 
    278272} 
     
    14541448#D-#================================================== 
    14551449#D-function IGCM_sys_rebuild_station 
    1456 #D-* Purpose: rebuild parallel files describing station  
     1450#D-* Purpose: rebuild parallel files describing station 
    14571451#D-* Examples: 
    14581452#D- 
     
    14831477  IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 
    14841478 
    1485   # Station re-ordering is too expansive to be run within libICGM 
     1479  # Station re-ordering is too expansive to be run within libIGCM 
    14861480  # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 
    14871481  # This re-ordering must be done "in memory" by the cmorization process 
Note: See TracChangeset for help on using the changeset viewer.