Ignore:
Timestamp:
08/25/17 12:39:18 (7 years ago)
Author:
sdipsl
Message:
  • #337 and #338 source the appropriate .env_intel depending on compiler used. Dont use .atlas something anymore.
  • #337 and #338 on Curie only for the moment.
  • #336 load the appropriate nco on Ada
File:
1 edited

Legend:

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

    r1401 r1409  
    955955 
    956956#======================================================================= 
     957function 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#======================================================================= 
    9571016function IGCM_comp_PeriodStart 
    9581017{ 
     
    14281487  IGCM_debug_PushStack "IGCM_comp_Update" 
    14291488 
    1430     # Debug Print : 
     1489  # Debug Print : 
    14311490  echo 
    14321491  IGCM_debug_Print 1 "IGCM_comp_Update" 
    14331492  echo 
    14341493 
    1435   typeset ExeNameIn ExeNameOut 
    14361494  typeset comp compname comptagname 
    14371495  for comp in ${config_ListOfComponents[*]} ; do 
     
    14391497    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
    14401498    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 
    1441  
    1442     # Copy executable for this component 
    1443     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} ] ; then 
    1448       IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}" 
    1449     fi 
    1450  
    1451     if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then 
    1452       eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut} 
    1453       if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then 
    1454         eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut} 
    1455       fi 
    1456     elif [ -f ${R_EXE}/${ExeNameIn} ] && [ ! -f ${RUN_DIR}/${ExeNameOut} ] ; then 
    1457       eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut} 
    1458       if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then 
    1459         eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut} 
    1460       fi 
    1461     fi 
    14621499 
    14631500    # Debug Print 
Note: See TracChangeset for help on using the changeset viewer.