X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0facf52013684615c801816de974754778c9474a..5ed37babb2fa9097abe82df299c0aa259ed84d5a:/src/smpi/include/smpi_actor.hpp diff --git a/src/smpi/include/smpi_actor.hpp b/src/smpi/include/smpi_actor.hpp index 3da3086eb1..f6194db4a5 100644 --- a/src/smpi/include/smpi_actor.hpp +++ b/src/smpi/include/smpi_actor.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2023. 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. */ @@ -9,9 +9,10 @@ #include "private.hpp" #include "simgrid/s4u/Mailbox.hpp" #include "src/instr/instr_smpi.hpp" +#include "xbt/xbt_os_time.h" +#include -namespace simgrid { -namespace smpi { +namespace simgrid::smpi { class ActorExt { double simulated_ = 0 /* Used to time with simulated_start/elapsed */; @@ -36,9 +37,9 @@ class ActorExt { #endif std::string tracing_category_ = ""; MPI_Info info_env_; - void* bsend_buffer_ = nullptr; - int bsend_buffer_size_ = 0; - + void* bsend_buffer_ = nullptr; + int bsend_buffer_size_ = 0; + #if HAVE_PAPI /** Contains hardware data as read by PAPI **/ int papi_event_set_; @@ -56,10 +57,13 @@ public: int finalized() const; int initializing() const; int initialized() const; + int finalizing() const; void mark_as_initialized(); + void mark_as_finalizing(); void set_replaying(bool value); bool replaying() const; - void set_tracing_category(const std::string& category) { tracing_category_ = category; } + std::string get_instance_id() const { return instance_id_;} + void set_tracing_category(std::string_view category) { tracing_category_ = category; } const std::string& get_tracing_category() const { return tracing_category_; } smpi_trace_call_location_t* call_location(); void set_privatized_region(smpi_privatization_region_t region); @@ -75,6 +79,7 @@ public: void simulated_start(); double simulated_elapsed() const; MPI_Comm comm_world() const; + bool comm_self_is_set() const { return (comm_self_ != MPI_COMM_NULL); }; MPI_Comm comm_self(); MPI_Comm comm_intra(); void set_comm_intra(MPI_Comm comm); @@ -89,7 +94,6 @@ public: int set_bsend_buffer(void* buf, int size); }; -} // namespace smpi -} // namespace simgrid +} // namespace simgrid::smpi #endif