Changeset 922
- Timestamp:
- 08/14/13 14:17:29 (11 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r920 r922 420 420 # DateBegin + CumulPeriod*PeriodLength = PeriodDateBegin 421 421 echo 422 422 423 423 case ${config_UserChoices_PeriodLength} in 424 424 *Y|*y) … … 1108 1108 fi 1109 1109 1110 # Send some accounting element to the user if CumulPeriod=3 1111 if [ ${CumulPeriod} -eq 3 ] ; then 1112 echo 1113 IGCM_debug_Print 1 "Send email containing some accounting information : " 1114 1115 RealCpuTime=$( echo ${ExeCpuLog} | gawk '{print $3}' ) 1116 1117 consumeHoursPerPeriod=$( echo "scale=6;${RealCpuTime}*${PROCESSUS_NUMBER}/3600" | bc ) 1118 1119 consumeHoursPerWholeSimulation=$( echo "scale=6;${consumeHoursPerPeriod}/${PeriodLengthInDays}*${ExperienceLengthInDays}" | bc ) 1120 1121 recommendedPeriodNb=$( echo "scale=6;24/${consumeHoursPerPeriod}*${PROCESSUS_NUMBER}" | bc ) 1122 1123 IGCM_sys_SendMail Accounting 1124 fi 1125 1110 1126 #=================================================# 1111 1127 # Modification of libIGCM behaviour # … … 1280 1296 1281 1297 IGCM_debug_Print 1 "Submit next job" 1282 # SUBMIT NEXT JOB from SUBMIT_DIR and come back in RUN_DIR 1283 IGCM_sys_Cd ${SUBMIT_DIR} 1298 # SUBMIT NEXT JOB from SUBMIT_DIR and come back in RUN_DIR 1299 IGCM_sys_Cd ${SUBMIT_DIR} 1284 1300 # Keep only the 5 latest ${Script_Output_Prefix}_${config_UserChoices_JobName} 1285 1301 ScriptTot=$( ls ${Script_Output_Prefix}_${config_UserChoices_JobName}.?????? 2>/dev/null | wc -l ) -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
r918 r922 297 297 fi 298 298 299 if ( ${ExitFlag} ) ; then 299 if [ X${1} = XAccounting ] ; then 300 status=Accounting 301 mailText=jobAccounting.mail 302 elif ( ${ExitFlag} ) ; then 300 303 status=failed 304 mailText=jobEnd.mail 301 305 else 302 306 status=completed 303 fi 304 305 cat << END_MAIL > job_end.mail 306 Dear ${LOGIN}, 307 308 Simulation ${config_UserChoices_JobName} is ${status} on supercomputer `hostname`. 309 Job started : ${DateBegin} 310 Job ended : ${DateEnd} 311 Output files are available in ${R_SAVE} 312 Files to be rebuild are temporarily available in ${REBUILD_DIR} 313 Pre-packed files are temporarily available in ${R_BUFR} 314 Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 315 END_MAIL 307 mailText=jobEnd.mail 308 fi 309 310 # Update selected mail template 311 while read -r line; do 312 eval echo $line >> mail.txt ; 313 done < ${libIGCM}/libIGCM_sys/${mailText} 316 314 317 315 if [ ! -z ${config_UserChoices_MailName} ] ; then 318 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail316 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 319 317 elif [ -f ~/.forward ] ; then 320 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail318 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 321 319 else 322 mail -s "${config_UserChoices_JobName} ${status}" ${USER} < job_end.mail320 mail -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 323 321 fi 324 322 325 323 sleep 10 326 rm -f job_end.mail 327 328 if [ $? -gt 0 ] ; then 329 echo "IGCM_sys_SendMail : erreur." 330 IGCM_debug_Exit "IGCM_sys_SendMail" 331 fi 324 rm -f mail.txt 325 332 326 IGCM_debug_PopStack "IGCM_sys_SendMail" 333 327 } … … 376 370 mkdir -p $1 377 371 status=$? 378 fi 372 fi 379 373 380 374 if [ ${status} -gt 0 ] ; then … … 969 963 status=$? 970 964 else 971 \cp -r $1 $2 > out_rsync 2>&1 965 \cp -r $1 $2 > out_rsync 2>&1 972 966 status=$? 973 967 fi … … 1671 1665 #D-#================================================== 1672 1666 #D-function IGCM_sys_rebuild_station 1673 #D-* Purpose: rebuild parallel files describing station 1667 #D-* Purpose: rebuild parallel files describing station 1674 1668 #D-* Examples: 1675 1669 #D- … … 1700 1694 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1701 1695 1702 # Station re-ordering is too expansive to be run within libI CGM1696 # Station re-ordering is too expansive to be run within libIGCM 1703 1697 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1704 1698 # This re-ordering must be done "in memory" by the cmorization process -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r918 r922 357 357 function IGCM_sys_SendMail { 358 358 IGCM_debug_PushStack "IGCM_sys_SendMail" $@ 359 360 set -vx 361 359 362 if ( $DEBUG_sys ) ; then 360 363 echo "IGCM_sys_SendMail :" $@ 361 364 fi 362 365 363 if ( ${ExitFlag} ) ; then 366 if [ X${1} = XAccounting ] ; then 367 status=Accounting 368 mailText=jobAccounting.mail 369 elif ( ${ExitFlag} ) ; then 364 370 status=failed 371 mailText=jobEnd.mail 365 372 else 366 373 status=completed 367 fi 368 369 cat << END_MAIL > job_end.mail 370 Dear ${LOGIN}, 371 372 Simulation ${config_UserChoices_JobName} is ${status} on supercomputer `hostname`. 373 Job started : ${DateBegin} 374 Job ended : ${DateEnd} 375 Output files are available in ${R_SAVE} 376 Files to be rebuild are temporarily available in ${REBUILD_DIR} 377 Pre-packed files are temporarily available in ${R_BUFR} 378 Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 379 END_MAIL 374 mailText=jobEnd.mail 375 fi 376 377 # Update selected mail template 378 while read -r line; do 379 eval echo $line >> mail.txt ; 380 done < ${libIGCM}/libIGCM_sys/${mailText} 380 381 381 382 if [ ! -z ${config_UserChoices_MailName} ] ; then 382 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail383 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 383 384 elif [ -f ~/.forward ] ; then 384 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail385 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 385 386 fi 386 387 387 388 sleep 10 388 rm -f job_end.mail 389 390 if [ $? -gt 0 ] ; then 391 echo "IGCM_sys_SendMail : erreur." 392 IGCM_debug_Exit "IGCM_sys_SendMail" 393 fi 389 rm -f mail.txt 390 391 set +vx 392 394 393 IGCM_debug_PopStack "IGCM_sys_SendMail" 395 394 } … … 1913 1912 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1914 1913 1915 # Station re-ordering is too expansive to be run within libI CGM1914 # Station re-ordering is too expansive to be run within libIGCM 1916 1915 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1917 1916 # This re-ordering must be done "in memory" by the cmorization process -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r918 r922 244 244 fi 245 245 246 if ( ${ExitFlag} ) ; then 246 if [ X${1} = XAccounting ] ; then 247 status=Accounting 248 mailText=jobAccounting.mail 249 elif ( ${ExitFlag} ) ; then 247 250 status=failed 251 mailText=jobEnd.mail 248 252 else 249 253 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} 263 261 264 262 if [ ! -z ${config_UserChoices_MailName} ] ; then 265 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail263 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 266 264 elif [ -f ~/.forward ] ; then 267 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail265 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 268 266 fi 269 267 270 268 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 277 271 IGCM_debug_PopStack "IGCM_sys_SendMail" 278 272 } … … 1454 1448 #D-#================================================== 1455 1449 #D-function IGCM_sys_rebuild_station 1456 #D-* Purpose: rebuild parallel files describing station 1450 #D-* Purpose: rebuild parallel files describing station 1457 1451 #D-* Examples: 1458 1452 #D- … … 1483 1477 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1484 1478 1485 # Station re-ordering is too expansive to be run within libI CGM1479 # Station re-ordering is too expansive to be run within libIGCM 1486 1480 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1487 1481 # This re-ordering must be done "in memory" by the cmorization process -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
r918 r922 257 257 fi 258 258 259 if ( ${ExitFlag} ) ; then 259 if [ X${1} = XAccounting ] ; then 260 status=Accounting 261 mailText=jobAccounting.mail 262 elif ( ${ExitFlag} ) ; then 260 263 status=failed 264 mailText=jobEnd.mail 261 265 else 262 266 status=completed 263 fi 264 265 cat << END_MAIL > job_end.mail 266 Dear ${LOGIN}, 267 268 Simulation ${config_UserChoices_JobName} is ${status} on supercomputer `hostname`. 269 Job started : ${DateBegin} 270 Job ended : ${DateEnd} 271 Output files are available in ${R_SAVE} 272 Files to be rebuild are temporarily available in ${REBUILD_DIR} 273 Pre-packed files are temporarily available in ${R_BUFR} 274 Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 275 END_MAIL 267 mailText=jobEnd.mail 268 fi 269 270 # Update selected mail template 271 while read -r line; do 272 eval echo $line >> mail.txt ; 273 done < ${libIGCM}/libIGCM_sys/${mailText} 276 274 277 275 if [ ! -z ${config_UserChoices_MailName} ] ; then 278 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail276 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 279 277 elif [ -f ~/.forward ] ; then 280 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail278 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 281 279 else 282 mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < job_end.mail280 mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 283 281 fi 284 282 285 283 sleep 10 286 rm -f job_end.mail 287 288 if [ $? -gt 0 ] ; then 289 echo "IGCM_sys_SendMail : erreur." 290 IGCM_debug_Exit "IGCM_sys_SendMail" 291 fi 284 rm -f mail.txt 285 292 286 IGCM_debug_PopStack "IGCM_sys_SendMail" 293 287 } … … 1491 1485 #D-#================================================== 1492 1486 #D-function IGCM_sys_rebuild_station 1493 #D-* Purpose: rebuild parallel files describing station 1487 #D-* Purpose: rebuild parallel files describing station 1494 1488 #D-* Examples: 1495 1489 #D- … … 1520 1514 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1521 1515 1522 # Station re-ordering is too expansive to be run within libI CGM1516 # Station re-ordering is too expansive to be run within libIGCM 1523 1517 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1524 1518 # This re-ordering must be done "in memory" by the cmorization process -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r918 r922 256 256 fi 257 257 258 if ( ${ExitFlag} ) ; then 258 if [ X${1} = XAccounting ] ; then 259 status=Accounting 260 mailText=jobAccounting.mail 261 elif ( ${ExitFlag} ) ; then 259 262 status=failed 263 mailText=jobEnd.mail 260 264 else 261 265 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} 275 273 276 274 if [ ! -z ${config_UserChoices_MailName} ] ; then 277 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail275 mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 278 276 elif [ -f ~/.forward ] ; then 279 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail277 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 280 278 fi 281 279 282 280 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 289 283 IGCM_debug_PopStack "IGCM_sys_SendMail" 290 284 } … … 1482 1476 #D-#================================================== 1483 1477 #D-function IGCM_sys_rebuild_station 1484 #D-* Purpose: rebuild parallel files describing station 1478 #D-* Purpose: rebuild parallel files describing station 1485 1479 #D-* Examples: 1486 1480 #D- … … 1511 1505 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1512 1506 1513 # Station re-ordering is too expansive to be run within libI CGM1507 # Station re-ordering is too expansive to be run within libIGCM 1514 1508 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1515 1509 # This re-ordering must be done "in memory" by the cmorization process
Note: See TracChangeset
for help on using the changeset viewer.