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
SMPI init: stringify and rename a variable
[simgrid.git]
/
src
/
smpi
/
include
/
smpi_actor.hpp
diff --git
a/src/smpi/include/smpi_actor.hpp
b/src/smpi/include/smpi_actor.hpp
index
0f1a13e
..
a0ee3b2
100644
(file)
--- a/
src/smpi/include/smpi_actor.hpp
+++ b/
src/smpi/include/smpi_actor.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-201
9
. 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. */
/* 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. */
@@
-15,11
+15,10
@@
namespace simgrid {
namespace smpi {
class ActorExt {
namespace smpi {
class ActorExt {
-private:
double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
- s
imgrid::s4u::MailboxPtr
mailbox_;
- s
imgrid::s4u::MailboxPtr
mailbox_small_;
-
xbt_mutex_t
mailboxes_mutex_;
+ s
4u::Mailbox*
mailbox_;
+ s
4u::Mailbox*
mailbox_small_;
+
s4u::MutexPtr
mailboxes_mutex_;
xbt_os_timer_t timer_;
MPI_Comm comm_self_ = MPI_COMM_NULL;
MPI_Comm comm_intra_ = MPI_COMM_NULL;
xbt_os_timer_t timer_;
MPI_Comm comm_self_ = MPI_COMM_NULL;
MPI_Comm comm_intra_ = MPI_COMM_NULL;
@@
-28,20
+27,29
@@
private:
int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */
std::string instance_id_;
bool replaying_ = false; /* is the process replaying a trace */
int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */
std::string instance_id_;
bool replaying_ = false; /* is the process replaying a trace */
- s
imgrid::s
4u::Barrier* finalization_barrier_;
+ s4u::Barrier* finalization_barrier_;
smpi_trace_call_location_t trace_call_loc_;
smpi_trace_call_location_t trace_call_loc_;
- s
imgrid::s4u::ActorPtr actor_
= nullptr;
+ s
4u::ActorPtr actor_
= nullptr;
smpi_privatization_region_t privatized_region_ = nullptr;
smpi_privatization_region_t privatized_region_ = nullptr;
- int optind = 0; /*for getopt replacement */
+#ifdef __linux__
+ int optind_ = 0; /*for getopt replacement */
+#else
+ int optind_ = 1; /*for getopt replacement */
+#endif
+ std::string tracing_category_ = "";
+ MPI_Info info_env_;
+
#if HAVE_PAPI
/** Contains hardware data as read by PAPI **/
int papi_event_set_;
papi_counter_t papi_counter_data_;
#endif
public:
#if HAVE_PAPI
/** Contains hardware data as read by PAPI **/
int papi_event_set_;
papi_counter_t papi_counter_data_;
#endif
public:
- explicit ActorExt(simgrid::s4u::ActorPtr actor, simgrid::s4u::Barrier* barrier);
+ explicit ActorExt(s4u::ActorPtr actor, s4u::Barrier* barrier);
+ ActorExt(const ActorExt&) = delete;
+ ActorExt& operator=(const ActorExt&) = delete;
~ActorExt();
~ActorExt();
- void set_data(
int* argc, char*** argv
);
+ void set_data(
const std::string& instance_id
);
void finalize();
int finalized();
int initializing();
void finalize();
int finalized();
int initializing();
@@
-49,12
+57,14
@@
public:
void mark_as_initialized();
void set_replaying(bool value);
bool replaying();
void mark_as_initialized();
void set_replaying(bool value);
bool replaying();
+ void set_tracing_category(const std::string& category) { tracing_category_ = category; }
+ const std::string& get_tracing_category() { return tracing_category_; }
smpi_trace_call_location_t* call_location();
void set_privatized_region(smpi_privatization_region_t region);
smpi_privatization_region_t privatized_region();
smpi_trace_call_location_t* call_location();
void set_privatized_region(smpi_privatization_region_t region);
smpi_privatization_region_t privatized_region();
- s
mx_mailbox_t mailbox();
- s
mx_mailbox_t mailbox_small();
-
xbt_mutex_t
mailboxes_mutex();
+ s
4u::Mailbox* mailbox() { return mailbox_; }
+ s
4u::Mailbox* mailbox_small() { return mailbox_small_; }
+
s4u::MutexPtr
mailboxes_mutex();
#if HAVE_PAPI
int papi_event_set();
papi_counter_t& papi_counters();
#if HAVE_PAPI
int papi_event_set();
papi_counter_t& papi_counters();
@@
-68,10
+78,11
@@
public:
void set_comm_intra(MPI_Comm comm);
void set_sampling(int s);
int sampling();
void set_comm_intra(MPI_Comm comm);
void set_sampling(int s);
int sampling();
- static void init(
int* argc, char*** argv
);
- s
imgrid::s
4u::ActorPtr get_actor();
+ static void init();
+ s4u::ActorPtr get_actor();
int get_optind();
void set_optind(int optind);
int get_optind();
void set_optind(int optind);
+ MPI_Info info_env();
};
} // namespace smpi
};
} // namespace smpi