Commit 845594c7 authored by mubarak's avatar mubarak

Minor updates in codes-dumpi workload generator

parent be90b45c
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "ross.h" #include "ross.h"
#define MAX_NAME_LENGTH 512 #define MAX_LENGTH 512
//#define MAX_REQUESTS 128 //#define MAX_REQUESTS 128
/* struct to hold the actual data from a single MPI event*/ /* struct to hold the actual data from a single MPI event*/
...@@ -19,13 +19,14 @@ typedef struct dumpi_trace_params dumpi_trace_params; ...@@ -19,13 +19,14 @@ typedef struct dumpi_trace_params dumpi_trace_params;
struct scala_trace_params struct scala_trace_params
{ {
char offset_file_name[MAX_NAME_LENGTH]; char offset_file_name[MAX_LENGTH];
char nw_wrkld_file_name[MAX_NAME_LENGTH]; char nw_wrkld_file_name[MAX_LENGTH];
}; };
struct dumpi_trace_params struct dumpi_trace_params
{ {
char file_name[MAX_NAME_LENGTH]; int num_net_traces;
char file_name[MAX_LENGTH];
}; };
enum NW_WORKLOADS enum NW_WORKLOADS
...@@ -41,7 +42,7 @@ enum mpi_workload_type ...@@ -41,7 +42,7 @@ enum mpi_workload_type
/* sleep/delay to simulate computation or other activity */ /* sleep/delay to simulate computation or other activity */
CODES_NW_DELAY = 1, CODES_NW_DELAY = 1,
/* MPI wait all operation */ /* MPI wait all operation */
CODES_NW_WAITALL, //CODES_NW_WAITALL,
/* terminator; there are no more operations for this rank */ /* terminator; there are no more operations for this rank */
CODES_NW_END, CODES_NW_END,
/* MPI blocking send operation */ /* MPI blocking send operation */
...@@ -67,9 +68,9 @@ enum mpi_workload_type ...@@ -67,9 +68,9 @@ enum mpi_workload_type
/* MPI Allreduce operation */ /* MPI Allreduce operation */
CODES_NW_ALLREDUCE, CODES_NW_ALLREDUCE,
/* MPI test all operation */ /* MPI test all operation */
CODES_NW_TESTALL, //CODES_NW_TESTALL,
/* MPI test operation */ /* MPI test operation */
CODES_NW_TEST, //CODES_NW_TEST,
/* Generic collective operation */ /* Generic collective operation */
CODES_NW_COL, CODES_NW_COL,
}; };
...@@ -99,7 +100,7 @@ struct mpi_event_list ...@@ -99,7 +100,7 @@ struct mpi_event_list
short data_type; /* MPI data type to be matched with the recv */ short data_type; /* MPI data type to be matched with the recv */
int count; /* number of elements to be received */ int count; /* number of elements to be received */
int tag; /* tag of the message */ int tag; /* tag of the message */
int32_t request; //int32_t request;
} send; } send;
struct struct
{ {
...@@ -109,7 +110,7 @@ struct mpi_event_list ...@@ -109,7 +110,7 @@ struct mpi_event_list
short data_type; /* MPI data type to be matched with the send */ short data_type; /* MPI data type to be matched with the send */
int count; /* number of elements to be sent */ int count; /* number of elements to be sent */
int tag; /* tag of the message */ int tag; /* tag of the message */
int32_t request; //int32_t request;
} recv; } recv;
struct struct
{ {
...@@ -119,12 +120,12 @@ struct mpi_event_list ...@@ -119,12 +120,12 @@ struct mpi_event_list
{ {
int count; int count;
int requests[MAX_REQUESTS]; int requests[MAX_REQUESTS];
} wait_all;*/ } wait_all;
struct struct
{ {
int32_t request; int32_t request;
int flag; int flag;
} test; } test;*/
}u; }u;
}; };
......
...@@ -412,6 +412,9 @@ int dumpi_trace_nw_workload_load(const char* params, int rank) ...@@ -412,6 +412,9 @@ int dumpi_trace_nw_workload_load(const char* params, int rank)
dumpi_trace_params* dumpi_params = (dumpi_trace_params*)params; dumpi_trace_params* dumpi_params = (dumpi_trace_params*)params;
char file_name[MAX_LENGTH]; char file_name[MAX_LENGTH];
if(rank >= dumpi_params->num_net_traces)
return -1;
if(!rank_tbl) if(!rank_tbl)
{ {
rank_tbl = qhash_init(hash_rank_compare, quickhash_32bit_hash, RANK_HASH_TABLE_SIZE); rank_tbl = qhash_init(hash_rank_compare, quickhash_32bit_hash, RANK_HASH_TABLE_SIZE);
......
...@@ -175,10 +175,10 @@ void codes_nw_workload_print_op(FILE *f, struct mpi_event_list *op, int rank){ ...@@ -175,10 +175,10 @@ void codes_nw_workload_print_op(FILE *f, struct mpi_event_list *op, int rank){
case CODES_NW_IRECV: case CODES_NW_IRECV:
fprintf(f, "op: rank:%d type:recv " fprintf(f, "op: rank:%d type:recv "
"sender: %d receiver: %d number of bytes: %d " "sender: %d receiver: %d number of bytes: %d "
"start time: %f end time: %f request ID: %d \n", "start time: %f end time: %f \n",
rank, op->u.recv.source_rank, op->u.recv.dest_rank, rank, op->u.recv.source_rank, op->u.recv.dest_rank,
op->u.recv.num_bytes, op->u.recv.num_bytes,
op->start_time, op->end_time, (int)op->u.recv.request); op->start_time, op->end_time);
break; break;
case CODES_NW_COL: case CODES_NW_COL:
case CODES_NW_BCAST: case CODES_NW_BCAST:
...@@ -192,13 +192,13 @@ void codes_nw_workload_print_op(FILE *f, struct mpi_event_list *op, int rank){ ...@@ -192,13 +192,13 @@ void codes_nw_workload_print_op(FILE *f, struct mpi_event_list *op, int rank){
"count: %d \n", "count: %d \n",
rank, op->u.collective.num_bytes); rank, op->u.collective.num_bytes);
break; break;
case CODES_NW_TEST: /*case CODES_NW_TEST:
fprintf(f, "op: rank:%d type:test " fprintf(f, "op: rank:%d type:test "
"request ID: %d flag: %d " "request ID: %d flag: %d "
"start time: %f end time: %f \n", "start time: %f end time: %f \n",
rank, (int)op->u.test.request, op->u.test.flag, rank, (int)op->u.test.request, op->u.test.flag,
op->start_time, op->end_time); op->start_time, op->end_time);
break; break; */
/*case CODES_NW_WAITALL: /*case CODES_NW_WAITALL:
fprintf(f, "op: rank:%d type:waitall " fprintf(f, "op: rank:%d type:waitall "
"count: %d " "count: %d "
......
...@@ -63,8 +63,8 @@ int scala_trace_nw_workload_load(const char* params, int rank) ...@@ -63,8 +63,8 @@ int scala_trace_nw_workload_load(const char* params, int rank)
scala_trace_params* st_params = (scala_trace_params*)params; scala_trace_params* st_params = (scala_trace_params*)params;
char offset_file[MAX_NAME_LENGTH]; char offset_file[MAX_LENGTH];
char wrkld_file[MAX_NAME_LENGTH]; char wrkld_file[MAX_LENGTH];
strcpy(offset_file, st_params->offset_file_name); strcpy(offset_file, st_params->offset_file_name);
strcpy(wrkld_file, st_params->nw_wrkld_file_name); strcpy(wrkld_file, st_params->nw_wrkld_file_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment