Changeset 1277


Ignore:
Timestamp:
01/22/16 12:11:38 (8 years ago)
Author:
sdipsl
Message:
  • Restrict random error generation to computing task type for the moment
  • Add missing information to the code message 0000
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r1275 r1277  
    365365    # PROBABILITY ERROR IS 0.0001 PER COMMAND OR FUNCTION CALL 
    366366    # THERE ARE ~500 COMMAND OR FUNCTION CALL PER PERIOD 
    367     if ( ${RandomError} ) ; then 
    368       if [ $((RANDOM%10000)) -le 10 ] ; then 
    369         IGCM_debug_Print 1 "Random error has been triggered" 
    370         if [ X${ActivateStackFilling} = Xtrue ] ; then 
    371           echo "RANDOM ERROR" >> ${StackFileLocation}/${StackFileName} 
     367    # ONLY WHEN TaskType is "computing". 
     368    if [ X${ActivateBigBro} = Xtrue ] ; then 
     369      if [ X${TaskType} = Xcomputing ]; then 
     370        if ( ${RandomError} ) ; then 
     371          if [ $((RANDOM%10000)) -le 10 ] ; then 
     372            IGCM_debug_Print 1 "Random error has been triggered" 
     373            if [ X${ActivateStackFilling} = Xtrue ] ; then 
     374              echo "RANDOM ERROR" >> ${StackFileLocation}/${StackFileName} 
     375            fi 
     376            ExitFlag=true 
     377          fi 
    372378        fi 
    373         ExitFlag=true 
    374379      fi 
    375380    fi 
     
    609614        genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"msgProducerVersion\":\"${libIGCMVersion}\",\"activity\":\"IPSL\",\"name\":\"${config_UserChoices_JobName}\",\"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}\"" ) 
    610615        # RabbitMQ message body with specific fields associated message codes treated here 
    611         Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     616        Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"jobSchedulerID\":\"${jobSchedulerID}\",\"jobSubmissionPath\":\"${SUBMIT_DIR}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
    612617        # Fill the rabbitMQ queue (the config.card in use will be sent) 
    613618        IGCM_debug_sendAMQP activate 
Note: See TracChangeset for help on using the changeset viewer.