;
// NoOpTI: init, finalize, test, wait, barrier
- TIData(std::string name) : name_(name){};
+ explicit TIData(std::string name) : name_(name){};
// CPuTI: compute, sleep (+ waitAny and waitAll out of laziness)
- TIData(std::string name, double amount) : name_(name), amount_(amount){};
+ explicit TIData(std::string name, double amount) : name_(name), amount_(amount){};
// Pt2PtTI: send, isend, sssend, issend, recv, irecv
- TIData(std::string name, int endpoint, int size, std::string datatype)
+ explicit TIData(std::string name, int endpoint, int size, std::string datatype)
: name_(name), endpoint(endpoint), send_size(size), send_type(datatype){};
// CollTI: bcast, reduce, allReduce, gather, scatter, allGather, allToAll
- TIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type,
- std::string recv_type)
+ explicit TIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type,
+ std::string recv_type)
: name_(name)
, amount_(amount)
, endpoint(root)
, send_type(send_type)
, recv_type(recv_type){};
// VarCollTI: gatherV, scatterV, allGatherV, allToAllV (+ reduceScatter out of laziness)
- TIData(std::string name, int root, int send_size, std::vector<int>* sendcounts, int recv_size,
- std::vector<int>* recvcounts, std::string send_type, std::string recv_type)
+ explicit TIData(std::string name, int root, int send_size, std::vector<int>* sendcounts, int recv_size,
+ std::vector<int>* recvcounts, std::string send_type, std::string recv_type)
: name_(name)
, endpoint(root)
, send_size(send_size)
class NoOpTIData : public TIData {
public:
- NoOpTIData(std::string name) : TIData(name){};
+ explicit NoOpTIData(std::string name) : TIData(name){};
std::string print() override { return getName(); }
std::string display_size() override { return ""; }
};
class CpuTIData : public TIData {
public:
- CpuTIData(std::string name, double amount) : TIData(name, amount){};
+ explicit CpuTIData(std::string name, double amount) : TIData(name, amount){};
std::string print() override
{
std::stringstream stream;
class Pt2PtTIData : public TIData {
public:
- Pt2PtTIData(std::string name, int endpoint, int size, std::string datatype)
+ explicit Pt2PtTIData(std::string name, int endpoint, int size, std::string datatype)
: TIData(name, endpoint, size, datatype){};
std::string print() override
{
class CollTIData : public TIData {
public:
- CollTIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type,
- std::string recv_type)
+ explicit CollTIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type,
+ std::string recv_type)
: TIData(name, root, amount, send_size, recv_size, send_type, recv_type){};
std::string print() override
{
class VarCollTIData : public TIData {
public:
- VarCollTIData(std::string name, int root, int send_size, std::vector<int>* sendcounts, int recv_size,
- std::vector<int>* recvcounts, std::string send_type, std::string recv_type)
+ explicit VarCollTIData(std::string name, int root, int send_size, std::vector<int>* sendcounts, int recv_size,
+ std::vector<int>* recvcounts, std::string send_type, std::string recv_type)
: TIData(name, root, send_size, sendcounts, recv_size, recvcounts, send_type, recv_type){};
std::string print() override
{
int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
int src_traced = comm->group()->index(src);
- // extra->src = src_traced;
- // extra->dst = dst_traced;
- // extra->send_size = sendtype->is_basic() ? sendcount : sendcount * sendtype->size();
- // extra->recv_size = recvtype->is_basic() ? recvcount : recvcount * recvtype->size();
- // extra->datatype1 = encode_datatype(sendtype);
- // extra->datatype2 = encode_datatype(recvtype);
-
- // TODO TRACE_smpi_comm_in(rank, __FUNCTION__, extra);
+
+ // FIXME: Hack the way to trace this one
+ TRACE_smpi_comm_in(rank, __FUNCTION__,
+ new simgrid::instr::VarCollTIData(
+ "sendRecv", -1, sendtype->is_basic() ? sendcount : sendcount * sendtype->size(),
+ new std::vector<int>(src_traced),
+ recvtype->is_basic() ? recvcount : recvcount * recvtype->size(),
+ new std::vector<int>(src_traced), encode_datatype(sendtype), encode_datatype(recvtype)));
+
TRACE_smpi_send(rank, rank, dst_traced, sendtag, sendcount * sendtype->size());
simgrid::smpi::Request::sendrecv(sendbuf, sendcount, sendtype, dst, sendtag, recvbuf, recvcount, recvtype, src,