Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fix #include of private header.
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 25 May 2016 16:39:20 +0000 (18:39 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 25 May 2016 16:39:20 +0000 (18:39 +0200)
The file src/instr/instr_smpi.h is still included,
but only if TRACE_CALL_LOCATION is set. I need to fix this
later, too.

This commit also moves a private function to the
correct header (smpi/private.hpp)

include/smpi/smpi.h
src/smpi/private.hpp

index d392f25..a06de05 100644 (file)
@@ -14,8 +14,6 @@
 #include <xbt/misc.h>
 #include <xbt/function_types.h>
 
-#include "src/instr/instr_smpi.h"
-
 #ifdef _WIN32
 #define MPI_CALL(type,name,args) \
   type name args; \
@@ -812,12 +810,17 @@ XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (void);
 XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, int iters, double threshold);
 XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line);
 XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line);
+
+/** 
+ * Functions for call location tracing. These functions will be
+ * called from the user's application! (With the __FILE__ and __LINE__ values
+ * passed as parameters.)
+ */
 XBT_PUBLIC(void) smpi_trace_set_call_location(const char *file, int line);
 /** Fortran binding **/
 XBT_PUBLIC(void) smpi_trace_set_call_location_(const char *file, int* line);
 /** Fortran binding + -fsecond-underscore **/
 XBT_PUBLIC(void) smpi_trace_set_call_location__(const char *file, int* line);
-XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(void);
 
 #define SMPI_SAMPLE_LOCAL(iters,thres) for(smpi_sample_1(0, __FILE__, __LINE__, iters, thres); \
                                            smpi_sample_2(0, __FILE__, __LINE__);      \
index f6a71ab..b0433fc 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef SMPI_PRIVATE_HPP
 #define SMPI_PRIVATE_HPP
 
+#include "src/instr/instr_smpi.h"
+
 #ifdef HAVE_PAPI
 typedef 
     std::vector<std::pair</* counter name */std::string, /* counter value */long long>> papi_counter_t;
@@ -10,3 +12,8 @@ XBT_PRIVATE int smpi_process_event_set(void);
 
 extern std::map<std::string, double> location2speedup;
 #endif
+
+/** 
+ * \brief Returns the last call location (filename, linenumber). Process-specific.
+ */
+XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(void);