Changeset 1244
- Timestamp:
- 10/09/15 16:04:04 (9 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r1215 r1244 22 22 echo 23 23 24 typeset comp compname comptagname CompatibilityTagauxprint card_UserChoices first_option option i j24 typeset comp compname comptagname auxprint card_UserChoices first_option option i j 25 25 for comp in ${config_ListOfComponents[*]} ; do 26 26 … … 33 33 IGCM_debug_Print 1 "Initialize ${comp} : ${compname} component." 34 34 35 # Read libIGCM compatibility version in ${compname}.card35 # ${compname}.card PATH 36 36 card=${SUBMIT_DIR}/COMP/${compname}.card 37 IGCM_card_DefineVariableFromOption ${card} Compatibility libIGCM38 39 eval CompatibilityTag=\${${compname}_Compatibility_libIGCM} > /dev/null 2>&140 if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then41 IGCM_debug_Exit "${compname}.card is not compatible with libIGCM version ${libIGCM_CurrentTag} see libIGCM FAQ http://wiki.ipsl.jussieu.fr/wiki_ipsl/IGCMG/libIGCM/DocUtilisateur/FAQ ."42 fi43 37 44 38 # Manage component executable -
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r1242 r1244 25 25 26 26 #================================== 27 typeset option auxprint CompatibilityTag 28 29 #================================== 30 # Read libIGCM compatibility version in config.card 31 IGCM_card_DefineVariableFromOption ${configCardPath} Compatibility libIGCM 32 CompatibilityTag=${config_Compatibility_libIGCM} 33 34 if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then 35 IGCM_debug_Exit "config.card is not compatible with libIGCM version ${libIGCM_CurrentTag} see libIGCM FAQ http://wiki.ipsl.jussieu.fr/wiki_ipsl/IGCMG/libIGCM/DocUtilisateur/FAQ ." 36 fi 27 typeset option auxprint 37 28 38 29 #================================== -
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1243 r1244 29 29 #================================================== 30 30 # GENERATE RANDOM ERROR ; only apply if ( ${DEBUG_debug} ) 31 typeset RandomError=false31 typeset -r RandomError=false 32 32 33 33 #================================================== … … 39 39 # libIGCM_CurrentTag 40 40 # Current libIGCM tag, check compatibilty with *.card 41 typeset -r libIGCM _CurrentTag="1.0"41 typeset -r libIGCMVersion="2.7" 42 42 43 43 #================================================== … … 337 337 IGCM_debug_StackArgs[0]=$(echo ${INPUTS[*]:1} | sed -e "s/\ /\",\"/g" ) 338 338 fi 339 340 # Unplugged message 4000 handling for now. To ease downstream treatment.341 #if [ X${ActivateBigBro} = Xtrue ] ; then342 # # RabbitMQ message code "PUSHSTACK"343 # code=4000344 # # RabbitMQ message body345 # Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${IGCM_debug_Stack[0]}\",\"arguments\":[\"${IGCM_debug_StackArgs[0]}\"],\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )346 # # Fill the rabbitMQ queue347 # IGCM_debug_sendAMQP348 #fi349 339 350 340 # Increment LenStack … … 542 532 543 533 # Unplugged message 4900 handling for now. To ease downstream treatment. 544 #if [ X${ActivateBigBro} = Xtrue ] ; then 545 # # RabbitMQ message code "ERROR HAS BEEN TRIGGERED" 546 # code=4900 547 # # RabbitMQ message body 548 # Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${command}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 549 # # Fill the rabbitMQ queue 550 # IGCM_debug_sendAMQP 551 #fi 534 if [ X${ActivateBigBro} = Xtrue ] ; then 535 if [ X${TaskType} = Xcomputing ]; then 536 # RabbitMQ message code "COMPUTING JOBs COMMAND FAILURE" 537 code=1900 538 elif [ X${TaskType} = Xpost-processing ]; then 539 # RabbitMQ message code "POST-PROCESSING JOBs COMMAND FAILURE" 540 code=2900 541 elif [ X${TaskType} = Xchecking ]; then 542 # RabbitMQ message code "POST-PROCESSING FROM CHECKER JOBs COMMAND FAILURE" 543 code=3900 544 fi 545 # RabbitMQ message body 546 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"command\":\"${command}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 547 548 # Fill the rabbitMQ queue 549 IGCM_debug_sendAMQP 550 fi 552 551 else 553 552 # Inform the stack file … … 555 554 echo "< ${IGCM_debug_LenStack} : ${@}" >> ${StackFileLocation}/${StackFileName} 556 555 fi 557 558 # Unplugged message 4100 handling for now. To ease downstream treatment.559 #if [ X${ActivateBigBro} = Xtrue ] ; then560 # # RabbitMQ message code "POPSTACK"561 # code=4100562 # # RabbitMQ message body563 # Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"nesting\":\"${IGCM_debug_LenStack}\",\"command\":\"${command}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )564 # # Fill the rabbitMQ queue565 # IGCM_debug_sendAMQP566 #fi567 556 fi 568 557 … … 590 579 IGCM_debug_PushStack "IGCM_debug_BigBro_Initialize" 591 580 592 typeset postProcessing Name postProcessingDate postProcessingDimn postProcessingComp postProcessingFile581 typeset postProcessingIDLength postProcessingName postProcessingDate postProcessingDimn postProcessingComp postProcessingFile 593 582 594 583 # Message type standard fields: … … 601 590 # create a unique ID for this specific job 602 591 jobuid=$(uuidgen) 592 593 # get the assigned id by the scheduler for that job 594 IGCM_sys_getJobSchedulerID jobSchedulerID 603 595 604 596 if [ X${TaskType} = Xcomputing ]; then … … 610 602 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration simuid ${simuid} 611 603 # Standard fields for the first message 612 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\" 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}\"" )604 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}\"" ) 613 605 # RabbitMQ message body with specific fields associated message codes treated here 614 606 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) … … 622 614 simuid=${run_Configuration_simuid} 623 615 # Using standard fields for message others than the first one. Still subject to change 624 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\" simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" )616 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"msgProducerVersion\":\"${libIGCMVersion}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 625 617 # RabbitMQ message body with specific fields associated message codes treated here 626 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\" msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" )618 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" )\"}" ) 627 619 # Fill the rabbitMQ queue 628 620 IGCM_debug_sendAMQP … … 632 624 # Be sure that the genericSimulationID will be small from now on 633 625 # Using standard fields for messages others than the first one. Still subject to change 634 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\" simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" )626 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"msgProducerVersion\":\"${libIGCMVersion}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 635 627 636 628 elif [ X${TaskType} = Xpost-processing ]; then … … 641 633 simuid=${run_Configuration_simuid} 642 634 # Using standard fields for message others than the first one. Still subject to change 643 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\" simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" )635 genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"msgProducerVersion\":\"${libIGCMVersion}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 644 636 645 637 # Specify the post-processing task we are dealing with 646 n=$( echo "${Script_Post_Output}" | tr -d -c "\." | wc -c )638 postProcessingIDLength=$( echo "${Script_Post_Output}" | tr -d -c "\." | wc -c ) 647 639 postProcessingName=$( echo "${Script_Post_Output}" | gawk -F. '{print $1}' ) 648 640 postProcessingDate=$( echo "${Script_Post_Output}" | gawk -F. '{print $2}' ) … … 650 642 postProcessingComp="null" 651 643 postProcessingFile="null" 652 if [ ${ n} -eq 3 ] ; then644 if [ ${postProcessingIDLength} -eq 3 ] ; then 653 645 postProcessingDimn=$( echo "${Script_Post_Output}" | gawk -F. '{print $3}' ) 654 elif [ ${ n} -eq 5 ] ; then646 elif [ ${postProcessingIDLength} -eq 5 ] ; then 655 647 postProcessingComp=$( echo "${Script_Post_Output}" | gawk -F. '{print $4}' ) 656 648 postProcessingFile=$( echo "${Script_Post_Output}" | gawk -F. '{print $5}' ) … … 658 650 659 651 # RabbitMQ message body with specific fields associated message codes treated here 660 Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\" msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\",\"postProcessingName\":\"${postProcessingName}\",\"postProcessingDate\":\"${postProcessingDate}\",\"postProcessingDimn\":\"${postProcessingDimn}\",\"postProcessingComp\":\"${postProcessingComp}\",\"postProcessingFile\":\"${postProcessingFile}\"}" )652 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" )\",\"postProcessingName\":\"${postProcessingName}\",\"postProcessingDate\":\"${postProcessingDate}\",\"postProcessingDimn\":\"${postProcessingDimn}\",\"postProcessingComp\":\"${postProcessingComp}\",\"postProcessingFile\":\"${postProcessingFile}\"}" ) 661 653 # Fill the rabbitMQ queue 662 654 IGCM_debug_sendAMQP … … 692 684 elif ( ${ExitFlag} ) ; then 693 685 # RabbitMQ message code "EXIT THE JOBS BECAUSE ERROR(S) HAS BEEN TRIGGERED" 694 code= 9999686 code=1999 695 687 FlushAMQP=true 696 688 else … … 701 693 if ( ${ExitFlag} ) ; then 702 694 # RabbitMQ message code "POST-PROCESSING JOB FAILS" 703 code=29 00695 code=2999 704 696 FlushAMQP=true 705 697 else 706 698 # RabbitMQ message code "POST-PROCESSING JOB ENDS" 707 699 code=2100 700 FlushAMQP=true 701 fi 702 elif [ X${TaskType} = Xchecking ]; then 703 if ( ${ExitFlag} ) ; then 704 # RabbitMQ message code "POST-PROCESSING JOB FAILS" 705 code=3999 706 FlushAMQP=true 707 else 708 # RabbitMQ message code "POST-PROCESSING JOB ENDS" 709 code=3100 708 710 FlushAMQP=true 709 711 fi -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
r1242 r1244 1180 1180 1181 1181 #D-#================================================== 1182 #D-function IGCM_sys_getJobSchedulerID 1183 #D-* Purpose: Get the job ID during execution 1184 #D-* Examples: IGCM_sys_getJobSchedulerID jobSchedulerID 1185 #D- 1186 function IGCM_sys_getJobSchedulerID { 1187 IGCM_debug_PushStack "IGCM_sys_getJobSchedulerID" 1188 if ( $DEBUG_sys ) ; then 1189 echo "IGCM_sys_getJobSchedulerID" 1190 fi 1191 1192 eval ${1}=$( echo $LOADL_STEP_ID | awk -F. '{print $4}' ) 1193 1194 IGCM_debug_PopStack "IGCM_sys_getJobSchedulerID" 1195 } 1196 1197 #D-#================================================== 1182 1198 #D-function IGCM_sys_GetJobID 1183 #D-* Purpose: Check if job_name is currently 1184 #D- running or in queue 1199 #D-* Purpose: Get the job ID from the JobName 1185 1200 #D-* Examples: IGCM_sys_GetJobID ${JobName} ${TargetUsr} JobID 1186 1201 #D- … … 1201 1216 #D-#================================================== 1202 1217 #D-function IGCM_sys_CountJobInQueue 1203 #D-* Purpose: Check if job_name is currently 1204 #D- running or in queue 1218 #D-* Purpose: Count number of users job 1205 1219 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1206 1220 #D- … … 1221 1235 #D-#================================================== 1222 1236 #D-function IGCM_sys_ListJobInQueue 1223 #D-* Purpose: Check if job_name is currently 1224 #D- running or in queue 1237 #D-* Purpose: Produce a list of users jobs 1225 1238 #D-* Examples: IGCM_sys_ListJobInQueue ${User} JobNameList 1226 1239 #D- -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ciclad.ksh
r1239 r1244 1171 1171 1172 1172 #D-#================================================== 1173 #D-function IGCM_sys_getJobSchedulerID 1174 #D-* Purpose: Get the job ID during execution 1175 #D-* Examples: IGCM_sys_getJobSchedulerID jobSchedulerID 1176 #D- 1177 function IGCM_sys_getJobSchedulerID { 1178 IGCM_debug_PushStack "IGCM_sys_getJobSchedulerID" 1179 if ( $DEBUG_sys ) ; then 1180 echo "IGCM_sys_getJobSchedulerID" 1181 fi 1182 1183 eval ${1}=$( echo ${PBS_JOBID} | awk -F. '{print $1}' ) 1184 1185 IGCM_debug_PopStack "IGCM_sys_getJobSchedulerID" 1186 } 1187 1188 #D-#================================================== 1173 1189 #D-function IGCM_sys_GetJobID 1174 #D-* Purpose: Check if job_name is currently 1175 #D- running or in queue 1190 #D-* Purpose: Get the job ID from the JobName 1176 1191 #D-* Examples: IGCM_sys_GetJobID ${JobName} ${TargetUsr} JobID 1177 1192 #D- … … 1191 1206 #D-#================================================== 1192 1207 #D-function IGCM_sys_CountJobInQueue 1193 #D-* Purpose: Check if job_name is currently 1194 #D- running or in queue 1208 #D-* Purpose: Count number of users job 1195 1209 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1196 1210 #D- -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r1240 r1244 1561 1561 1562 1562 #D-#================================================== 1563 #D-function IGCM_sys_getJobSchedulerID 1564 #D-* Purpose: Get the job ID during execution 1565 #D-* Examples: IGCM_sys_getJobSchedulerID jobSchedulerID 1566 #D- 1567 function IGCM_sys_getJobSchedulerID { 1568 IGCM_debug_PushStack "IGCM_sys_getJobSchedulerID" 1569 if ( $DEBUG_sys ) ; then 1570 echo "IGCM_sys_getJobSchedulerID" 1571 fi 1572 1573 eval ${1}=${BRIDGE_MSUB_JOBID} 1574 1575 IGCM_debug_PopStack "IGCM_sys_getJobSchedulerID" 1576 } 1577 1578 #D-#================================================== 1563 1579 #D-function IGCM_sys_GetJobID 1564 #D-* Purpose: Check if job_name is currently 1565 #D- running or in queue 1580 #D-* Purpose: Get the job ID from the JobName 1566 1581 #D-* Examples: IGCM_sys_GetJobID ${JobName} ${TargetUsr} JobID 1567 1582 #D- … … 1582 1597 #D-#================================================== 1583 1598 #D-function IGCM_sys_CountJobInQueue 1584 #D-* Purpose: Check if job_name is currently 1585 #D- running or in queue 1599 #D-* Purpose: Count number of users job 1586 1600 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1587 1601 #D- … … 1602 1616 #D-#================================================== 1603 1617 #D-function IGCM_sys_ListJobInQueue 1604 #D-* Purpose: Check if job_name is currently 1605 #D- running or in queue 1618 #D-* Purpose: Produce a list of users computing jobs (excluding post-processing) 1606 1619 #D-* Examples: IGCM_sys_ListJobInQueue ${User} JobNameList 1607 1620 #D- -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r1239 r1244 1126 1126 1127 1127 #D-#================================================== 1128 #D-function IGCM_sys_getJobSchedulerID 1129 #D-* Purpose: Get the job ID during execution 1130 #D-* Examples: IGCM_sys_getJobSchedulerID jobSchedulerID 1131 #D- 1132 function IGCM_sys_getJobSchedulerID { 1133 IGCM_debug_PushStack "IGCM_sys_getJobSchedulerID" 1134 if ( $DEBUG_sys ) ; then 1135 echo "IGCM_sys_getJobSchedulerID" 1136 fi 1137 1138 eval ${1}="N/A" 1139 1140 IGCM_debug_PopStack "IGCM_sys_getJobSchedulerID" 1141 } 1142 1143 #D-#================================================== 1128 1144 #D-function IGCM_sys_CountJobInQueue 1129 #D-* Purpose: Check if job_name is currently 1130 #D- running or in queue 1145 #D-* Purpose: Count number of users job 1131 1146 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1132 1147 #D- -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
r1239 r1244 1014 1014 #D-#================================================== 1015 1015 #D-function IGCM_sys_CountJobInQueue 1016 #D-* Purpose: Check if job_name is currently 1017 #D- running or in queue 1016 #D-* Purpose: Count number of users job 1018 1017 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1019 1018 #D- -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r1241 r1244 1145 1145 1146 1146 #D-#================================================== 1147 #D-function IGCM_sys_getJobSchedulerID 1148 #D-* Purpose: Get the job ID during execution 1149 #D-* Examples: IGCM_sys_getJobSchedulerID jobSchedulerID 1150 #D- 1151 function IGCM_sys_getJobSchedulerID { 1152 IGCM_debug_PushStack "IGCM_sys_getJobSchedulerID" 1153 if ( $DEBUG_sys ) ; then 1154 echo "IGCM_sys_getJobSchedulerID" 1155 fi 1156 1157 eval ${1}=$( echo ${PBS_JOBID} | awk -F. '{print $1}' ) 1158 1159 IGCM_debug_PopStack "IGCM_sys_getJobSchedulerID" 1160 } 1161 1162 #D-#================================================== 1147 1163 #D-function IGCM_sys_GetJobID 1148 #D-* Purpose: Check if job_name is currently 1149 #D- running or in queue 1164 #D-* Purpose: Get the job ID from the JobName 1150 1165 #D-* Examples: IGCM_sys_GetJobID ${JobName} ${TargetUsr} JobID 1151 1166 #D- … … 1165 1180 #D-#================================================== 1166 1181 #D-function IGCM_sys_CountJobInQueue 1167 #D-* Purpose: Check if job_name is currently 1168 #D- running or in queue 1182 #D-* Purpose: Count number of users job 1169 1183 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 1170 1184 #D-
Note: See TracChangeset
for help on using the changeset viewer.