Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 27 May 2016 14:41:10 +0000 (16:41 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 27 May 2016 14:41:10 +0000 (16:41 +0200)
examples/smpi/trace_call_location/trace_call_location.tesh
src/smpi/private.hpp
src/smpi/smpi_bench.cpp

index 0d23db6..0e018eb 100644 (file)
@@ -13,6 +13,6 @@ $ ../../smpi_script/bin/smpirun -trace -trace-file smpi_trace.trace -hostfile ${
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP-gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/trace-call-location' to '1'
 
-$ grep --quiet "12 0.000000 2 1 5 .*trace_call_location\.c\" 14$" smpi_trace.trace 
+$ grep --quiet "12 0.000000 2 1 5 .*trace_call_location\.c\" 14$" ${srcdir:=.}/../smpi_trace.trace 
 
 $ rm -f smpi_trace.trace 
index 5323374..a384ac7 100644 (file)
@@ -19,6 +19,8 @@ XBT_PRIVATE int smpi_process_event_set(void);
 extern std::unordered_map<std::string, double> location2speedup;
 
 /** @brief Returns the last call location (filename, linenumber). Process-specific. */
+extern "C" {
 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(void);
 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
+}
 #endif
index 31dce5b..de5c96e 100644 (file)
@@ -738,11 +738,11 @@ void smpi_destroy_global_memory_segments(){
 #endif
 }
 
-smpi_trace_call_location_t* smpi_trace_get_call_location() {
-  return smpi_process_get_call_location();
-}
-
 extern "C" { /** These functions will be called from the user code **/
+  smpi_trace_call_location_t* smpi_trace_get_call_location() {
+    return smpi_process_get_call_location();
+  }
+
   void smpi_trace_set_call_location(const char* file, const int line) {
     smpi_trace_call_location_t* loc = smpi_process_get_call_location();