Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix compilation error for smpi.
authornavarro <navarro@caraja.(none)>
Fri, 19 Oct 2012 15:53:38 +0000 (17:53 +0200)
committernavarro <navarro@caraja.(none)>
Fri, 19 Oct 2012 15:53:38 +0000 (17:53 +0200)
Can enable smpi whitout f2c

buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/Modules/FindF2c.cmake
buildtools/Cmake/PrintArgs.cmake
include/smpi/smpif.h.in
src/smpi/private.h
src/surf/maxmin.c

index fc3baef..f020bf1 100644 (file)
@@ -80,9 +80,7 @@ if(enable_gtnets)
 endif(enable_gtnets)
 if(enable_smpi)
   include(FindF2c)
-  if(HAVE_F2C_H)
-    SET(HAVE_SMPI 1)
-  endif(HAVE_F2C_H)
+  SET(HAVE_SMPI 1)
 endif(enable_smpi)
 if(enable_lua)
   include(FindLua51Simgrid)
index bef6bbc..e73fcc4 100644 (file)
@@ -52,8 +52,11 @@ else(HAVE_F2C_LIB)
   message(STATUS "Looking for lib f2c - not found")
 endif(HAVE_F2C_LIB)
 
+message(STATUS "Looking for bin f2c")
 if(F2C_EXE)
   message(STATUS "Found F2C: ${F2C_EXE}")
+else(F2C_EXE)
+  message(STATUS "Looking for bin f2c - not found")
 endif(F2C_EXE)
 
 mark_as_advanced(HAVE_F2C_H)
@@ -73,4 +76,4 @@ endif(HAVE_F2C_H)
 set(SMPI_F2C 0)
 if(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB)
   set(SMPI_F2C 1)
-endif(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB)
\ No newline at end of file
+endif(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB)
index 8518ffe..26e15db 100644 (file)
@@ -95,7 +95,8 @@ if(NOT APPLE AND NOT WIN32)
   message("        NS-3 path ...........: ${ns3_path}")
 endif(NOT APPLE AND NOT WIN32)
 message("        Compile Lua .........: ${HAVE_LUA}")
-message("        Compile Smpi ........: ${enable_smpi}")
+message("        Compile Smpi ........: ${HAVE_SMPI}")
+message("        Compile Smpi f77 ....: ${SMPI_F2C}")
 message("        Compile Static ......: ${enable_lib_static}")
 message("")
 message("        Maintainer mode .....: ${enable_maintainer_mode}")
index bbcb661..c407af8 100644 (file)
@@ -7,11 +7,9 @@
 #ifndef SMPIF_H
 #define SMPIF_H
 
-#cmakedefine HAVE_F2C_H @HAVE_SMPI_F2C_H@
+#cmakedefine SMPI_F2C @SMPI_F2C@
 
-#ifndef HAVE_F2C_H
-#error F2C is mandatory
-#endif
+#ifdef SMPI_F2C
 
 #include <xbt/misc.h>
 #include <smpi/smpi.h>
@@ -45,3 +43,5 @@ XBT_PUBLIC(int) smpi_global_size(void);
 
 
 #endif
+
+#endif // SMPI_F2C
index 71a9ec8..74b3568 100644 (file)
@@ -11,9 +11,7 @@
 #include "xbt/xbt_os_time.h"
 #include "simgrid/simix.h"
 #include "smpi/smpi.h"
-#ifdef SMPI_F2C
 #include "smpi/smpif.h"
-#endif
 #include "smpi/smpi_cocci.h"
 #include "instr/instr_private.h"
 
index dc00903..ea964d5 100644 (file)
@@ -21,7 +21,7 @@ typedef struct s_dyn_light {
   int size;
 } s_dyn_light_t, *dyn_light_t;
 
-XBT_PUBLIC(double) sg_maxmin_precision = 0.00001;
+XBT_EXPORT_NO_IMPORT(double) sg_maxmin_precision = 0.00001;
 
 static void *lmm_variable_mallocator_new_f(void);
 static void lmm_variable_mallocator_free_f(void *var);