double timestamp = SIMIX_get_clock();
std::stringstream stream;
- XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, PAJE_CreateContainer, timestamp);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, PAJE_CreateContainer, timestamp);
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision()) << PAJE_CreateContainer << " ";
std::stringstream stream;
double timestamp = SIMIX_get_clock();
- XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, PAJE_DestroyContainer, timestamp);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, PAJE_DestroyContainer, timestamp);
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision()) << PAJE_DestroyContainer << " ";
NewEvent::NewEvent(double timestamp, container_t container, Type* type, EntityValue* val)
: simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_NewEvent), val(val)
{
- XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, eventType_, timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, eventType_, timestamp_);
insertIntoBuffer();
}
, key_(key)
, size_(size)
{
- XBT_DEBUG("%s: event_type=%u, timestamp=%f, value:%s", __FUNCTION__, eventType_, timestamp_, value_.c_str());
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f, value:%s", __func__, eventType_, timestamp_, value_.c_str());
insertIntoBuffer();
}
VariableEvent::VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value)
: PajeEvent::PajeEvent(container, type, timestamp, event_type), value(value)
{
- XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, eventType_, timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, eventType_, timestamp_);
insertIntoBuffer();
}
linenumber = -1;
#endif
- XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, eventType_, timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, eventType_, timestamp_);
insertIntoBuffer();
};
{
std::stringstream stream;
stream << std::fixed << std::setprecision(TRACE_precision());
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, eventType_, TRACE_precision(), timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
if (instr_fmt_type != instr_fmt_paje)
return;
{
std::stringstream stream;
stream << std::fixed << std::setprecision(TRACE_precision());
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, eventType_, TRACE_precision(), timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
if (instr_fmt_type != instr_fmt_paje)
return;
if (timestamp_ < 1e-12)
{
std::stringstream stream;
stream << std::fixed << std::setprecision(TRACE_precision());
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, eventType_, TRACE_precision(), timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
if (instr_fmt_type != instr_fmt_paje)
return;
{
std::stringstream stream;
stream << std::fixed << std::setprecision(TRACE_precision());
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, eventType_, TRACE_precision(), timestamp_);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
if (instr_fmt_type == instr_fmt_paje) {
if (timestamp_ < 1e-12)
stream << eventType_ << " " << 0 << " " << getType()->getId() << " " << getContainer()->getId();
{
if (not TRACE_is_enabled())
return;
- XBT_DEBUG("%s: dump until %f. starts", __FUNCTION__, TRACE_last_timestamp_to_dump);
+ XBT_DEBUG("%s: dump until %f. starts", __func__, TRACE_last_timestamp_to_dump);
if (force){
for (auto const& event : buffer) {
event->print();
}
buffer.erase(buffer.begin(), i);
}
- XBT_DEBUG("%s: ends", __FUNCTION__);
+ XBT_DEBUG("%s: ends", __func__);
}
void buffer_debug(std::vector<simgrid::instr::PajeEvent*>* buf)
}
buffer_debug(&buffer);
- XBT_DEBUG("%s: insert event_type=%u, timestamp=%f, buffersize=%zu)", __FUNCTION__, eventType_, timestamp_,
- buffer.size());
+ XBT_DEBUG("%s: insert event_type=%u, timestamp=%f, buffersize=%zu)", __func__, eventType_, timestamp_, buffer.size());
std::vector<simgrid::instr::PajeEvent*>::reverse_iterator i;
for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
simgrid::instr::PajeEvent* e1 = *i;
break;
}
if (i == buffer.rend())
- XBT_DEBUG("%s: inserted at beginning", __FUNCTION__);
+ XBT_DEBUG("%s: inserted at beginning", __func__);
else if (i == buffer.rbegin())
- XBT_DEBUG("%s: inserted at end", __FUNCTION__);
+ XBT_DEBUG("%s: inserted at end", __func__);
else
- XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__, std::distance(buffer.rbegin(), i));
+ XBT_DEBUG("%s: inserted at pos= %zd from its end", __func__, std::distance(buffer.rbegin(), i));
buffer.insert(i.base(), this);
buffer_debug(&buffer);
if (instr_fmt_type != instr_fmt_paje)
return;
std::stringstream stream;
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, event_type, TRACE_precision(), 0.);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, event_type, TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision()) << event_type << " " << getId();
stream << " " << father_->getId() << " " << getName();
if (isColored())
if (instr_fmt_type != instr_fmt_paje)
return;
std::stringstream stream;
- XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __FUNCTION__, PAJE_DefineLinkType, TRACE_precision(), 0.);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, PAJE_DefineLinkType, TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision()) << PAJE_DefineLinkType << " " << getId();
stream << " " << father_->getId() << " " << source->getId() << " " << dest->getId() << " " << getName();
XBT_DEBUG("Dump %s", stream.str().c_str());
if (instr_fmt_type != instr_fmt_paje)
return;
std::stringstream stream;
- XBT_DEBUG("%s: event_type=%u", __FUNCTION__, PAJE_DefineEntityValue);
+ XBT_DEBUG("%s: event_type=%u", __func__, PAJE_DefineEntityValue);
stream << std::fixed << std::setprecision(TRACE_precision()) << PAJE_DefineEntityValue;
stream << " " << id_ << " " << father_->getId() << " " << name_;
if (not color_.empty())
#define NOT_YET_IMPLEMENTED \
{ \
- xbt_die("Not yet implemented: %s. Please contact the SimGrid team if support is needed", __FUNCTION__); \
+ xbt_die("Not yet implemented: %s. Please contact the SimGrid team if support is needed", __func__); \
return MPI_SUCCESS; \
}
XBT_WARN("Not yet implemented: %s. " \
"Please contact the SimGrid team if support is needed. " \
"Run with --log=smpi_mpi.thresh:error to hide", \
- __FUNCTION__); \
+ __func__); \
warning_todo = false; \
return MPI_SUCCESS; \
}
-#define WRAPPED_PMPI_CALL(type,name,args,args2) \
-type name args { \
- XBT_VERB("SMPI - Entering %s", __FUNCTION__);\
- type ret = P##name args2 ; \
- XBT_VERB("SMPI - Leaving %s", __FUNCTION__);\
- return ret;\
-}\
+#define WRAPPED_PMPI_CALL(type, name, args, args2) \
+ type name args \
+ { \
+ XBT_VERB("SMPI - Entering %s", __func__); \
+ type ret = P##name args2; \
+ XBT_VERB("SMPI - Leaving %s", __func__); \
+ return ret; \
+ }
#define UNIMPLEMENTED_WRAPPED_PMPI_CALL(type,name,args,args2) \
type P##name args { \
smpi_process()->mark_as_initialized();
int rank = simgrid::s4u::Actor::self()->getPid();
TRACE_smpi_init(rank);
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::NoOpTIData("init"));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("init"));
TRACE_smpi_comm_out(rank);
TRACE_smpi_computing_init(rank);
smpi_bench_begin();
{
smpi_bench_end();
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::NoOpTIData("finalize"));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("finalize"));
smpi_process()->finalize();
retval = MPI_ERR_ARG;
} else {
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::CollTIData("bcast", root, -1.0,
datatype->is_replayable() ? count : count * datatype->size(), -1,
simgrid::smpi::Datatype::encode(datatype), ""));
retval = MPI_ERR_COMM;
} else {
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::NoOpTIData("barrier"));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("barrier"));
simgrid::smpi::Colls::barrier(comm);
int rank = simgrid::s4u::Actor::self()->getPid();
TRACE_smpi_comm_in(
- rank, __FUNCTION__,
+ rank, __func__,
new simgrid::instr::CollTIData(
"gather", root, -1.0, sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(),
(comm->rank() != root || recvtype->is_replayable()) ? recvcount : recvcount * recvtype->size(),
trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::VarCollTIData(
"gatherV", root,
sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(), nullptr,
}
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::CollTIData(
"allGather", -1, -1.0, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
for (int i = 0; i < comm->size(); i++) // copy data to avoid bad free
trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::VarCollTIData(
"allGatherV", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
int rank = simgrid::s4u::Actor::self()->getPid();
TRACE_smpi_comm_in(
- rank, __FUNCTION__,
+ rank, __func__,
new simgrid::instr::CollTIData(
"scatter", root, -1.0,
(comm->rank() != root || sendtype->is_replayable()) ? sendcount : sendcount * sendtype->size(),
trace_sendcounts->push_back(sendcounts[i] * dt_size_send);
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::VarCollTIData(
"scatterV", root, dt_size_send, trace_sendcounts,
recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), nullptr,
} else {
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::CollTIData("reduce", root, 0,
datatype->is_replayable() ? count : count * datatype->size(), -1,
simgrid::smpi::Datatype::encode(datatype), ""));
}
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::CollTIData("allReduce", -1, 0,
datatype->is_replayable() ? count : count * datatype->size(), -1,
simgrid::smpi::Datatype::encode(datatype), ""));
} else {
int rank = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::Pt2PtTIData(
- "scan", -1, datatype->is_replayable() ? count : count * datatype->size(),
- simgrid::smpi::Datatype::encode(datatype)));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::Pt2PtTIData(
+ "scan", -1, datatype->is_replayable() ? count : count * datatype->size(),
+ simgrid::smpi::Datatype::encode(datatype)));
retval = simgrid::smpi::Colls::scan(sendbuf, recvbuf, count, datatype, op, comm);
memcpy(sendtmpbuf, recvbuf, count * datatype->size());
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
- new simgrid::instr::Pt2PtTIData("exscan", -1,
- datatype->is_replayable() ? count : count * datatype->size(),
- simgrid::smpi::Datatype::encode(datatype)));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::Pt2PtTIData(
+ "exscan", -1, datatype->is_replayable() ? count : count * datatype->size(),
+ simgrid::smpi::Datatype::encode(datatype)));
retval = simgrid::smpi::Colls::exscan(sendtmpbuf, recvbuf, count, datatype, op, comm);
memcpy(sendtmpbuf, recvbuf, totalcount * datatype->size());
}
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::VarCollTIData(
- "reduceScatter", -1, dt_send_size, nullptr, -1, trace_recvcounts,
- simgrid::smpi::Datatype::encode(datatype), ""));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData(
+ "reduceScatter", -1, dt_send_size, nullptr, -1, trace_recvcounts,
+ simgrid::smpi::Datatype::encode(datatype), ""));
simgrid::smpi::Colls::reduce_scatter(sendtmpbuf, recvbuf, recvcounts, datatype, op, comm);
retval = MPI_SUCCESS;
memcpy(sendtmpbuf, recvbuf, recvcount * count * datatype->size());
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::VarCollTIData("reduceScatter", -1, 0, nullptr, -1, trace_recvcounts,
simgrid::smpi::Datatype::encode(datatype), ""));
sendtmptype = recvtype;
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::CollTIData(
"allToAll", -1, -1.0,
sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(),
trace_sendcounts->push_back(sendtmpcounts[i] * dt_size_send);
}
- TRACE_smpi_comm_in(rank, __FUNCTION__,
+ TRACE_smpi_comm_in(rank, __func__,
new simgrid::instr::VarCollTIData("allToAllV", -1, send_size, trace_sendcounts, recv_size,
trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
simgrid::smpi::Datatype::encode(recvtype)));
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Irecv", src,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
int trace_dst = getPid(comm, dst);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Isend", dst,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
int trace_dst = getPid(comm, dst);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("ISsend", dst,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
retval = MPI_ERR_TAG;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("recv", src,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
int dst_traced = getPid(comm, dst);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("send", dst,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
int dst_traced = getPid(comm, dst);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Ssend", dst,
datatype->is_replayable() ? count : count * datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
std::vector<int>* src_hack = new std::vector<int>;
dst_hack->push_back(dst_traced);
src_hack->push_back(src_traced);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::VarCollTIData(
"sendRecv", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
dst_hack, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), src_hack,
? simgrid::s4u::Actor::self()->getPid()
: -1; // TODO: cheinrich: Check if this correct or if it should be MPI_UNDEFINED
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("wait"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("wait"));
simgrid::smpi::Request::wait(request, status);
retval = MPI_SUCCESS;
smpi_bench_end();
int rank_traced = simgrid::s4u::Actor::self()->getPid(); // FIXME: In PMPI_Wait, we check if the comm is null?
- TRACE_smpi_comm_in(rank_traced, __FUNCTION__, new simgrid::instr::CpuTIData("waitAny", static_cast<double>(count)));
+ TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAny", static_cast<double>(count)));
*index = simgrid::smpi::Request::waitany(count, requests, status);
smpi_bench_end();
int rank_traced = simgrid::s4u::Actor::self()->getPid(); // FIXME: In PMPI_Wait, we check if the comm is null?
- TRACE_smpi_comm_in(rank_traced, __FUNCTION__, new simgrid::instr::CpuTIData("waitAll", static_cast<double>(count)));
+ TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAll", static_cast<double>(count)));
int retval = simgrid::smpi::Request::waitall(count, requests, status);
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_fence"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_fence"));
retval = win->fence(assert);
TRACE_smpi_comm_out(my_proc_id);
}
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_datatype->is_replayable()
? origin_count
: origin_count * origin_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Rget", target_rank,
origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
MPI_Group group;
win->get_group(&group);
int dst_traced = group->actor(target_rank)->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_datatype->is_replayable()
? origin_count
: origin_count * origin_datatype->size(),
MPI_Group group;
win->get_group(&group);
int dst_traced = group->actor(target_rank)->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Rput", target_rank,
origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Accumulate", target_rank,
origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Raccumulate", target_rank,
origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Get_accumulate", target_rank,
target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
"Rget_accumulate", target_rank,
target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
MPI_Group group;
win->get_group(&group);
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
+ TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank,
datatype->is_replayable() ? 1 : datatype->size(),
simgrid::smpi::Datatype::encode(datatype)));
retval = MPI_ERR_GROUP;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_post"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_post"));
retval = win->post(group,assert);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_GROUP;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_start"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_start"));
retval = win->start(group,assert);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_complete"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_complete"));
retval = win->complete();
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_wait"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_wait"));
retval = win->wait();
retval = MPI_SUCCESS;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_unlock"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock"));
retval = win->unlock(rank);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_lock_all"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_lock_all"));
retval = win->lock_all(assert);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_unlock_all"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock_all"));
retval = win->unlock_all();
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_SUCCESS;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_flush"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush"));
retval = win->flush(rank);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_SUCCESS;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_flush_local"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local"));
retval = win->flush_local(rank);
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_flush_all"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_all"));
retval = win->flush_all();
TRACE_smpi_comm_out(my_proc_id);
}
retval = MPI_ERR_WIN;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("Win_flush_local_all"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local_all"));
retval = win->flush_local_all();
TRACE_smpi_comm_out(my_proc_id);
}
}else{
father = simgrid::instr::Container::getRoot();
}
- xbt_assert(father != nullptr, "Could not find a parent for mpi rank %s at function %s", str.c_str(), __FUNCTION__);
+ xbt_assert(father != nullptr, "Could not find a parent for mpi rank %s at function %s", str.c_str(), __func__);
father->createChild(str, "MPI");
#if HAVE_PAPI
container_t container = simgrid::instr::Container::byName(str);
"%zu items were given on the line. First two should be process_id and action. " \
"This action needs after them %lu mandatory arguments, and accepts %lu optional ones. \n" \
"Please contact the Simgrid team if support is needed", \
- __FUNCTION__, action.size(), static_cast<unsigned long>(mandatory), \
- static_cast<unsigned long>(optional)); \
+ __func__, action.size(), static_cast<unsigned long>(mandatory), static_cast<unsigned long>(optional)); \
}
static void log_timed_action(simgrid::xbt::ReplayAction& action, double clock)
int dst = request->comm()->group()->rank(request->dst());
bool is_wait_for_receive = (request->flags() & RECV);
// TODO: Here we take the rank while we normally take the process id (look for my_proc_id)
- TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::NoOpTIData("wait"));
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("wait"));
MPI_Status status;
Request::wait(&request, &status);
{
int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
- Datatype::encode(args.datatype1)));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
+ Datatype::encode(args.datatype1)));
if (not TRACE_smpi_view_internals())
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, 0, args.size * args.datatype1->size());
{
int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->getPid();
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
- Datatype::encode(args.datatype1)));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
+ Datatype::encode(args.datatype1)));
MPI_Status status;
// unknown size from the receiver point of view
const unsigned int count_requests = get_reqq_self()->size();
if (count_requests > 0) {
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
- new simgrid::instr::Pt2PtTIData("waitAll", -1, count_requests, ""));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("waitAll", -1, count_requests, ""));
std::vector<std::pair</*sender*/int,/*recv*/int>> sender_receiver;
for (const auto& req : (*get_reqq_self())) {
if (req && (req->flags() & RECV)) {
BarrierAction() : ReplayAction("barrier") {}
void kernel(simgrid::xbt::ReplayAction& action) override
{
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__, new simgrid::instr::NoOpTIData("barrier"));
+ TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("barrier"));
Colls::barrier(MPI_COMM_WORLD);
TRACE_smpi_comm_out(my_proc_id);
}
AllToAllVAction() : ReplayAction("allToAllV") {}
void kernel(simgrid::xbt::ReplayAction& action) override
{
- TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
- new simgrid::instr::VarCollTIData("allToAllV", -1, args.send_size_sum, args.sendcounts, args.recv_size_sum, args.recvcounts,
- Datatype::encode(args.datatype1),
- Datatype::encode(args.datatype2)));
+ TRACE_smpi_comm_in(my_proc_id, __func__,
+ new simgrid::instr::VarCollTIData(
+ "allToAllV", -1, args.send_size_sum, args.sendcounts, args.recv_size_sum, args.recvcounts,
+ Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
Colls::alltoallv(send_buffer(args.send_buf_size * args.datatype1->size()), args.sendcounts->data(), args.senddisps.data(), args.datatype1,
recv_buffer(args.recv_buf_size * args.datatype2->size()), args.recvcounts->data(), args.recvdisps.data(), args.datatype2, MPI_COMM_WORLD);
"in 'l'etter)\n"
" -> %%L: line number where the log event was raised (LOG4J compatible)\n"
" -> %%M: function name (LOG4J compatible -- called method name here of course).\n"
- " Defined only when using gcc because there is no __FUNCTION__ elsewhere.\n"
+ " Defined only when using gcc because there is no __func__ elsewhere.\n"
"\n"
" -> %%b: full backtrace (Called %%throwable in LOG4J). Defined only under windows or when using the "
"GNU libc because\n"
p = (unsigned char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
for (i = 0; i < totsize; i++) {
p = (unsigned char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
p = (unsigned char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
p = (unsigned char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
p = (unsigned char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
}
}
if (err)
- printf("%s error\n", __FUNCTION__);
+ printf("%s error\n", __func__);
return err;
}
mtype->index = (int *) malloc(nblock * sizeof(int));
if (!mtype->displs || !mtype->displ_in_bytes || !mtype->index) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
mtype->displ_in_bytes = (MPI_Aint *) malloc(nblock * sizeof(MPI_Aint));
if (!mtype->displ_in_bytes || !mtype->index) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
mtype->displ_in_bytes = (MPI_Aint *) malloc(nblock * sizeof(MPI_Aint));
if (!mtype->displs || !mtype->displ_in_bytes) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
mtype->displ_in_bytes = (MPI_Aint *) malloc(nblock * sizeof(MPI_Aint));
if (!mtype->displ_in_bytes) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
mtype->index = (int *) malloc(nblock * sizeof(int));
if (!mtype->displ_in_bytes || !mtype->old_datatypes) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
p = (signed char *) (mtype->buf);
if (!p) {
char errmsg[128] = { 0 };
- sprintf(errmsg, "Out of memory in %s", __FUNCTION__);
+ sprintf(errmsg, "Out of memory in %s", __func__);
MTestError(errmsg);
}
for (i = 0; i < totsize; i++) {
int merr = 0;
int bdt_index = datatype_index - MTEST_BDT_START_IDX;
if (bdt_index >= MTEST_BDT_MAX) {
- printf("Wrong index: global %d, bst %d in %s\n", datatype_index, bdt_index, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, bst %d in %s\n", datatype_index, bdt_index, __func__);
+ merr++;
+ return merr;
}
switch (bdt_index) {
ddt_datatype_index = datatype_index - MTEST_SEND_DDT_START_IDX;
ddt_c_dt = ddt_datatype_index / MTEST_DDT_NUM_SUBTESTS;
if (ddt_c_dt >= MTEST_DDT_MAX || !mtestDdtCreators[ddt_c_dt]) {
- printf("Wrong index: global %d, send %d send-ddt %d, or undefined creator in %s\n",
- datatype_index, ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, send %d send-ddt %d, or undefined creator in %s\n", datatype_index,
+ ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Set datatype structure */
merr = MTestDdtStructDefine(ddt_datatype_index, tot_count, &count, &blen,
&stride, &align_tot_count, &lb);
if (merr) {
- printf("Wrong index: global %d, send %d send-ddt %d, or undefined ddt structure in %s\n",
- datatype_index, ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, send %d send-ddt %d, or undefined ddt structure in %s\n", datatype_index,
+ ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Create send datatype */
ddt_datatype_index = datatype_index - MTEST_RECV_DDT_START_IDX;
ddt_c_dt = ddt_datatype_index / MTEST_DDT_NUM_SUBTESTS;
if (ddt_c_dt >= MTEST_DDT_MAX || !mtestDdtCreators[ddt_c_dt]) {
- printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined creator in %s\n",
- datatype_index, ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined creator in %s\n", datatype_index,
+ ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Set datatype structure */
merr = MTestDdtStructDefine(ddt_datatype_index, tot_count, &count, &blen,
&stride, &align_tot_count, &lb);
if (merr) {
- printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined ddt structure in %s\n",
- datatype_index, ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- return merr;
+ printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined ddt structure in %s\n", datatype_index,
+ ddt_datatype_index, ddt_c_dt, __func__);
+ return merr;
}
/* Create receive datatype */
int merr = 0;
int bdt_index = SMPI_VARGET_GLOBAL(datatype_index) - SMPI_VARGET_GLOBAL(MTEST_BDT_START_IDX);
if (bdt_index >= MTEST_BDT_MAX) {
- printf("Wrong index: global %d, bst %d in %s\n", SMPI_VARGET_GLOBAL(datatype_index), bdt_index, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, bst %d in %s\n", SMPI_VARGET_GLOBAL(datatype_index), bdt_index, __func__);
+ merr++;
+ return merr;
}
switch (bdt_index) {
ddt_datatype_index = SMPI_VARGET_GLOBAL(datatype_index) - SMPI_VARGET_GLOBAL(MTEST_SEND_DDT_START_IDX);
ddt_c_dt = ddt_datatype_index / MTEST_DDT_NUM_SUBTESTS;
if (ddt_c_dt >= MTEST_DDT_MAX || !SMPI_VARGET_GLOBAL(mtestDdtCreators)[ddt_c_dt]) {
- printf("Wrong index: global %d, send %d send-ddt %d, or undefined creator in %s\n",
- SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, send %d send-ddt %d, or undefined creator in %s\n",
+ SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Set datatype structure */
merr = MTestDdtStructDefine(ddt_datatype_index, tot_count, &count, &blen,
&stride, &align_tot_count, &lb);
if (merr) {
- printf("Wrong index: global %d, send %d send-ddt %d, or undefined ddt structure in %s\n",
- SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, send %d send-ddt %d, or undefined ddt structure in %s\n",
+ SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Create send datatype */
ddt_datatype_index = SMPI_VARGET_GLOBAL(datatype_index) - SMPI_VARGET_GLOBAL(MTEST_RECV_DDT_START_IDX);
ddt_c_dt = ddt_datatype_index / MTEST_DDT_NUM_SUBTESTS;
if (ddt_c_dt >= MTEST_DDT_MAX || !SMPI_VARGET_GLOBAL(mtestDdtCreators)[ddt_c_dt]) {
- printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined creator in %s\n",
- SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- merr++;
- return merr;
+ printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined creator in %s\n",
+ SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __func__);
+ merr++;
+ return merr;
}
/* Set datatype structure */
merr = MTestDdtStructDefine(ddt_datatype_index, tot_count, &count, &blen,
&stride, &align_tot_count, &lb);
if (merr) {
- printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined ddt structure in %s\n",
- SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __FUNCTION__);
- return merr;
+ printf("Wrong index: global %d, recv %d recv-ddt %d, or undefined ddt structure in %s\n",
+ SMPI_VARGET_GLOBAL(datatype_index), ddt_datatype_index, ddt_c_dt, __func__);
+ return merr;
}
/* Create receive datatype */