Changeset 1207


Ignore:
Timestamp:
06/05/15 18:04:20 (9 years ago)
Author:
sdipsl
Message:
  • IGCM_debug_BigBro_Finalize and IGCM_debug_Verif_Exit are in charge of communicating what went wrong for both computing and post-processing jobs. See #252
File:
1 edited

Legend:

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

    r1206 r1207  
    661661          code=0100 
    662662          FlushAMQP=true 
     663        elif ( ${ExitFlag} ) ; then 
     664          # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 
     665          code=9999 
     666          FlushAMQP=true 
    663667        else 
    664668          # RabbitMQ message code "COMPUTING JOB ENDS" 
     
    666670        fi 
    667671      elif [ X${TaskType} = Xpost-processing ]; then 
    668         # RabbitMQ message code "POST-PROCESSING JOB ENDS" 
    669         code=2100 
    670         FlushAMQP=true 
     672        if ( ${ExitFlag} ) ; then 
     673          # RabbitMQ message code "POST-PROCESSING JOB FAILS" 
     674          code=2900 
     675          FlushAMQP=true 
     676          else 
     677          # RabbitMQ message code "POST-PROCESSING JOB ENDS" 
     678          code=2100 
     679          FlushAMQP=true 
     680        fi 
    671681      fi 
    672682      # RabbitMQ message body 
     
    705715  if ( ${ExitFlag} ) ; then 
    706716    echo "IGCM_debug_Verif_Exit : Something wrong happened previously." 
     717    echo "IGCM_debug_Verif_Exit : ERROR and EXIT keyword will help find out where." 
    707718    # Only computing TaskType stops the job for now. 
    708719    if [ X${TaskType} = Xcomputing ] ; then 
    709720      IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Fatal" 
    710       echo "IGCM_debug_Verif_Exit : ERROR and EXIT keyword will help find out where." 
    711721      echo "                        EXIT THE JOB." 
    712722      echo 
    713723      IGCM_debug_CallStack 
    714724 
    715       if [ X${ActivateBigBro} = Xtrue ] ; then 
    716         # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 
    717         code=9999 
    718         # RabbitMQ message body 
    719         Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
    720         # To be sure we flush message buffer and clean up behind us before the end of the simulation 
    721         FlushAMQP=true 
    722         # Fill the rabbitMQ queue 
    723         IGCM_debug_sendAMQP 
    724       fi 
    725  
    726725      # Mail notification 
    727726      IGCM_sys_SendMail 
     727 
     728      # Inform the rabbitMQ queue 
     729      IGCM_debug_BigBro_Finalize 
    728730 
    729731      # And Good Bye 
     
    736738        echo "                        EXIT THE JOB." 
    737739        echo 
     740        IGCM_debug_CallStack 
     741 
    738742        # Mail notification? 
    739743        #IGCM_sys_SendMailPost 
     744 
     745        # Inform the rabbitMQ queue 
     746        IGCM_debug_BigBro_Finalize 
     747 
    740748        # And Good Bye 
    741749        date 
    742750        exit 1 
    743751      else 
    744         echo "Either inside config.card the variable SpaceName is not in PROD" 
    745         echo "or inside the main Job the variable JobType is not in RUN mode" 
     752        echo "In config.card the variable SpaceName is not in PROD" 
    746753        echo "              SO WE DO NOT EXIT THE JOB." 
    747754        echo 
     755 
     756        # Inform the rabbitMQ queue 
     757        IGCM_debug_BigBro_Finalize 
     758 
    748759        date 
    749760      fi 
    750761    elif [ X${TaskType} = Xchecking ] ; then 
    751       echo "Do nothing at the moment" 
     762      echo "Nothing will happen for now" 
    752763    fi 
    753764  fi 
Note: See TracChangeset for help on using the changeset viewer.