A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid into...
[simgrid.git]
/
src
/
smpi
/
smpi_global.cpp
diff --git
a/src/smpi/smpi_global.cpp
b/src/smpi/smpi_global.cpp
index
db6e796
..
595b879
100644
(file)
--- a/
src/smpi/smpi_global.cpp
+++ b/
src/smpi/smpi_global.cpp
@@
-17,12
+17,14
@@
#include "src/msg/msg_private.h"
#include "src/simix/SynchroComm.hpp"
#include "src/msg/msg_private.h"
#include "src/simix/SynchroComm.hpp"
-
-#include <float.h> /* DBL_MAX */
+#include <float.h> /* DBL_MAX */
+#include <fstream>
+#include <map>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fstream>
+#include <string>
+#include <vector>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_kernel, smpi, "Logging specific to SMPI (kernel)");
#include <boost/tokenizer.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_kernel, smpi, "Logging specific to SMPI (kernel)");
#include <boost/tokenizer.hpp>
@@
-59,7
+61,7
@@
typedef struct s_smpi_process_data {
bool replaying; /* is the process replaying a trace */
xbt_bar_t finalization_barrier;
int return_value;
bool replaying; /* is the process replaying a trace */
xbt_bar_t finalization_barrier;
int return_value;
- smpi_trace_call_location_t
*
trace_call_loc;
+ smpi_trace_call_location_t trace_call_loc;
#if HAVE_PAPI
/** Contains hardware data as read by PAPI **/
int papi_event_set;
#if HAVE_PAPI
/** Contains hardware data as read by PAPI **/
int papi_event_set;
@@
-256,7
+258,7
@@
int smpi_process_count()
smpi_trace_call_location_t* smpi_process_get_call_location()
{
smpi_process_data_t process_data = smpi_process_data();
smpi_trace_call_location_t* smpi_process_get_call_location()
{
smpi_process_data_t process_data = smpi_process_data();
- return process_data->trace_call_loc;
+ return
&
process_data->trace_call_loc;
}
int smpi_process_index()
}
int smpi_process_index()
@@
-567,10
+569,6
@@
void smpi_global_init()
process_data[i]->finalization_barrier = nullptr;
process_data[i]->return_value = 0;
process_data[i]->finalization_barrier = nullptr;
process_data[i]->return_value = 0;
- if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
- process_data[i]->trace_call_loc = xbt_new(smpi_trace_call_location_t, 1);
- }
-
#if HAVE_PAPI
if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0') {
// TODO: Implement host/process/thread based counters. This implementation
#if HAVE_PAPI
if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0') {
// TODO: Implement host/process/thread based counters. This implementation
@@
-624,12
+622,9
@@
void smpi_global_destroy()
}
xbt_os_timer_free(process_data[i]->timer);
xbt_mutex_destroy(process_data[i]->mailboxes_mutex);
}
xbt_os_timer_free(process_data[i]->timer);
xbt_mutex_destroy(process_data[i]->mailboxes_mutex);
- if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
- xbt_free(process_data[i]->trace_call_loc);
- }
delete process_data[i];
}
delete process_data[i];
}
- delete process_data;
+ delete
[]
process_data;
process_data = nullptr;
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
process_data = nullptr;
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){