Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the compilation without SMPI
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 3 Sep 2016 13:38:39 +0000 (15:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 3 Sep 2016 13:38:42 +0000 (15:38 +0200)
This is to avoid a "undefined reference: parse_factor". The SMPI
network model is not available anymore when SMPI is compiled out.

src/surf/surf_interface.cpp
tools/cmake/DefinePackages.cmake

index c9590e8..c18df99 100644 (file)
@@ -76,6 +76,15 @@ s_surf_model_description_t surf_network_model_description[] = {
   {nullptr, nullptr, nullptr}      /* this array must be nullptr terminated */
 };
 
+#if ! HAVE_SMPI
+void surf_network_model_init_SMPI() {
+  xbt_die("Please activate SMPI support in cmake to use the SMPI network model.");
+}
+void surf_network_model_init_IB() {
+  xbt_die("Please activate SMPI support in cmake to use the IB network model.");
+}
+#endif
+
 s_surf_model_description_t surf_cpu_model_description[] = {
   {"Cas01", "Simplistic CPU model (time=size/power).", surf_cpu_model_init_Cas01},
   {nullptr, nullptr,  nullptr}      /* this array must be nullptr terminated */
index ba6c3c0..ff7d97a 100644 (file)
@@ -242,6 +242,9 @@ set(SMPI_SRC
   src/smpi/smpi_topo.cpp
   src/smpi/smpi_utils.cpp
   src/smpi/smpi_f77.cpp
+  
+  src/surf/network_smpi.cpp
+  src/surf/network_ib.cpp
   )
 
 set(XBT_SRC
@@ -315,8 +318,6 @@ set(SURF_SRC
   src/surf/network_cm02.cpp
   src/surf/network_constant.cpp
   src/surf/network_interface.cpp
-  src/surf/network_smpi.cpp
-  src/surf/network_ib.cpp
   src/surf/plugins/energy.cpp
   src/surf/PropertyHolder.cpp
   src/surf/sg_platf.cpp