From 594c978fc108c86e61507870cda49428c51b2a3f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 3 Sep 2016 15:38:39 +0200 Subject: [PATCH] fix the compilation without SMPI 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 | 9 +++++++++ tools/cmake/DefinePackages.cmake | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index c9590e81d8..c18df99d40 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -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 */ diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index ba6c3c026e..ff7d97a5f0 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -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 -- 2.20.1