Commit eaab6593 authored by Misbah Mubarak's avatar Misbah Mubarak

Fixing more warnings

parent 48b79796
......@@ -22,9 +22,8 @@ static int wrkld_id;
typedef struct nw_state nw_state;
typedef struct nw_message nw_message;
static int net_id = 0;
static float noise = 5.0;
static int num_net_lps, num_nw_lps;
static int num_net_lps;
long long num_bytes_sent=0;
long long num_bytes_recvd=0;
......@@ -43,10 +42,6 @@ long total_sends = 0;
long total_recvs = 0;
long total_delays = 0;
/* global variables for codes mapping */
static char lp_group_name[MAX_NAME_LENGTH], lp_type_name[MAX_NAME_LENGTH], annotation[MAX_NAME_LENGTH];
static int mapping_grp_id, mapping_type_id, mapping_rep_id, mapping_offset;
enum MPI_NW_EVENTS
{
MPI_OP_GET_NEXT=1,
......@@ -187,6 +182,8 @@ void nw_test_event_handler(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
{
(void)bf;
codes_workload_get_next_rc(wrkld_id, 0, (int)s->nw_id, &m->op);
if(m->op.op_type == CODES_WK_END)
return;
......@@ -272,6 +269,8 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l
static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
{
(void)bf;
struct codes_workload_op mpi_op;
codes_workload_get_next(wrkld_id, 0, (int)s->nw_id, &mpi_op);
memcpy(&m->op, &mpi_op, sizeof(struct codes_workload_op));
......@@ -366,7 +365,7 @@ void nw_test_finalize(nw_state* s, tw_lp* lp)
total_delays += s->num_delays;
total_collectives += s->num_cols;
printf("\n LP %ld total sends %ld receives %ld wait_alls %ld waits %ld ", lp->gid, s->num_sends,s->num_recvs, s->num_waitall, s->num_wait);
printf("\n LP %llu total sends %ld receives %ld wait_alls %ld waits %ld ", lp->gid, s->num_sends,s->num_recvs, s->num_waitall, s->num_wait);
avg_time += s->total_time;
avg_compute_time += s->compute_time;
avg_comm_time += (s->total_time - s->compute_time);
......@@ -409,8 +408,6 @@ static void nw_add_lp_type()
int main( int argc, char** argv )
{
int rank, nprocs;
int num_nets;
int* net_ids;
g_tw_ts_end = s_to_ns(60*60*24*365); /* one year, in nsecs */
......@@ -446,7 +443,6 @@ int main( int argc, char** argv )
double total_avg_send_time;
double total_avg_wait_time;
double total_avg_recv_time;
double total_avg_col_time;
double total_avg_comp_time;
long overall_sends, overall_recvs, overall_waits, overall_cols;
......@@ -466,11 +462,10 @@ int main( int argc, char** argv )
MPI_Reduce(&total_collectives, &overall_cols, 1, MPI_LONG, MPI_SUM, 0, MPI_COMM_WORLD);
if(!g_tw_mynode)
printf("\n Total bytes sent %lld recvd %lld \n avg runtime %lf \n avg comm time %lf avg compute time %lf \n avg collective time %lf avg send time %lf \n avg recv time %lf \n avg wait time %lf \n total sends %ld total recvs %ld total waits %ld total collectives %ld ", total_bytes_sent, total_bytes_recvd,
printf("\n Total bytes sent %lld recvd %lld \n avg runtime %lf \n avg comm time %lf avg compute time %lf \n avg send time %lf \n avg recv time %lf \n avg wait time %lf \n total sends %ld total recvs %ld total waits %ld total collectives %ld ", total_bytes_sent, total_bytes_recvd,
avg_run_time/num_net_lps,
avg_comm_run_time/num_net_lps,
total_avg_comp_time/num_net_lps,
total_avg_col_time/num_net_lps,
total_avg_send_time/num_net_lps,
total_avg_recv_time/num_net_lps,
total_avg_wait_time/num_net_lps,
......
......@@ -28,7 +28,7 @@ static int num_routers_per_grp = 0;
static int num_nodes_per_grp = 0;
static int num_nodes_per_cn = 0;
static int num_groups = 0;
static int num_nodes = 0;
static unsigned long long num_nodes = 0;
static char lp_io_dir[256] = {'\0'};
static lp_io_handle io_handle;
......@@ -133,6 +133,7 @@ static void issue_event(
svr_state * ns,
tw_lp * lp)
{
(void)ns;
tw_event *e;
svr_msg *m;
tw_stime kickoff_time;
......@@ -239,6 +240,9 @@ static void handle_remote_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count--;
}
......@@ -248,6 +252,9 @@ static void handle_remote_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count++;
}
......@@ -257,6 +264,9 @@ static void handle_local_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count--;
}
......@@ -266,6 +276,9 @@ static void handle_local_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count++;
}
/* convert ns to seconds */
......
......@@ -126,6 +126,10 @@ tw_lptype svr_lp = {
*/
void ft_svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{
(void)lp;
(void)buffer;
(void)collect_flag;
int type = (int) m->svr_event_type;
memcpy(buffer, &type, sizeof(type));
}
......@@ -136,6 +140,10 @@ void ft_svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag
*/
void ft_svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
{
(void)s;
(void)lp;
(void)buffer;
return;
}
......@@ -146,7 +154,7 @@ st_model_types ft_svr_model_types[] = {
sizeof(int),
(model_stat_f) ft_svr_model_stat_collect,
0},
{0}
{NULL, 0, NULL, 0, NULL, 0}
};
static const st_model_types *ft_svr_get_model_stat_types(void)
......
......@@ -26,8 +26,6 @@ FILE * slimfly_results_log_2=NULL;
FILE * slimfly_ross_csv_log=NULL;
static int net_id = 0;
static int num_routers = 0;
static int num_servers = 0;
static int offset = 2;
static int traffic = 1;
static double arrival_time = 1000.0;
......@@ -45,14 +43,10 @@ static lp_io_handle io_handle;
static unsigned int lp_io_use_suffix = 0;
static int do_lp_io = 0;
/* whether to pull instead of push */
static int do_pull = 0;
static int num_servers_per_rep = 0;
static int num_routers_per_grp = 0;
static int num_nodes_per_grp = 0;
static int num_reps = 0;
static int num_groups = 0;
static int num_nodes = 0;
......@@ -197,6 +191,7 @@ static void issue_event(
svr_state * ns,
tw_lp * lp)
{
(void)ns;
tw_event *e;
svr_msg *m;
tw_stime kickoff_time;
......@@ -256,6 +251,10 @@ static void handle_kickoff_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
if(b->c1)
tw_rand_reverse_unif(lp->rng);
......@@ -270,6 +269,8 @@ static void handle_kickoff_event(
svr_msg * m,
tw_lp * lp)
{
(void)m;
char anno[MAX_NAME_LENGTH];
tw_lpid local_dest = -1, global_dest = -1;
......@@ -336,6 +337,9 @@ static void handle_remote_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count--;
}
......@@ -345,6 +349,9 @@ static void handle_remote_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count++;
}
......@@ -354,6 +361,9 @@ static void handle_local_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count--;
}
......@@ -363,19 +373,11 @@ static void handle_local_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count++;
}
/* convert ns to seconds */
static tw_stime ns_to_s(tw_stime ns)
{
return(ns / (1000.0 * 1000.0 * 1000.0));
}
/* convert seconds to ns */
static tw_stime s_to_ns(tw_stime ns)
{
return(ns * (1000.0 * 1000.0 * 1000.0));
}
int index_mine = 0;
......
......@@ -28,7 +28,7 @@ static int num_servers_per_rep = 0;
static int num_routers_per_grp = 0;
static int num_nodes_per_grp = 0;
static int num_groups = 0;
static int num_nodes = 0;
static unsigned long long num_nodes = 0;
static char lp_io_dir[256] = {'\0'};
static lp_io_handle io_handle;
......@@ -112,6 +112,8 @@ tw_lptype svr_lp = {
*/
void svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
{
(void)lp;
(void)collect_flag;
int type = (int) m->svr_event_type;
memcpy(buffer, &type, sizeof(type));
}
......@@ -122,6 +124,9 @@ void svr_event_collect(svr_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
*/
void svr_model_stat_collect(svr_state *s, tw_lp *lp, char *buffer)
{
(void)s;
(void)lp;
(void)buffer;
return;
}
......@@ -132,7 +137,7 @@ st_model_types svr_model_types[] = {
sizeof(int),
(model_stat_f) svr_model_stat_collect,
0},
{0}
{NULL, 0, NULL, 0, NULL, 0}
};
static const st_model_types *svr_get_model_stat_types(void)
......@@ -172,6 +177,8 @@ static void issue_event(
svr_state * ns,
tw_lp * lp)
{
(void)ns;
tw_event *e;
svr_msg *m;
tw_stime kickoff_time;
......@@ -278,6 +285,9 @@ static void handle_remote_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count--;
}
......@@ -287,6 +297,9 @@ static void handle_remote_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->msg_recvd_count++;
}
......@@ -296,6 +309,9 @@ static void handle_local_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count--;
}
......@@ -305,6 +321,9 @@ static void handle_local_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
(void)lp;
ns->local_recvd_count++;
}
/* convert ns to seconds */
......
......@@ -16,6 +16,9 @@ extern struct cortex_topology dragonfly_custom_cortex_topology;
int main(int argc, char** argv) {
(void)argv;
(void)argc;
#ifndef ENABLE_CORTEX
printf("\n Cortex needs to be enabled in order to run the test. See <https://xgitlab.cels.anl.gov/codes/codes/wikis/codes-cortex-install> ");
return -1;
......
......@@ -412,7 +412,6 @@ 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(myctx,prm->datatype);
printf("\n Num bytes %lld num bytes %lld ", prm->count, get_num_bytes(myctx,prm->datatype));
assert(wrkld_per_rank.u.send.num_bytes >= 0);
wrkld_per_rank.u.send.req_id = prm->request;
wrkld_per_rank.u.send.dest_rank = prm->dest;
......
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