|
@@ -36,6 +36,8 @@ LIST_TYPE(mpi_transfer,
|
|
long jobid;
|
|
long jobid;
|
|
double bandwidth;
|
|
double bandwidth;
|
|
unsigned long handle;
|
|
unsigned long handle;
|
|
|
|
+ unsigned type;
|
|
|
|
+ int prio;
|
|
);
|
|
);
|
|
|
|
|
|
/* Returns 0 if a barrier is found, -1 otherwise. In case of success, offset is
|
|
/* Returns 0 if a barrier is found, -1 otherwise. In case of success, offset is
|
|
@@ -120,7 +122,7 @@ unsigned mpi_recvs_used[STARPU_FXT_MAX_FILES] = {0};
|
|
unsigned mpi_recvs_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
|
|
unsigned mpi_recvs_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
|
|
unsigned mpi_sends_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
|
|
unsigned mpi_sends_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
|
|
|
|
|
|
-void _starpu_fxt_mpi_add_send_transfer(int src, int dst STARPU_ATTRIBUTE_UNUSED, long mpi_tag, size_t size, float date, long jobid, unsigned long handle)
|
|
|
|
|
|
+void _starpu_fxt_mpi_add_send_transfer(int src, int dst STARPU_ATTRIBUTE_UNUSED, long mpi_tag, size_t size, float date, long jobid, unsigned long handle, unsigned type, int prio)
|
|
{
|
|
{
|
|
STARPU_ASSERT(src >= 0);
|
|
STARPU_ASSERT(src >= 0);
|
|
if (src >= STARPU_FXT_MAX_FILES)
|
|
if (src >= STARPU_FXT_MAX_FILES)
|
|
@@ -149,6 +151,8 @@ void _starpu_fxt_mpi_add_send_transfer(int src, int dst STARPU_ATTRIBUTE_UNUSED,
|
|
mpi_sends[src][slot].date = date;
|
|
mpi_sends[src][slot].date = date;
|
|
mpi_sends[src][slot].jobid = jobid;
|
|
mpi_sends[src][slot].jobid = jobid;
|
|
mpi_sends[src][slot].handle = handle;
|
|
mpi_sends[src][slot].handle = handle;
|
|
|
|
+ mpi_sends[src][slot].type = type;
|
|
|
|
+ mpi_sends[src][slot].prio = prio;
|
|
}
|
|
}
|
|
|
|
|
|
void _starpu_fxt_mpi_add_recv_transfer(int src STARPU_ATTRIBUTE_UNUSED, int dst, long mpi_tag, float date, long jobid, unsigned long handle)
|
|
void _starpu_fxt_mpi_add_recv_transfer(int src STARPU_ATTRIBUTE_UNUSED, int dst, long mpi_tag, float date, long jobid, unsigned long handle)
|
|
@@ -218,6 +222,19 @@ struct mpi_transfer *try_to_match_send_transfer(int src STARPU_ATTRIBUTE_UNUSED,
|
|
|
|
|
|
static unsigned long mpi_com_id = 0;
|
|
static unsigned long mpi_com_id = 0;
|
|
|
|
|
|
|
|
+static const char* get_mpi_type_str(unsigned mpi_type)
|
|
|
|
+{
|
|
|
|
+ switch (mpi_type)
|
|
|
|
+ {
|
|
|
|
+ case _STARPU_MPI_FUT_POINT_TO_POINT_SEND:
|
|
|
|
+ return "PointToPoint";
|
|
|
|
+ case _STARPU_MPI_FUT_COLLECTIVE_SEND:
|
|
|
|
+ return "Collective";
|
|
|
|
+ default:
|
|
|
|
+ return "Unknown";
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comms_file, unsigned n)
|
|
static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comms_file, unsigned n)
|
|
{
|
|
{
|
|
unsigned slot[STARPU_FXT_MAX_FILES] = { 0 }, node;
|
|
unsigned slot[STARPU_FXT_MAX_FILES] = { 0 }, node;
|
|
@@ -331,9 +348,11 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comm
|
|
|
|
|
|
char str_mpi_tag[STARPU_POTI_STR_LEN];
|
|
char str_mpi_tag[STARPU_POTI_STR_LEN];
|
|
snprintf(str_mpi_tag, sizeof(str_mpi_tag), "%ld", mpi_tag);
|
|
snprintf(str_mpi_tag, sizeof(str_mpi_tag), "%ld", mpi_tag);
|
|
|
|
+ char str_priority[STARPU_POTI_STR_LEN];
|
|
|
|
+ snprintf(str_priority, sizeof(str_priority), "%d", cur->prio);
|
|
char str_handle[STARPU_POTI_STR_LEN];
|
|
char str_handle[STARPU_POTI_STR_LEN];
|
|
snprintf(str_handle, sizeof(str_handle), "%lx", send_handle);
|
|
snprintf(str_handle, sizeof(str_handle), "%lx", send_handle);
|
|
- poti_user_StartLink(_starpu_poti_MpiLinkStart, start_date, "MPIroot", "MPIL", mpi_container, paje_value, paje_key, 2, str_mpi_tag, str_handle);
|
|
|
|
|
|
+ poti_user_StartLink(_starpu_poti_MpiLinkStart, start_date, "MPIroot", "MPIL", mpi_container, paje_value, paje_key, 3, str_mpi_tag, get_mpi_type_str(cur->type), str_priority, str_handle);
|
|
|
|
|
|
poti_SetVariable(start_date, mpi_container, "bwo_mpi", current_out_bandwidth[src]);
|
|
poti_SetVariable(start_date, mpi_container, "bwo_mpi", current_out_bandwidth[src]);
|
|
snprintf(mpi_container, sizeof(mpi_container), "%d_mpict", dst);
|
|
snprintf(mpi_container, sizeof(mpi_container), "%d_mpict", dst);
|
|
@@ -342,7 +361,7 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comm
|
|
#else
|
|
#else
|
|
fprintf(out_paje_file, "13 %.9f %d_mpict bwo_mpi %f\n", start_date, src, current_out_bandwidth[src]);
|
|
fprintf(out_paje_file, "13 %.9f %d_mpict bwo_mpi %f\n", start_date, src, current_out_bandwidth[src]);
|
|
fprintf(out_paje_file, "13 %.9f %d_mpict bwi_mpi %f\n", start_date, dst, current_in_bandwidth[dst]);
|
|
fprintf(out_paje_file, "13 %.9f %d_mpict bwi_mpi %f\n", start_date, dst, current_in_bandwidth[dst]);
|
|
- fprintf(out_paje_file, "23 %.9f MPIL MPIroot %lu %d_mpict mpicom_%lu %ld %lx\n", start_date, (unsigned long)size, src, id, mpi_tag, send_handle);
|
|
|
|
|
|
+ fprintf(out_paje_file, "23 %.9f MPIL MPIroot %lu %d_mpict mpicom_%lu %ld %s %d %lx\n", start_date, (unsigned long)size, src, id, mpi_tag, get_mpi_type_str(cur->type), cur->prio, send_handle);
|
|
fprintf(out_paje_file, "19 %.9f MPIL MPIroot %lu %d_mpict mpicom_%lu\n", end_date, (unsigned long)size, dst, id);
|
|
fprintf(out_paje_file, "19 %.9f MPIL MPIroot %lu %d_mpict mpicom_%lu\n", end_date, (unsigned long)size, dst, id);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -360,6 +379,8 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comm
|
|
if (match->jobid != -1)
|
|
if (match->jobid != -1)
|
|
fprintf(out_comms_file, "RecvJobId: %d_%ld\n", dst, match->jobid);
|
|
fprintf(out_comms_file, "RecvJobId: %d_%ld\n", dst, match->jobid);
|
|
fprintf(out_comms_file, "Size: %lu\n", (unsigned long)size);
|
|
fprintf(out_comms_file, "Size: %lu\n", (unsigned long)size);
|
|
|
|
+ fprintf(out_comms_file, "Priority: %d\n", cur->prio);
|
|
|
|
+ fprintf(out_comms_file, "Type: %s\n", get_mpi_type_str(cur->type));
|
|
fprintf(out_comms_file, "\n");
|
|
fprintf(out_comms_file, "\n");
|
|
}
|
|
}
|
|
}
|
|
}
|