Commit a990bdc3 authored by Misbah Mubarak's avatar Misbah Mubarak

Merging latest changes in master with workload-combine

parent d1e89c8d
......@@ -31,6 +31,8 @@ release (0.3.0), ROSS's latest commit hash was c04babe, so this revision is
cd build
../configure --with-ross=/path/to/ross/install --prefix=/path/to/codes-base/install CC=mpicc
To enable network tracing with dumpi, use optional --with-dumpi = /path/to/dumpi/install with configure.
3 - Build and install codes-base
make && make install
......
......@@ -116,6 +116,16 @@ enum codes_workload_op_type
CODES_WK_ALLREDUCE,
/* Generic collective operation */
CODES_WK_COL,
/* Waitall operation */
CODES_NW_WAITALL,
/* Wait operation */
CODES_NW_WAIT,
/* Waitsome operation */
CODES_NW_WAITSOME,
/* Waitany operation */
CODES_NW_WAITANY,
/* Testall operation */
CODES_NW_TESTALL,
};
/* I/O operation paramaters */
......@@ -130,12 +140,14 @@ struct codes_workload_op
/* currently only used by network workloads */
double start_time;
double end_time;
double sim_start_time;
/* parameters for each operation type */
union
{
struct {
double seconds;
double nsecs;
} delay;
struct {
int count; /* num ranks in barrier, -1 means "all" */
......@@ -166,7 +178,7 @@ struct codes_workload_op
int 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;
int16_t req_id;
} send;
struct {
/* TODO: not sure why source rank is here */
......@@ -176,12 +188,19 @@ struct codes_workload_op
int 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;
int16_t req_id;
} recv;
/* TODO: non-stub for other collectives */
struct {
int num_bytes;
} collective;
struct {
int count;
int16_t* req_ids;
} waits;
struct {
int16_t req_id;
} wait;
}u;
};
......
......@@ -164,6 +164,93 @@ int handleDUMPIGeneric(const void* prm, uint16_t thread, const dumpi_time *cpu,
return 0;
}
int handleDUMPIWait(const dumpi_wait *prm, uint16_t thread,
const dumpi_time *cpu, const dumpi_time *wall,
const dumpi_perfinfo *perf, void *userarg)
{
rank_mpi_context* myctx = (rank_mpi_context*)userarg;
struct codes_workload_op wrkld_per_rank;
wrkld_per_rank.op_type = CODES_NW_WAIT;
wrkld_per_rank.u.wait.req_id = prm->request;
wrkld_per_rank.start_time = cpu->start.nsec;
wrkld_per_rank.end_time = cpu->stop.nsec;
dumpi_insert_next_op(myctx->dumpi_mpi_array, &wrkld_per_rank);
update_compute_time(cpu, myctx);
return 0;
}
int handleDUMPIWaitsome(const dumpi_waitsome *prm, uint16_t thread,
const dumpi_time *cpu, const dumpi_time *wall,
const dumpi_perfinfo *perf, void *userarg)
{
int i;
rank_mpi_context* myctx = (rank_mpi_context*)userarg;
struct codes_workload_op wrkld_per_rank;
wrkld_per_rank.op_type = CODES_NW_WAITSOME;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i];
wrkld_per_rank.start_time = cpu->start.nsec;
wrkld_per_rank.end_time = cpu->stop.nsec;
dumpi_insert_next_op(myctx->dumpi_mpi_array, &wrkld_per_rank);
update_compute_time(cpu, myctx);
return 0;
}
int handleDUMPIWaitany(const dumpi_waitany *prm, uint16_t thread,
const dumpi_time *cpu, const dumpi_time *wall,
const dumpi_perfinfo *perf, void *userarg)
{
int i;
rank_mpi_context* myctx = (rank_mpi_context*)userarg;
struct codes_workload_op wrkld_per_rank;
wrkld_per_rank.op_type = CODES_NW_WAITANY;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i];
wrkld_per_rank.start_time = cpu->start.nsec;
wrkld_per_rank.end_time = cpu->stop.nsec;
dumpi_insert_next_op(myctx->dumpi_mpi_array, &wrkld_per_rank);
update_compute_time(cpu, myctx);
return 0;
}
int handleDUMPIWaitall(const dumpi_waitall *prm, uint16_t thread,
const dumpi_time *cpu, const dumpi_time *wall,
const dumpi_perfinfo *perf, void *userarg)
{
int i;
rank_mpi_context* myctx = (rank_mpi_context*)userarg;
struct codes_workload_op wrkld_per_rank;
wrkld_per_rank.op_type = CODES_NW_WAITALL;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i];
wrkld_per_rank.start_time = cpu->start.nsec;
wrkld_per_rank.end_time = cpu->stop.nsec;
dumpi_insert_next_op(myctx->dumpi_mpi_array, &wrkld_per_rank);
update_compute_time(cpu, myctx);
return 0;
}
int handleDUMPIISend(const dumpi_isend *prm, uint16_t thread, const dumpi_time *cpu, const dumpi_time *wall, const dumpi_perfinfo *perf, void *userarg)
{
rank_mpi_context* myctx = (rank_mpi_context*)userarg;
......@@ -175,6 +262,7 @@ int handleDUMPIISend(const dumpi_isend *prm, uint16_t thread, const dumpi_time *
wrkld_per_rank.u.send.count = prm->count;
wrkld_per_rank.u.send.data_type = prm->datatype;
wrkld_per_rank.u.send.num_bytes = prm->count * get_num_bytes(prm->datatype);
wrkld_per_rank.u.send.req_id = prm->request;
wrkld_per_rank.u.send.dest_rank = prm->dest;
wrkld_per_rank.u.send.source_rank = myctx->my_rank;
wrkld_per_rank.start_time = cpu->start.nsec;
......@@ -202,6 +290,7 @@ int handleDUMPIIRecv(const dumpi_irecv *prm, uint16_t thread, const dumpi_time *
wrkld_per_rank->u.recv.dest_rank = -1;
wrkld_per_rank->start_time = cpu->start.nsec;
wrkld_per_rank->end_time = cpu->stop.nsec;
wrkld_per_rank->u.recv.req_id = prm->request;
assert(wrkld_per_rank->u.recv.num_bytes > 0);
dumpi_insert_next_op(myctx->dumpi_mpi_array, wrkld_per_rank);
......@@ -423,7 +512,7 @@ int dumpi_trace_nw_workload_load(const char* params, int rank)
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_64bit_hash, RANK_HASH_TABLE_SIZE);
if(!rank_tbl)
return -1;
}
......@@ -468,14 +557,14 @@ int dumpi_trace_nw_workload_load(const char* params, int rank)
callbacks.on_ibsend = (dumpi_ibsend_call)handleDUMPIGeneric;
callbacks.on_issend = (dumpi_issend_call)handleDUMPIGeneric;
callbacks.on_irsend = (dumpi_irsend_call)handleDUMPIGeneric;
callbacks.on_wait = (dumpi_wait_call)handleDUMPIGeneric;
callbacks.on_wait = (dumpi_wait_call)handleDUMPIWait;
callbacks.on_test = (dumpi_test_call)handleDUMPIGeneric;
callbacks.on_request_free = (dumpi_request_free_call)handleDUMPIGeneric;
callbacks.on_waitany = (dumpi_waitany_call)handleDUMPIGeneric;
callbacks.on_waitany = (dumpi_waitany_call)handleDUMPIWaitany;
callbacks.on_testany = (dumpi_testany_call)handleDUMPIGeneric;
callbacks.on_waitall = (dumpi_waitall_call)handleDUMPIGeneric;
callbacks.on_waitall = (dumpi_waitall_call)handleDUMPIWaitall;
callbacks.on_testall = (dumpi_testall_call)handleDUMPIGeneric;
callbacks.on_waitsome = (dumpi_waitsome_call)handleDUMPIGeneric;
callbacks.on_waitsome = (dumpi_waitsome_call)handleDUMPIWaitsome;
callbacks.on_testsome = (dumpi_testsome_call)handleDUMPIGeneric;
callbacks.on_iprobe = (dumpi_iprobe_call)handleDUMPIGeneric;
callbacks.on_probe = (dumpi_probe_call)handleDUMPIGeneric;
......
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