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
tend to the google coding standards in all S4U API
[simgrid.git]
/
src
/
smpi
/
smpi_process.cpp
diff --git
a/src/smpi/smpi_process.cpp
b/src/smpi/smpi_process.cpp
index
194cca9
..
92d552e
100644
(file)
--- a/
src/smpi/smpi_process.cpp
+++ b/
src/smpi/smpi_process.cpp
@@
-1,13
+1,17
@@
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "mc/mc.h"
#include "mc/mc.h"
-#include "private.h"
-#include "simgrid/s4u/Mailbox.hpp"
-#include "src/kernel/activity/SynchroComm.hpp"
-#include "src/mc/mc_record.h"
#include "src/mc/mc_replay.h"
#include "src/msg/msg_private.h"
#include "src/simix/smx_private.h"
#include "src/mc/mc_replay.h"
#include "src/msg/msg_private.h"
#include "src/simix/smx_private.h"
-#include "surf/surf.h"
-#include "xbt/replay.hpp"
+#include "src/smpi/private.h"
+#include "src/smpi/smpi_process.hpp"
+#include "src/smpi/smpi_group.hpp"
+#include "src/smpi/smpi_comm.hpp"
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
@@
-72,7
+76,7
@@
void Process::set_data(int index, int* argc, char*** argv)
instance_id_ = instance_id;
index_ = index;
instance_id_ = instance_id;
index_ = index;
- static_cast<simgrid::
Msg
ActorExt*>(SIMIX_process_self()->data)->data = this;
+ static_cast<simgrid::
msg::
ActorExt*>(SIMIX_process_self()->data)->data = this;
if (*argc > 3) {
memmove(&(*argv)[0], &(*argv)[2], sizeof(char *) * (*argc - 2));
if (*argc > 3) {
memmove(&(*argv)[0], &(*argv)[2], sizeof(char *) * (*argc - 2));
@@
-191,12
+195,12
@@
xbt_mutex_t Process::mailboxes_mutex()
}
#if HAVE_PAPI
}
#if HAVE_PAPI
-int Process::papi_event_set(
void
)
+int Process::papi_event_set()
{
return papi_event_set_;
}
{
return papi_event_set_;
}
-papi_counter_t& smpi_process_papi_counters(
void
)
+papi_counter_t& smpi_process_papi_counters()
{
return papi_counter_data_;
}
{
return papi_counter_data_;
}
@@
-269,7
+273,7
@@
void Process::init(int *argc, char ***argv){
smx_actor_t proc = SIMIX_process_self();
proc->context->set_cleanup(&MSG_process_cleanup_from_SIMIX);
smx_actor_t proc = SIMIX_process_self();
proc->context->set_cleanup(&MSG_process_cleanup_from_SIMIX);
- int index =
smpi_process_index_of_smx_process(proc)
;
+ int index =
proc->pid - 1
;
if(index_to_process_data == nullptr){
index_to_process_data=static_cast<int*>(xbt_malloc(SIMIX_process_count()*sizeof(int)));
if(index_to_process_data == nullptr){
index_to_process_data=static_cast<int*>(xbt_malloc(SIMIX_process_count()*sizeof(int)));