Skip to content

Commit 30fbd98

Browse files
committed
debugging
1 parent a30c2b8 commit 30fbd98

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

include/wrench/simgrid_S4U_util/S4U_Daemon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace wrench {
5252
* which then causes memory errors when freeing communications
5353
* these actors were involved in
5454
*/
55-
static std::set<std::shared_ptr<S4U_Daemon>> running_actors;
55+
// static std::set<std::shared_ptr<S4U_Daemon>> running_actors;
5656

5757

5858
/** @brief The name of the daemon */

src/wrench/simgrid_S4U_util/S4U_Daemon.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ std::unordered_map<std::string, unsigned long> num_actors;
3030
namespace wrench {
3131

3232
std::unordered_map<aid_t, S4U_CommPort *> S4U_Daemon::map_actor_to_recv_commport;
33-
std::set<std::shared_ptr<S4U_Daemon>> S4U_Daemon::running_actors;
33+
// std::set<std::shared_ptr<S4U_Daemon>> S4U_Daemon::running_actors;
3434

3535
int S4U_Daemon::num_non_daemonized_actors_running = 0;
3636

@@ -82,6 +82,8 @@ namespace wrench {
8282
this->has_returned_from_main = false;
8383

8484
// std::cerr << "IN DAEMON CONSTRUCTOR: " << this->process_name << "\n";
85+
this->commport = S4U_CommPort::getTemporaryCommPort();
86+
this->recv_commport = S4U_CommPort::getTemporaryCommPort();
8587
}
8688

8789
S4U_Daemon::~S4U_Daemon() {
@@ -259,15 +261,15 @@ namespace wrench {
259261
* @brief Method that run's the user-defined main method (that's called by the S4U actor class)
260262
*/
261263
void S4U_Daemon::runMainMethod() {
262-
this->commport = S4U_CommPort::getTemporaryCommPort();
263-
this->recv_commport = S4U_CommPort::getTemporaryCommPort();
264+
// this->commport = S4U_CommPort::getTemporaryCommPort();
265+
// this->recv_commport = S4U_CommPort::getTemporaryCommPort();
264266
// Set the commport receiver
265267
// Causes Mailbox::put() to no longer implement a rendez-vous communication.
266268
this->commport->s4u_mb->set_receiver(this->s4u_actor);
267269
// this->recv_commport->set_receiver(this->s4u_actor);
268270

269271
S4U_Daemon::map_actor_to_recv_commport[simgrid::s4u::this_actor::get_pid()] = this->recv_commport;
270-
S4U_Daemon::running_actors.insert(this->getSharedPtr<S4U_Daemon>());
272+
// S4U_Daemon::running_actors.insert(this->getSharedPtr<S4U_Daemon>());
271273

272274
this->num_starts++;
273275
// Compute zero flop so that nothing happens
@@ -283,7 +285,7 @@ namespace wrench {
283285
S4U_CommPort::retireTemporaryCommPort(this->commport);
284286
this->recv_commport->s4u_mb->set_receiver(nullptr);
285287
S4U_CommPort::retireTemporaryCommPort(this->recv_commport);
286-
S4U_Daemon::running_actors.erase(this->getSharedPtr<S4U_Daemon>());
288+
// S4U_Daemon::running_actors.erase(this->getSharedPtr<S4U_Daemon>());
287289
}
288290

289291

0 commit comments

Comments
 (0)