#include "src/instr/instr_private.h"
#include "src/instr/instr_smpi.h"
-#include "src/smpi/private.hpp"
+#include "src/smpi/include/private.hpp"
#include "typeinfo"
#include "xbt/virtu.h" /* sg_cmdline */
#include "simgrid/sg_config.h"
return;
XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
if (force){
- for (auto event : buffer){
+ for (auto const& event : buffer) {
event->print();
delete event;
}
buffer.clear();
}else{
std::vector<PajeEvent*>::iterator i = buffer.begin();
- for (auto event :buffer){
+ for (auto const& event : buffer) {
double head_timestamp = event->timestamp;
if (head_timestamp > TRACE_last_timestamp_to_dump)
break;
void buffer_debug(std::vector<PajeEvent*> *buf) {
return;
XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
- for (auto event :*buf){
+ for (auto const& event : *buf) {
event->print();
XBT_DEBUG("%p %s", event, stream.str().c_str());
stream.str("");
{
XBT_DEBUG("%s not implemented for %p: event_type=%d, timestamp=%f", __FUNCTION__,
this, (int)event_type, timestamp);
-// xbt_backtrace_display_current();
-
- /* switch (event->event_type){
- case PAJE_StartLink:
- xbt_free (((startLink_t)(event->data))->value);
- xbt_free (((startLink_t)(event->data))->key);
- break;
- case PAJE_EndLink:
- xbt_free (((endLink_t)(event->data))->value);
- xbt_free (((endLink_t)(event->data))->key);
- break;
- default:
- break;
- }*/
}
void TRACE_paje_start() {
}
}
-void LogLinkTypeDefinition(type_t type, type_t source, type_t dest)
+void LogLinkTypeDefinition(type_t type, Type* source, Type* dest)
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineLinkType);
//print it
}
}
-void LogEntityValue (val_t value)
+void LogEntityValue(value* val)
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineEntityValue);
//print it
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision());
stream << PAJE_DefineEntityValue;
- stream << " " << value->id << " " << value->father->id << " " << value->name;
- if (value->color)
- stream << " \"" << value->color << "\"";
+ stream << " " << val->id << " " << val->father->id << " " << val->name;
+ if (val->color)
+ stream << " \"" << val->color << "\"";
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
-SetVariableEvent::SetVariableEvent (double timestamp, container_t container, type_t type, double value)
+SetVariableEvent::SetVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_SetVariable;
this->timestamp = timestamp;
}
}
-AddVariableEvent::AddVariableEvent (double timestamp, container_t container, type_t type, double value)
+AddVariableEvent::AddVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_AddVariable;
this->timestamp = timestamp;
}
}
-SubVariableEvent::SubVariableEvent (double timestamp, container_t container, type_t type, double value)
+SubVariableEvent::SubVariableEvent (double timestamp, container_t container, Type* type, double value)
{
this->event_type = PAJE_SubVariable;
this->timestamp = timestamp;
}
}
-SetStateEvent::SetStateEvent (double timestamp, container_t container, type_t type, val_t value)
+SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, value* val)
{
this->event_type = PAJE_SetState;
this->timestamp = timestamp;
this->type = type;
this->container = container;
- this->value = value;
+ this->val = val;
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
stream << (int)this->event_type;
print_timestamp(this);
stream << " " << type->id << " " << container->id;
- stream << " " << value->id;
+ stream << " " << val->id;
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
stream << " \"" << filename << "\" " << linenumber;
}
}
-PushStateEvent::PushStateEvent (double timestamp, container_t container, type_t type, val_t value, void* extra)
+PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, value* val, void* extra)
{
this->event_type = PAJE_PushState;
this->timestamp = timestamp;
this->type = type;
this->container = container;
- this->value = value;
+ this->val = val;
this->extra_ = extra;
#if HAVE_SMPI
insert_into_buffer (this);
}
-PushStateEvent::PushStateEvent (double timestamp, container_t container, type_t type, val_t value)
- : PushStateEvent(timestamp, container, type, value, nullptr)
+PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, value* val)
+ : PushStateEvent(timestamp, container, type, val, nullptr)
{}
void PushStateEvent::print() {
if (instr_fmt_type == instr_fmt_paje) {
stream << (int)this->event_type;
print_timestamp(this);
stream << " " << type->id << " " << container->id;
- stream << " " << value->id;
+ stream << " " << val->id;
if (TRACE_display_sizes()) {
stream << " ";
fprintf(trace_file, "%d ", extra->recvcounts[i]);
fprintf(trace_file, "%d %s %s\n", extra->root, extra->datatype1, extra->datatype2);
break;
+ case TRACING_ALLGATHER: // rank allgather sendcount recvcounts (sendtype) (recvtype)
+ fprintf(trace_file, "%s allGather %d %d %s %s", process_id, extra->send_size, extra->recv_size, extra->datatype1, extra->datatype2);
+ break;
case TRACING_WAITANY:
case TRACING_SENDRECV:
case TRACING_SCATTER:
case TRACING_SCATTERV:
- case TRACING_ALLGATHER:
case TRACING_SCAN:
case TRACING_EXSCAN:
case TRACING_COMM_SIZE:
case TRACING_SSEND:
case TRACING_ISSEND:
default:
- XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", value->name);
+ XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", val->name);
break;
}
}
-PopStateEvent::PopStateEvent (double timestamp, container_t container, type_t type)
+PopStateEvent::PopStateEvent (double timestamp, container_t container, Type* type)
{
this->event_type = PAJE_PopState;
this->timestamp = timestamp;
}
}
-ResetStateEvent::ResetStateEvent (double timestamp, container_t container, type_t type)
+ResetStateEvent::ResetStateEvent (double timestamp, container_t container, Type* type)
{
this->event_type = PAJE_ResetState;
this->timestamp = timestamp;
free(key);
}
StartLinkEvent::StartLinkEvent (double timestamp, container_t container,
- type_t type, container_t sourceContainer, const char *value, const char *key)
+ Type* type, container_t sourceContainer, const char *value, const char *key)
: StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
{}
-StartLinkEvent::StartLinkEvent (double timestamp, container_t container, type_t type, container_t sourceContainer,
+StartLinkEvent::StartLinkEvent (double timestamp, container_t container, Type* type, container_t sourceContainer,
const char *value, const char *key, int size)
{
event_type = PAJE_StartLink;
}
}
-EndLinkEvent::EndLinkEvent (double timestamp, container_t container, type_t type, container_t destContainer,
+EndLinkEvent::EndLinkEvent (double timestamp, container_t container, Type* type, container_t destContainer,
const char *value, const char *key)
{
this->event_type = PAJE_EndLink;
}
}
-NewEvent::NewEvent (double timestamp, container_t container, type_t type, val_t value)
+NewEvent::NewEvent(double timestamp, container_t container, Type* type, value* val)
{
this->event_type = PAJE_NewEvent;
this->timestamp = timestamp;
this->type = type;
this->container = container;
- this->value = value;
+ this->val = val;
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, this->timestamp);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->event_type;
print_timestamp(this);
- stream << " " << type->id << " " << container->id << " " << value->id;
+ stream << " " << type->id << " " << container->id << " " << val->id;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */