Changeset 1076
- Timestamp:
- 10/01/14 11:54:19 (10 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r1057 r1076 1219 1219 echo 1220 1220 1221 if ( $DEBUG_debug ) ; then1222 # Inform the rabbitMQ queue1223 if [ X${ActivateBigBro} = Xtrue ] ; then1224 # RabbitMQ message code1225 code=11001226 # RabbitMQ message body1227 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )1228 # Fill the rabbitMQ queue1229 IGCM_debug_sendAMQP1230 fi1231 fi1232 1233 1221 if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then 1234 1222 #==========================# … … 1245 1233 if ( $DEBUG_debug ) ; then 1246 1234 if [ X${ActivateBigBro} = Xtrue ] ; then 1247 # RabbitMQ message code 1235 # RabbitMQ message code "END OF SIMULATION" 1248 1236 code=0100 1249 1237 # RabbitMQ message body … … 1292 1280 [ X${JobType} = XRUN ] && IGCM_sys_RmRunDir -rf ${RUN_DIR_PATH} 1293 1281 1282 if ( $DEBUG_debug ) ; then 1283 # Inform the rabbitMQ queue 1284 if [ X${ActivateBigBro} = Xtrue ] ; then 1285 # RabbitMQ message code "WAITING" 1286 code=1100 1287 # RabbitMQ message body 1288 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 1289 # Fill the rabbitMQ queue 1290 IGCM_debug_sendAMQP 1291 fi 1292 fi 1293 1294 1294 # To be sure we flush message buffer before exiting the job 1295 1295 FlushAMQP=TRUE -
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1072 r1076 34 34 if ( $DEBUG_debug ) ; then 35 35 if [ X${TaskType} = Xcomputing ]; then 36 typeset StackFileLocation=${StackFileLocation:=${PWD} }36 typeset StackFileLocation=${StackFileLocation:=${PWD}/STACK} 37 37 typeset StackFileName=computing.stack.$$ 38 [ ! -d ${StackFileLocation} ] && mkdir -p ${StackFileLocation} 38 39 elif [ X${TaskType} = Xpost-processing ]; then 39 40 typeset StackFileLocation=${POST_DIR:=${StackFileLocation}} … … 150 151 151 152 typeset b64_encoded_msg mail_recipient 152 typeset buffer send_messages mail_frequency 153 typeset buffer send_messages mail_frequency 153 154 typeset last_mail_date__file 154 155 … … 160 161 mail_frequency=3600 # in seconds 161 162 # use to keep track when was last mail sent (maybe to be replaced with global variable) 162 last_mail_date__file=/tmp/stamp.$$ 163 last_mail_date__file=/tmp/stamp.$$ 163 164 164 165 # init … … 217 218 # Prepare additionnal option 218 219 additionnalOption="-f ${SUBMIT_DIR}/config.card.base64" 219 # 220 # 220 221 initBigBro=true 221 222 else … … 316 317 317 318 if [ X${ActivateBigBro} = Xtrue ] ; then 318 # RabbitMQ message code 319 # RabbitMQ message code "PUSHSTACK" 319 320 code=2000 320 321 # RabbitMQ message body … … 511 512 512 513 if [ X${ActivateBigBro} = Xtrue ] ; then 513 # RabbitMQ message code 514 # RabbitMQ message code "ERROR HAS BEEN TRIGGERED" 514 515 code=9000 515 516 # RabbitMQ message body … … 522 523 echo "< ${IGCM_debug_LenStack} : ${@}" >> ${StackFileLocation}/${StackFileName} 523 524 if [ X${ActivateBigBro} = Xtrue ] ; then 524 # RabbitMQ message code 525 # RabbitMQ message code "POPSTACK" 525 526 code=3000 526 527 # RabbitMQ message body … … 564 565 jobuid=$(uuidgen) 565 566 566 # RabbitMQ message code567 567 if ( ${FirstInitialize} ) ; then 568 # RabbitMQ message code "BEGIN A SIMULATION" 568 569 code=0000 569 570 # create and persist a unique id for this simulation … … 574 575 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"activity\":\"IPSL\",\"name\":\"${config_UserChoices_JobName}\",\"cumulPeriod\":\"${CumulPeriod}\",\"experiment\":\"${config_UserChoices_ExperimentName}\",\"space\":\"${config_UserChoices_SpaceName}\",\"model\":\"${config_UserChoices_TagName}\",\"startDate\":\"${config_UserChoices_DateBegin}\",\"endDate\":\"${config_UserChoices_DateEnd}\",\"login\":\"${LOGIN}\",\"centre\":\"${CENTER}\",\"machine\":\"${MASTER}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 575 576 else 577 # RabbitMQ message code "A NEW JOB IS RUNNING PART OF A SIMULATION" 576 578 code=1000 577 579 # 578 # retrieve this simulation's unique id 580 # retrieve this simulation's unique id 579 581 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration simuid 580 582 simuid=${config_Configuration_simuid} 581 583 582 # Standard fields for message others than the first one. Still subject to change584 # Using standard fields for message others than the first one. Still subject to change 583 585 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 584 586 fi … … 586 588 # RabbitMQ message body with specific fields associated message codes treated here 587 589 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 588 # Fill the rabbitMQ queue (specifying config.card must be send) 590 591 # Fill the rabbitMQ queue (the config.card in use will be sent) 589 592 IGCM_debug_sendAMQP activate 593 594 # NOT VERY NICE BUT ... IT WORKS 595 # Be sure that the genericSimulationID will be small from now on 596 # Using standard fields for messages others than the first one. Still subject to change 597 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 590 598 591 599 # Turn the flag on … … 630 638 631 639 if [ X${ActivateBigBro} = Xtrue ] ; then 632 # RabbitMQ message code 640 # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 633 641 code=9999 634 642 # RabbitMQ message body
Note: See TracChangeset
for help on using the changeset viewer.