Commit f8b0015e authored by Caitlin Ross's avatar Caitlin Ross

cleaning up most build warnings

parent 40598e19
......@@ -1894,6 +1894,7 @@ YY_BUFFER_STATE CodesIOKernel__scan_bytes (yyconst char * yybytes, int _yybyte
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
(void) yyscanner;
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
......@@ -2238,11 +2239,13 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
void *CodesIOKernel_alloc (yy_size_t size , yyscan_t yyscanner)
{
(void) yyscanner;
return (void *) malloc( size );
}
void *CodesIOKernel_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
(void) yyscanner;
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
......@@ -2255,6 +2258,7 @@ void *CodesIOKernel_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
void CodesIOKernel_free (void * ptr , yyscan_t yyscanner)
{
(void) yyscanner;
free( (char *) ptr ); /* see CodesIOKernel_realloc() for (char *) cast */
}
......
......@@ -365,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 %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);
printf("\n LP %lu 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);
......
......@@ -55,8 +55,8 @@ static int num_net_traces = 0;
static int num_dumpi_traces = 0;
static int64_t EAGER_THRESHOLD = 8192;
static long num_ops = 0;
static int upper_threshold = 1048576;
//static long num_ops = 0;
//static int upper_threshold = 1048576;
static int alloc_spec = 0;
static tw_stime self_overhead = 10.0;
static tw_stime mean_interval = 100000;
......@@ -801,7 +801,7 @@ void arrive_syn_tr(nw_state * s, tw_bf * bf, nw_message * m, tw_lp * lp)
// printf("\n Data arrived %d total data %ld ", m->fwd.num_bytes, s->syn_data);
if(s->local_rank == 0)
{
printf("\n Data arrived %lld rank %llu total data %ld ", m->fwd.num_bytes, s->nw_id, s->syn_data);
printf("\n Data arrived %ld rank %lu total data %ld ", m->fwd.num_bytes, s->nw_id, s->syn_data);
/* if(s->syn_data > upper_threshold)
if(s->local_rank == 0)
{
......@@ -836,6 +836,7 @@ static void print_msgs_queue(struct qlist_head * head, int is_send)
struct qlist_head * ent = NULL;
mpi_msgs_queue * current = NULL;
(void)current;
qlist_for_each(ent, head)
{
current = qlist_entry(ent, mpi_msgs_queue, ql);
......
......@@ -328,7 +328,7 @@ static void handle_kickoff_event(
int rand_node_intra_id = tw_rand_integer(lp->rng, 0, num_nodes_per_grp-1);
local_dest = (rand_group * num_nodes_per_grp) + rand_node_intra_id;
printf("\n LP %ld sending to %ld num nodes %d ", local_id, local_dest, num_nodes);
printf("\n LP %d sending to %ld num nodes %llu ", local_id, local_dest, num_nodes);
}
assert(local_dest < num_nodes);
......
......@@ -577,7 +577,7 @@ int main(
int idx = 0;
int gvt_computations;
long long total_events, rollbacks, net_events;
float running_time, efficiency, event_rate;
float running_time = 0, efficiency = 0, event_rate = 0;
while (pch != NULL)
{
pch = strtok (NULL, ",");
......
......@@ -633,7 +633,7 @@ int main(
int idx = 0;
int gvt_computations;
long long total_events, rollbacks, net_events;
float running_time, efficiency, event_rate;
float running_time = 0, efficiency = 0, event_rate = 0;
while (pch != NULL)
{
pch = strtok (NULL, ",");
......
......@@ -1677,7 +1677,7 @@ static void packet_send(terminal_state * s, tw_bf * bf, terminal_custom_message
if(cur_entry->msg.packet_ID == LLU(TRACK_PKT) && lp->gid == T_ID)
printf("\n Packet %llu generated at terminal %d dest %llu size %llu num chunks %llu router-id %d %d",
printf("\n Packet %llu generated at terminal %d dest %llu size %llu num chunks %llu router-id %d %lu",
cur_entry->msg.packet_ID, s->terminal_id, LLU(cur_entry->msg.dest_terminal_id),
LLU(cur_entry->msg.packet_size), LLU(num_chunks), s->router_id, router_id);
......@@ -1906,7 +1906,7 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_custom_messag
assert(lp->gid == msg->dest_terminal_id);
if(msg->packet_ID == LLU(TRACK_PKT) && msg->src_terminal_id == T_ID)
printf("\n Packet %d arrived at lp %llu hops %d ", msg->sender_lp, LLU(lp->gid), msg->my_N_hop);
printf("\n Packet %lu arrived at lp %llu hops %d ", msg->sender_lp, LLU(lp->gid), msg->my_N_hop);
tw_stime ts = g_tw_lookahead + s->params->credit_delay + tw_rand_unif(lp->rng);
......@@ -2607,7 +2607,7 @@ get_next_stop(router_state * s,
next_stop[select_chan] % num_routers_per_mgrp, &router_dest_id);
if(msg->packet_ID == LLU(TRACK_PKT) && msg->src_terminal_id == T_ID)
printf("\n Next stop is %ld ", next_stop[select_chan]);
printf("\n Next stop is %d ", next_stop[select_chan]);
return router_dest_id;
}
......@@ -2654,7 +2654,7 @@ get_next_stop(router_state * s,
dest_lp = dests[select_chan];
}
if(msg->packet_ID == LLU(TRACK_PKT) && msg->src_terminal_id == T_ID)
printf("\n Next stop is %ld ", dest_lp);
printf("\n Next stop is %d ", dest_lp);
codes_mapping_get_lp_id(lp_group_name, LP_CONFIG_NM_ROUT, s->anno, 0, dest_lp / num_routers_per_mgrp,
dest_lp % num_routers_per_mgrp, &router_dest_id);
......
......@@ -2605,7 +2605,7 @@ void dragonfly_plus_terminal_final(terminal_state *s, tw_lp *lp)
if (s->terminal_id == 0) {
written += sprintf(s->output_buf + written, "# Format <source_id> <source_type> <dest_id> < dest_type> <link_type> <link_traffic> <link_saturation>");
}
written += sprintf(s->output_buf + written, "\n%u %s %llu %s %s %llu %lf",
written += sprintf(s->output_buf + written, "\n%u %s %u %s %s %llu %lf",
s->terminal_id, "T", s->router_id, "R", "CN", LLU(s->total_msg_size), s->busy_time);
lp_io_write(lp->gid, (char*)"dragonfly-plus-link-stats", written, s->output_buf);
......@@ -2620,7 +2620,7 @@ void dragonfly_plus_terminal_final(terminal_state *s, tw_lp *lp)
}
written = 0;
written += sprintf(s->output_buf2 + written, "%llu %llu %lf %lf %lf %lf %llu %lf\n",
written += sprintf(s->output_buf2 + written, "%lu %u %lf %lf %lf %lf %lu %lf\n",
lp->gid, s->terminal_id, s->total_time/s->finished_chunks,
s->busy_time, s->max_latency, s->min_latency,
s->finished_packets, (double)s->total_hops/s->finished_chunks);
......@@ -2688,7 +2688,7 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
{
if (d != src_rel_id) {
int dest_ab_id = local_grp_id * p->num_routers + d;
written += sprintf(s->output_buf + written, "\n%d %s %d %s %s %llu %lf",
written += sprintf(s->output_buf + written, "\n%d %s %d %s %s %ld %lf",
s->router_id,
"R",
dest_ab_id,
......@@ -2707,7 +2707,7 @@ void dragonfly_plus_router_final(router_state *s, tw_lp *lp)
int dest_rtr_id = it->dest_gid;
int port_no = it->port;
assert(port_no >= 0 && port_no < p->radix);
written += sprintf(s->output_buf + written, "\n%d %s %d %s %s %llu %lf",
written += sprintf(s->output_buf + written, "\n%d %s %d %s %s %ld %lf",
s->router_id,
"R",
dest_rtr_id,
......
......@@ -1437,7 +1437,7 @@ terminal_final( terminal_state * s, tw_lp * lp )
if(!s->terminal_id)
written = sprintf(s->output_buf, "# Format <LP id> <Terminal ID> <Total Data Size> <Avg packet latency> <# Flits/Packets finished> <Avg hops> <Busy Time>");
written += sprintf(s->output_buf + written, "\n %llu %u %llu %lf %ld %lf %lf",
written += sprintf(s->output_buf + written, "\n %llu %u %lu %lf %ld %lf %lf",
LLU(lp->gid), s->terminal_id, s->total_msg_size, s->total_time,
s->finished_packets, (double)s->total_hops/s->finished_chunks,
s->busy_time);
......
......@@ -2073,6 +2073,7 @@ void switch_packet_receive( switch_state * s, tw_bf * bf,
int max_vc_size = s->params->vc_size;
int to_terminal = 0;
(void) to_terminal;
//If going to terminal, use a different max
if(s->switch_level == 0 && output_port < s->num_lcons) {
......@@ -2923,7 +2924,7 @@ void fattree_terminal_final( ft_terminal_state * s, tw_lp * lp )
if(!s->terminal_id && !s->rail_id)
written = sprintf(s->output_buf, "# Format <LP id> <Terminal ID> <Rail ID> <Total Data Size> <Avg packet latency> <# Flits/Packets finished> <Avg hops> <Busy Time>\n");
written += sprintf(s->output_buf + written, "%llu %u %u %llu %lf %ld %lf %lf\n",
written += sprintf(s->output_buf + written, "%llu %u %u %lu %lf %ld %lf %lf\n",
LLU(lp->gid), s->terminal_id, s->rail_id, s->total_msg_size, s->total_time,
s->finished_packets, (double)s->total_hops/s->finished_chunks,
s->busy_time[0]);
......
......@@ -534,7 +534,7 @@ void model_net_base_event(
tw_lp * lp){
if(m->h.magic != model_net_base_magic)
printf("\n LP ID mismatched %llu ", lp->gid);
printf("\n LP ID mismatched %lu ", lp->gid);
assert(m->h.magic == model_net_base_magic);
......
......@@ -2095,7 +2095,7 @@ void slimfly_terminal_final( terminal_state * s,
lp_io_write(lp->gid, "slimfly-msg-stats", written, s->output_buf);
if(s->terminal_msgs[0] != NULL)
printf("[%llu] leftover terminal messages \n", lp->gid);
printf("[%lu] leftover terminal messages \n", lp->gid);
if(!s->terminal_id)
{
......@@ -2130,11 +2130,11 @@ void slimfly_router_final(router_state * s,
for(i = 0; i < s->params->radix; i++) {
for(j = 0; j < s->params->num_vcs; j++) {
if(s->queued_msgs[i][j] != NULL) {
printf("[%llu] leftover queued messages %d %d %d\n", lp->gid, i, j,
printf("[%lu] leftover queued messages %d %d %d\n", lp->gid, i, j,
s->vc_occupancy[i][j]);
}
if(s->pending_msgs[i][j] != NULL) {
printf("[%llu] lefover pending messages %d %d\n", lp->gid, i, j);
printf("[%lu] leftover pending messages %d %d\n", lp->gid, i, j);
}
}
}
......
......@@ -102,7 +102,7 @@ int lp_io_write(tw_lpid gid, char* identifier, int size, void* buffer)
}
int lp_io_write_rev(tw_lpid gid, char* identifier){
struct identifier* id, *id_prev;
struct identifier* id, *id_prev = NULL;
struct io_buffer *buf, *buf_prev;
/* find given identifier */
......
......@@ -15,7 +15,7 @@ static char type[128] = {'\0'};
static darshan_params d_params = {"", 0};
static iolang_params i_params = {0, 0, "", ""};
static recorder_params r_params = {"", 0};
static dumpi_trace_params du_params = {"", 0};
static dumpi_trace_params du_params = {"", 0, 0};
static online_comm_params oc_params = {"", "", 0};
static checkpoint_wrkld_params c_params = {0, 0, 0, 0, 0};
static iomock_params im_params = {0, 0, 1, 0, 0, 0};
......
......@@ -420,7 +420,7 @@ void codes_workload_print_op(
case CODES_WK_SEND:
fprintf(f, "op: app:%d rank:%d type:send "
"src:%d dst:%d bytes:%"PRIu64" type:%d count:%d tag:%d "
"src:%d dst:%d bytes:%d type:%d count:%d tag:%d "
//"src:%d dst:%d bytes:%d type:%d count:%d tag:%d "
"start:%.5e end:%.5e\n",
app_id, rank,
op->u.send.source_rank, op->u.send.dest_rank,
......
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