Index: trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
===================================================================
--- trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 1401)
+++ trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 1409)
@@ -955,4 +955,63 @@
 
 #=======================================================================
+function IGCM_comp_GetInputBinaryFiles
+{
+  IGCM_debug_PushStack "IGCM_comp_GetInputBinaryFiles"
+
+  # Debug Print :
+  echo
+  IGCM_debug_Print 1 "IGCM_comp_GetInputBinaryFiles"
+  echo
+
+  # Clean up previous pass
+  [ -f ${RUN_DIR}/compiler.txt ] && rm -f ${RUN_DIR}/compiler.txt
+
+  typeset comp ExeNameIn ExeNameOut
+  typeset compilerNmbr compilerUnit compilerFull
+  for comp in ${config_ListOfComponents[*]} ; do
+    # Define component
+
+    # Copy executable for this component
+    eval ExeNameIn=\${config_Executable_${comp}[0]}
+    eval ExeNameOut=\${config_Executable_${comp}[1]}
+
+    # If missing executable and DRYRUN is set to 0 or 1  then stop!
+    if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] &&  [ ! -f ${R_EXE}/${ExeNameIn} ] ; then
+      IGCM_debug_Exit "IGCM_comp_GetInputBinaryFiles missing executable ${ExeNameIn}"
+    fi
+
+    if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then
+      eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}
+      if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then
+        eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}
+      fi
+    elif [ -f ${R_EXE}/${ExeNameIn} ] && [ ! -f ${RUN_DIR}/${ExeNameOut} ] ; then
+      eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}
+      if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then
+        eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}
+      fi
+    fi
+
+    if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then
+      # Get the compiler version
+      compilerFull=$( strings ${RUN_DIR}/${ExeNameOut}  | grep "RTL Message Catalog" | gawk '{print $6}' | gawk -F. '{print $1}' )
+      compilerVersion=$( strings ${RUN_DIR}/${ExeNameOut}  | grep "RTL Message Catalog" | gawk '{print $6}' | gawk -F. '{print $1}' )
+      # Save it
+      echo $compilerFull >> ${RUN_DIR}/compiler.txt
+      IGCM_debug_Print 1 "${RUN_DIR}/${ExeNameOut} has been compiled with ${compilerFull}"
+    fi
+  done
+
+  compilerNmbr=$( cat ${RUN_DIR}/compiler.txt | wc -l )
+  compilerUnit=$( cat ${RUN_DIR}/compiler.txt | sort | uniq -c )
+
+  if [ ${compilerNmbr} -ne ${compilerUnit} ]; then
+    IGCM_debug_Exit "Binaries has not been compiled with the same compiler version"
+  fi
+
+  IGCM_debug_PopStack "IGCM_comp_GetInputBinaryFiles"
+}
+
+#=======================================================================
 function IGCM_comp_PeriodStart
 {
@@ -1428,10 +1487,9 @@
   IGCM_debug_PushStack "IGCM_comp_Update"
 
-    # Debug Print :
+  # Debug Print :
   echo
   IGCM_debug_Print 1 "IGCM_comp_Update"
   echo
 
-  typeset ExeNameIn ExeNameOut
   typeset comp compname comptagname
   for comp in ${config_ListOfComponents[*]} ; do
@@ -1439,25 +1497,4 @@
     eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
     eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1
-
-    # Copy executable for this component
-    eval ExeNameIn=\${config_Executable_${comp}[0]}
-    eval ExeNameOut=\${config_Executable_${comp}[1]}
-
-    # If missing executable and DRYRUN is set to 0 or 1  then stop!
-    if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] &&  [ ! -f ${R_EXE}/${ExeNameIn} ] ; then
-      IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}"
-    fi
-
-    if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then
-      eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}
-      if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then
-        eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}
-      fi
-    elif [ -f ${R_EXE}/${ExeNameIn} ] && [ ! -f ${RUN_DIR}/${ExeNameOut} ] ; then
-      eval IGCM_sys_Cp ${R_EXE}/${ExeNameIn} ${ExeNameOut}
-      if [ -f ${RUN_DIR}/${ExeNameOut} ] ; then
-        eval IGCM_sys_Chmod +rx ${RUN_DIR}/${ExeNameOut}
-      fi
-    fi
 
     # Debug Print
