X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/011c27bc18cae21954b6e1c752222c71990ac283..7ef49c428ab0209965a09a36ab28b59789aaa4b5:/src/smpi/smpi_process.cpp diff --git a/src/smpi/smpi_process.cpp b/src/smpi/smpi_process.cpp index 194cca9b84..92d552eaad 100644 --- 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 "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 "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)"); @@ -72,7 +76,7 @@ void Process::set_data(int index, int* argc, char*** argv) instance_id_ = instance_id; index_ = index; - static_cast(SIMIX_process_self()->data)->data = this; + static_cast(SIMIX_process_self()->data)->data = this; 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 -int Process::papi_event_set(void) +int Process::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_; } @@ -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); - 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(xbt_malloc(SIMIX_process_count()*sizeof(int)));