Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Move SMPI_PRIVATIZATION_* macros to enums
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 6 Jul 2017 17:08:02 +0000 (19:08 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 6 Jul 2017 17:09:31 +0000 (19:09 +0200)
I didn't see any reason this should be a macro. The naming is still
the same and certainly ugly, but this should be better for the moment.

src/simix/ActorImpl.cpp
src/simix/smx_global.cpp
src/smpi/private.h
src/smpi/private.hpp
src/smpi/smpi_comm.cpp
src/smpi/smpi_datatype.cpp
src/smpi/smpi_global.cpp
src/smpi/smpi_op.cpp
src/smpi/smpi_process.cpp
src/smpi/smpi_request.cpp

index 9cc63bb..4d2b7ba 100644 (file)
@@ -31,7 +31,7 @@
 #include "src/surf/surf_interface.hpp"
 
 #ifdef HAVE_SMPI
-#include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX (process)");
index 376c1b9..ab65eeb 100644 (file)
@@ -44,6 +44,7 @@
 
 #if HAVE_SMPI
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #endif
 
 XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
index 13eb9f9..d307b72 100644 (file)
@@ -75,13 +75,6 @@ XBT_PRIVATE void smpi_mpi_init();
 // utilities
 extern XBT_PRIVATE double smpi_cpu_threshold;
 extern XBT_PRIVATE double smpi_host_speed;
-
-#define SMPI_PRIVATIZE_NONE 0
-#define SMPI_PRIVATIZE_MMAP 1
-#define SMPI_PRIVATIZE_DLOPEN 2
-#define SMPI_PRIVATIZE_DEFAULT SMPI_PRIVATIZE_MMAP
-extern XBT_PRIVATE int smpi_privatize_global_variables;
-
 extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable
 extern XBT_PRIVATE int smpi_size_data_exe; //size of the data+bss segment of the executable
 
index 87d51f8..4682540 100644 (file)
@@ -33,5 +33,15 @@ extern "C" {
 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location();
 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
 }
+
+typedef enum {
+  SMPI_PRIVATIZE_NONE    = 0,
+  SMPI_PRIVATIZE_MMAP    = 1,
+  SMPI_PRIVATIZE_DLOPEN  = 2,
+  SMPI_PRIVATIZE_DEFAULT = SMPI_PRIVATIZE_MMAP
+} smpi_priv_strategies;
+
+extern XBT_PRIVATE int smpi_privatize_global_variables;
+
 #endif
 
index d5ac71c..316880d 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "src/simix/smx_private.h"
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_comm.hpp"
 #include "src/smpi/smpi_coll.hpp"
 #include "src/smpi/smpi_datatype.hpp"
index d93fc2d..de74190 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "simgrid/modelchecker.h"
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_datatype_derived.hpp"
 #include "src/smpi/smpi_op.hpp"
 #include "src/smpi/smpi_process.hpp"
index 4a0758d..afa8e58 100644 (file)
@@ -12,6 +12,7 @@
 #include "src/smpi/SmpiHost.hpp"
 #include "xbt/config.hpp"
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_coll.hpp"
 #include "src/smpi/smpi_comm.hpp"
 #include "src/smpi/smpi_group.hpp"
index 9cd6612..4f52efe 100644 (file)
@@ -4,6 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_datatype.hpp"
 #include "src/smpi/smpi_op.hpp"
 #include "src/smpi/smpi_process.hpp"
index 60f5760..a7da2c8 100644 (file)
@@ -8,6 +8,7 @@
 #include "src/msg/msg_private.h"
 #include "src/simix/smx_private.h"
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_process.hpp"
 #include "src/smpi/smpi_group.hpp"
 #include "src/smpi/smpi_comm.hpp"
index e3d477b..19c5497 100644 (file)
@@ -10,6 +10,7 @@
 #include "src/mc/mc_replay.h"
 #include "src/smpi/SmpiHost.hpp"
 #include "src/smpi/private.h"
+#include "src/smpi/private.hpp"
 #include "src/smpi/smpi_comm.hpp"
 #include "src/smpi/smpi_datatype.hpp"
 #include "src/smpi/smpi_op.hpp"