Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Dec 18, 2023
1 parent 07c59bc commit 3f88449
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/wrench/action/FileWriteAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace wrench {
// Thread overhead
Simulation::sleep(action_executor->getThreadCreationOverhead());
// Fix location if scratch
WRENCH_INFO("FILE WRITE: %s", this->file_location->getFile()->getID().c_str());
if (this->file_location->isScratch()) {
auto cs = std::dynamic_pointer_cast<ComputeService>(action_executor->getActionExecutionService()->getParentService());
this->file_location = FileLocation::LOCATION(cs->getScratch(), cs->getScratch()->getBaseRootPath() + this->getJob()->getName(), this->file_location->getFile());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ namespace wrench {
return;
}

std::cerr << "action->NAME: " << action->getName() << "\n";
WRENCH_INFO("Processing ActionDone: %s", action->getName().c_str());

this->dispatched_actions.erase(action);
this->num_dispatched_actions_for_cjob[action->getJob()]--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,10 @@ namespace wrench {

} else if (auto msg = std::dynamic_pointer_cast<ActionExecutorDoneMessage>(message)) {
if (msg->action_executor->getAction()->getState() == Action::State::COMPLETED) {
WRENCH_INFO("IT'S A SUCCESS: %s", msg->action_executor->getAction()->getName().c_str());
processActionExecutorCompletion(msg->action_executor);
} else {
WRENCH_INFO("IT'S A FAILURE: %s", msg->action_executor->getAction()->getName().c_str());
processActionExecutorFailure(msg->action_executor);
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ namespace wrench {

auto msg_to_send_back = new ActionExecutorDoneMessage(this->getSharedPtr<ActionExecutor>());

WRENCH_INFO("Action executor for action %s terminating and action has %s",
this->action->getName().c_str(),
(this->action->getState() == Action::State::COMPLETED ?
"succeeded" :
("failed (" + this->action->getFailureCause()->toString() + ")").c_str()));
try {
this->callback_commport->putMessage(msg_to_send_back);
} catch (ExecutionException &e) {
WRENCH_INFO("Action executor can't report back due to network error.. oh well!");
}
WRENCH_INFO("Action executor for action %s terminating!", this->action->getName().c_str());

return 0;
}
Expand Down
13 changes: 8 additions & 5 deletions src/wrench/simgrid_S4U_util/S4U_CommPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ namespace wrench {
MessageManager::removeReceivedMessage(this, msg);
#endif

WRENCH_INFO("Received a '%s' message from commport '%s'", msg->getName().c_str(), this->get_cname());
WRENCH_INFO("Received a '%s' message from commport '%s' (%lf, %p)",
msg->getName().c_str(), this->get_cname(),
msg->payload, msg);

return std::unique_ptr<SimulationMessage>(msg);
}
Expand All @@ -185,8 +187,8 @@ namespace wrench {
return;
}

WRENCH_INFO("Putting a %s message (%.2lf bytes) to commport '%s'",
msg->getName().c_str(), msg->payload,
WRENCH_INFO("Putting a %s message (%.2lf bytes, %p) to commport '%s'",
msg->getName().c_str(), msg->payload, msg,
this->get_cname());

#ifdef MESSAGE_MANAGER
Expand All @@ -204,6 +206,7 @@ namespace wrench {
NetworkError::SENDING, NetworkError::TIMEOUT, this->s4u_mb->get_name(), msg->getName()));
}
} else {
WRENCH_INFO("Putting the message on the MQ %s", this->s4u_mq->get_cname());
try {
this->s4u_mq->put(msg, (uint64_t) msg->payload);
} catch (simgrid::TimeoutException &e) {
Expand All @@ -230,8 +233,8 @@ namespace wrench {
return;
}

WRENCH_INFO("Dputting a %s message (%.2lf bytes) to commport '%s'",
msg->getName().c_str(), msg->payload,
WRENCH_INFO("Dputting a %s message (%.2lf bytes, %p) to commport '%s'",
msg->getName().c_str(), msg->payload, msg,
this->get_cname());

#ifdef MESSAGE_MANAGER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ class IntegrationFailureTestTestWMS : public wrench::ExecutionController {
while (not this->test->workflow->isDone()) {
// std::cerr << this->test->workflow->getReadyTasks().size() << "\n";

if (wrench::Simulation::getCurrentSimulatedDate() > 21000) {
break;
}

// Try to restart down VMs
for (auto const &vm: this->vms) {
if (this->test->cloud_service->isVMDown(vm)) {
Expand Down Expand Up @@ -421,6 +425,7 @@ void ComprehensiveIntegrationHostFailuresTest::do_IntegrationFailureTest_test(st
argv[1] = strdup("--wrench-host-shutdown-simulation");
argv[2] = strdup("--cfg=contexts/stack-size:100");
argv[3] = strdup("--wrench-full-log");
// argv[4] = strdup("--wrench-no-color");

this->faulty_map = args;

Expand Down

0 comments on commit 3f88449

Please sign in to comment.