details:
- MPI Bcast, Barrier, Gather, Gather, Allgather,
Reduce, Scan, Reduce_scatter, Alltoall and
their 'v' variants
- the tracing is only a state for now
- the root rank is not used for now to identify
which process is the root of operation (for
those who have a root)
- the trace is visualizable in Paje and Triva (SquarifiedTreemap)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8125
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
if (IS_TRACING_SMPI){
pajeDefineContainerType ("MPI_PROCESS", "HOST", "MPI_PROCESS");
if (IS_TRACING_SMPI){
pajeDefineContainerType ("MPI_PROCESS", "HOST", "MPI_PROCESS");
+ pajeDefineStateType ("MPI_STATE", "MPI_PROCESS", "MPI_STATE");
}
/* creating the platform */
}
/* creating the platform */
void TRACE_smpi_finalize (int rank);
void TRACE_smpi_start (void);
void TRACE_smpi_end (void);
void TRACE_smpi_finalize (int rank);
void TRACE_smpi_start (void);
void TRACE_smpi_end (void);
+void TRACE_smpi_collective_in (int rank, int root, const char *operation);
+void TRACE_smpi_collective_out (int rank, int root, const char *operation);
/* from instr_config.c */
int _TRACE_configured (void);
/* from instr_config.c */
int _TRACE_configured (void);
_TRACE_smpi_container (rank, str, 100));
}
_TRACE_smpi_container (rank, str, 100));
}
+void TRACE_smpi_collective_in (int rank, int root, const char *operation)
+{
+ if (!IS_TRACING_SMPI) return;
+
+ char str[100];
+ pajePushState (SIMIX_get_clock(), "MPI_STATE",
+ _TRACE_smpi_container (rank, str, 100), operation);
+}
+
+void TRACE_smpi_collective_out (int rank, int root, const char *operation)
+{
+ if (!IS_TRACING_SMPI) return;
+
+ char str[100];
+ pajePopState (SIMIX_get_clock(), "MPI_STATE",
+ _TRACE_smpi_container (rank, str, 100));
+}
+
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Bcast");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Bcast");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Bcast");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Bcast");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Barrier");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Barrier");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Barrier");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Barrier");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Gather");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Gather");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Gather");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Gather");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Gatherv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Gatherv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Gatherv");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Gatherv");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Allgather");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Allgather");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allgather");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allgather");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Allgatherv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Allgatherv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allgatherv");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allgatherv");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Scatter");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Scatter");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scatter");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scatter");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Scatterv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Scatterv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scatterv");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scatterv");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ int root_traced = smpi_group_rank(smpi_comm_group(comm), root);
+ TRACE_smpi_collective_in (rank, root_traced, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Reduce");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Reduce");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Reduce");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Reduce");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, root_traced, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Allreduce");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Allreduce");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allreduce");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Allreduce");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Scan");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Scan");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scan");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Scan");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int* displs;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int* displs;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Reduce_scatter");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Reduce_scatter");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Reduce_scatter");
retval = MPI_SUCCESS;
}
smpi_bench_begin(rank, "Reduce_scatter");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval, size, sendsize;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval, size, sendsize;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Alltoall");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Alltoall");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
}
}
smpi_bench_begin(rank, "Alltoall");
}
}
smpi_bench_begin(rank, "Alltoall");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
int retval;
int rank = comm != MPI_COMM_NULL ? smpi_comm_rank(comm) : -1;
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_in (rank, -1, __FUNCTION__);
+#endif
smpi_bench_end(rank, "Alltoallv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
smpi_bench_end(rank, "Alltoallv");
if(comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
retval = smpi_coll_basic_alltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm);
}
smpi_bench_begin(rank, "Alltoallv");
retval = smpi_coll_basic_alltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm);
}
smpi_bench_begin(rank, "Alltoallv");
+#ifdef HAVE_TRACING
+ TRACE_smpi_collective_out (rank, -1, __FUNCTION__);
+#endif