Commit 845594c7 authored by mubarak's avatar mubarak

Minor updates in codes-dumpi workload generator

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