Changeset 1409 for trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
- Timestamp:
- 08/25/17 12:39:18 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r1401 r1409 955 955 956 956 #======================================================================= 957 function IGCM_comp_GetInputBinaryFiles 958 { 959 IGCM_debug_PushStack "IGCM_comp_GetInputBinaryFiles" 960 961 # Debug Print : 962 echo 963 IGCM_debug_Print 1 "IGCM_comp_GetInputBinaryFiles" 964 echo 965 966 # Clean up previous pass 967 [ -f ${RUN_DIR}/compiler.txt ] && rm -f ${RUN_DIR}/compiler.txt 968 969 typeset comp ExeNameIn ExeNameOut 970 typeset compilerNmbr compilerUnit compilerFull 971 for comp in ${config_ListOfComponents[*]} ; do 972 # Define component 973 974 # Copy executable for this component 975 eval ExeNameIn=\${config_Executable_${comp}[0]} 976 eval ExeNameOut=\${config_Executable_${comp}[1]} 977 978 # If missing executable and DRYRUN is set to 0 or 1 then stop! 979 if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] && [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 980 IGCM_debug_Exit "IGCM_comp_GetInputBinaryFiles missing executable ${ExeNameIn}" 981 fi 982 983 if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then 984 eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut} 985 if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then 986 eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut} 987 fi 988 elif [ -f ${R_EXE}/${ExeNameIn} ] && [ ! -f ${RUN_DIR}/${ExeNameOut} ] ; then 989 eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut} 990 if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then 991 eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut} 992 fi 993 fi 994 995 if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then 996 # Get the compiler version 997 compilerFull=$( strings ${RUN_DIR}/${ExeNameOut} | grep "RTL Message Catalog" | gawk '{print $6}' | gawk -F. '{print $1}' ) 998 compilerVersion=$( strings ${RUN_DIR}/${ExeNameOut} | grep "RTL Message Catalog" | gawk '{print $6}' | gawk -F. '{print $1}' ) 999 # Save it 1000 echo $compilerFull >> ${RUN_DIR}/compiler.txt 1001 IGCM_debug_Print 1 "${RUN_DIR}/${ExeNameOut} has been compiled with ${compilerFull}" 1002 fi 1003 done 1004 1005 compilerNmbr=$( cat ${RUN_DIR}/compiler.txt | wc -l ) 1006 compilerUnit=$( cat ${RUN_DIR}/compiler.txt | sort | uniq -c ) 1007 1008 if [ ${compilerNmbr} -ne ${compilerUnit} ]; then 1009 IGCM_debug_Exit "Binaries has not been compiled with the same compiler version" 1010 fi 1011 1012 IGCM_debug_PopStack "IGCM_comp_GetInputBinaryFiles" 1013 } 1014 1015 #======================================================================= 957 1016 function IGCM_comp_PeriodStart 958 1017 { … … 1428 1487 IGCM_debug_PushStack "IGCM_comp_Update" 1429 1488 1430 1489 # Debug Print : 1431 1490 echo 1432 1491 IGCM_debug_Print 1 "IGCM_comp_Update" 1433 1492 echo 1434 1493 1435 typeset ExeNameIn ExeNameOut1436 1494 typeset comp compname comptagname 1437 1495 for comp in ${config_ListOfComponents[*]} ; do … … 1439 1497 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 1440 1498 eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 1441 1442 # Copy executable for this component1443 eval ExeNameIn=\${config_Executable_${comp}[0]}1444 eval ExeNameOut=\${config_Executable_${comp}[1]}1445 1446 # If missing executable and DRYRUN is set to 0 or 1 then stop!1447 if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] && [ ! -f ${R_EXE}/${ExeNameIn} ] ; then1448 IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}"1449 fi1450 1451 if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then1452 eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}1453 if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then1454 eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}1455 fi1456 elif [ -f ${R_EXE}/${ExeNameIn} ] && [ ! -f ${RUN_DIR}/${ExeNameOut} ] ; then1457 eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}1458 if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then1459 eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}1460 fi1461 fi1462 1499 1463 1500 # Debug Print
Note: See TracChangeset
for help on using the changeset viewer.