X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2807fde4fd1f59c230d69a934634c5dfb77905f2..1576bb1d7806d7c5c0bc14271cb1539618bf8e19:/src/instr/instr_paje_events.cpp diff --git a/src/instr/instr_paje_events.cpp b/src/instr/instr_paje_events.cpp index 29b7e34e50..4037df7975 100644 --- a/src/instr/instr_paje_events.cpp +++ b/src/instr/instr_paje_events.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2012-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2012-2018. 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. */ @@ -61,6 +60,9 @@ StateEvent::StateEvent(Container* container, Type* type, e_event_type event_type filename = loc->filename; linenumber = loc->linenumber; } +#else + filename = "(null)"; + linenumber = -1; #endif XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, eventType_, timestamp_); @@ -156,7 +158,8 @@ void StateEvent::print() if (getContainer()->getName().find("rank-") != 0) stream << getContainer()->getName() << " " << extra_->print(); else - stream << getContainer()->getName().erase(0, 5) << " " << extra_->print(); + /* Subtract -1 because this is the process id and we transform it to the rank id */ + stream << stoi(getContainer()->getName().erase(0, 5)) - 1 << " " << extra_->print(); fprintf(tracing_files.at(getContainer()), "%s\n", stream.str().c_str()); } else {