Commit 9afa57d1 authored by Jonathan Jenkins's avatar Jonathan Jenkins

squash warnings

parent 790aa397
......@@ -71,12 +71,12 @@ struct codes_cb_params {
#define SANITY_CHECK_CB(_cb_info_ptr, _ret_type) \
do { \
int _total_size = sizeof(_ret_type) + sizeof(int) + sizeof(msg_header);\
int _esize = (_cb_info_ptr)->event_size; \
assert(_esize > 0 && \
assert((_cb_info_ptr)->event_size > 0 && \
(_cb_info_ptr)->header_offset >= 0 && \
(_cb_info_ptr)->tag_offset >= 0 && \
(_cb_info_ptr)->cb_ret_offset >= 0); \
size_t _total_size = sizeof(_ret_type) + sizeof(int) + sizeof(msg_header);\
size_t _esize = (_cb_info_ptr)->event_size; \
assert(_esize >= _total_size); \
assert(_esize >= (_cb_info_ptr)->header_offset + sizeof(msg_header)); \
assert(_esize >= (_cb_info_ptr)->tag_offset + sizeof(int)); \
......
......@@ -11,6 +11,9 @@
#include <ross.h>
#include <assert.h>
// for printf conversions: shorthand for cast to long long unsigned format (llu)
#define LLU(x) ((unsigned long long)(x))
// simple deprecation attribute hacking
#if !defined(DEPRECATED)
# if defined(__GNUC__) || defined(__GNUG__) || defined(__clang__)
......
......@@ -308,7 +308,7 @@ static void check_add_lp_type_anno(
int lp_name_offset,
int anno_offset,
config_lpgroups_t *lpgroups){
uint64_t lpt_anno = 0;
int lpt_anno = 0;
for (; lpt_anno < lpgroups->lpannos_count; lpt_anno++){
config_anno_map_t *map = &lpgroups->lpannos[lpt_anno];
if (map->lp_name.offset == lp_name_offset){
......@@ -381,7 +381,7 @@ int configuration_get_lpgroups (ConfigHandle *handle,
SectionEntry subse[10];
size_t se_count = 10;
size_t subse_count = 10;
int i, j, lpt;
size_t i, j, lpt;
char data[256];
// buffer mgmt vars
int num_uniq_group_names = 0;
......@@ -591,7 +591,7 @@ int configuration_get_lpgroups (ConfigHandle *handle,
int configuration_get_annotation_index(const char * anno,
const config_anno_map_t * anno_map){
if (anno == NULL) return -1;
for (uint64_t i = 0; i < anno_map->num_annos; i++){
for (int i = 0; i < anno_map->num_annos; i++){
if (!strcmp(anno, anno_map->annotations[i].ptr)){
return (int)i;
}
......
......@@ -14,8 +14,8 @@
/* number of LPs assigned to the current PE (abstraction of MPI rank).
* for lp counts which are not divisible by the number of ranks, keep
* modulus around */
static int lps_per_pe_floor = 0;
static int lps_leftover = 0;
static tw_lpid lps_per_pe_floor = 0;
static tw_lpid lps_leftover = 0;
static int mem_factor = 256;
......@@ -71,13 +71,13 @@ int codes_mapping_get_lps_for_pe()
#if CODES_MAPPING_DEBUG
printf("%d lps for rank %d\n", lps_per_pe_floor+(g_tw_mynode < lps_leftover), rank);
#endif
return lps_per_pe_floor + (g_tw_mynode < lps_leftover);
return lps_per_pe_floor + ((tw_lpid)g_tw_mynode < lps_leftover);
}
/* Takes the global LP ID and returns the rank (PE id) on which the LP is mapped */
tw_peid codes_mapping( tw_lpid gid)
{
int lps_on_pes_with_leftover = lps_leftover * (lps_per_pe_floor+1);
tw_lpid lps_on_pes_with_leftover = lps_leftover * (lps_per_pe_floor+1);
if (gid < lps_on_pes_with_leftover){
return gid / (lps_per_pe_floor+1);
}
......@@ -453,7 +453,7 @@ static void codes_mapping_init(void)
tw_lpid ross_gid, ross_lid; /* ross global and local IDs */
tw_pe * pe;
char lp_type_name[MAX_NAME_LENGTH];
int nkp_per_pe = g_tw_nkp;
tw_lpid nkp_per_pe = g_tw_nkp;
tw_lpid lpid, kpid;
const tw_lptype *lptype;
......@@ -461,9 +461,9 @@ static void codes_mapping_init(void)
for(kpid = 0; kpid < nkp_per_pe; kpid++)
tw_kp_onpe(kpid, g_tw_pe[0]);
int lp_start =
tw_lpid lp_start =
g_tw_mynode * lps_per_pe_floor + mini(g_tw_mynode,lps_leftover);
int lp_end =
tw_lpid lp_end =
(g_tw_mynode+1) * lps_per_pe_floor + mini(g_tw_mynode+1,lps_leftover);
for (lpid = lp_start; lpid < lp_end; lpid++)
......@@ -549,7 +549,7 @@ void codes_mapping_setup_with_seed_offset(int offset)
// an "offset" < 0 is ignored
if (offset > 0){
for (tw_lpid l = 0; l < g_tw_nlp; l++){
for (int i = 0; i < g_tw_nRNG_per_lp; i++){
for (unsigned int i = 0; i < g_tw_nRNG_per_lp; i++){
tw_rand_initial_seed(&g_tw_lp[l]->rng[i], (g_tw_lp[l]->gid +
global_nlps * offset) * g_tw_nRNG_per_lp + i);
}
......@@ -597,7 +597,7 @@ const char* codes_mapping_get_annotation_by_lpid(tw_lpid gid){
*/
const config_anno_map_t *
codes_mapping_get_lp_anno_map(const char *lp_name){
for (uint64_t i = 0; i < lpconf.lpannos_count; i++){
for (int i = 0; i < lpconf.lpannos_count; i++){
if (strcmp(lp_name, lpconf.lpannos[i].lp_name.ptr) == 0){
return &lpconf.lpannos[i];
}
......
......@@ -56,6 +56,7 @@ static int jobmap_identity_to_global(struct codes_jobmap_id id, void const * ctx
int jobmap_identity_get_num_jobs(void const * ctx)
{
(void)ctx;
return 1;
}
......
......@@ -192,7 +192,7 @@ static tw_stime transfer_time_table (lsm_state_t *ns,
double disk_rate;
double disk_seek;
double disk_overhead;
int i;
unsigned int i;
/* find nearest size rounded down. */
for (i = 0; i < ns->model->bins; i++)
......@@ -600,6 +600,7 @@ static void handle_io_request(lsm_state_t *ns,
lsm_message_t *m_in,
tw_lp *lp)
{
(void)b;
tw_stime queue_time, t_time;
tw_event *e;
lsm_message_t *m_out;
......@@ -670,6 +671,8 @@ static void handle_rev_io_request(lsm_state_t *ns,
lsm_message_t *m_in,
tw_lp *lp)
{
(void)b;
(void)lp;
lsm_stats_t *stat;
stat = find_stats(data->category, ns);
......@@ -808,7 +811,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->request_sizes = (unsigned int*)malloc(sizeof(int)*length);
assert(model->request_sizes);
model->bins = length;
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->request_sizes[i] = atoi(values[i]);
}
......@@ -821,7 +824,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->write_rates = (double*)malloc(sizeof(double)*length);
assert(model->write_rates);
assert(length == model->bins);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->write_rates[i] = strtod(values[i], NULL);
}
......@@ -834,7 +837,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->read_rates = (double*)malloc(sizeof(double)*length);
assert(model->read_rates);
assert(model->bins == length);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->read_rates[i] = strtod(values[i], NULL);
}
......@@ -847,7 +850,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->write_overheads = (double*)malloc(sizeof(double)*length);
assert(model->write_overheads);
assert(model->bins == length);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->write_overheads[i] = strtod(values[i], NULL);
}
......@@ -860,7 +863,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->read_overheads = (double*)malloc(sizeof(double)*length);
assert(model->read_overheads);
assert(model->bins == length);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->read_overheads[i] = strtod(values[i], NULL);
}
......@@ -873,7 +876,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->write_seeks = (double*)malloc(sizeof(double)*length);
assert(model->write_seeks);
assert(model->bins == length);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->write_seeks[i] = strtod(values[i], NULL);
}
......@@ -886,7 +889,7 @@ static void read_config(ConfigHandle *ch, char const * anno, disk_model_t *model
model->read_seeks = (double*)malloc(sizeof(double)*length);
assert(model->read_seeks);
assert(model->bins == length);
for (int i = 0; i < length; i++)
for (size_t i = 0; i < length; i++)
{
model->read_seeks[i] = strtod(values[i], NULL);
}
......@@ -914,7 +917,7 @@ void lsm_configure(void)
read_config(&config, NULL, &model_unanno);
}
for (uint64_t i = 0; i < anno_map->num_annos; i++){
for (int i = 0; i < anno_map->num_annos; i++){
char const * anno = anno_map->annotations[i].ptr;
read_config(&config, anno, &models_anno[i]);
}
......
......@@ -8,7 +8,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "codes/lp-io.h"
#include <codes/lp-io.h>
#include <codes/codes.h>
struct io_buffer
{
......@@ -116,8 +117,8 @@ int lp_io_write_rev(tw_lpid gid, char* identifier){
id = id->next;
}
if (!id){
fprintf(stderr, "Error: identifier %s not found on reverse for LP %lu.",
identifier,gid);
fprintf(stderr, "Error: identifier %s not found on reverse for LP %llu.",
identifier,LLU(gid));
return(-1);
}
......@@ -131,7 +132,7 @@ int lp_io_write_rev(tw_lpid gid, char* identifier){
buf = buf->next;
}
if (!buf){
fprintf(stderr, "Error: no lp-io write buffer found for LP %lu (reverse write)\n", gid);
fprintf(stderr, "Error: no lp-io write buffer found for LP %llu (reverse write)\n", LLU(gid));
return(-1);
}
......
......@@ -237,9 +237,10 @@ static void handle_resource_free(
tw_bf * b,
resource_msg * m,
tw_lp * lp){
(void)b;
assert(!resource_free(m->i.req, m->i.tok, &ns->r));
/* create an event to pop the next queue item */
tw_event *e = codes_event_new(lp->gid, codes_local_latency(lp), lp);
tw_event *e = tw_event_new(lp->gid, codes_local_latency(lp), lp);
resource_msg *m_deq = (resource_msg*)tw_event_data(e);
msg_set_header(resource_magic, RESOURCE_DEQ, lp->gid, &m_deq->i.h);
m_deq->i.tok = m->i.tok; /* only tok is needed, all others grabbed from q */
......@@ -250,6 +251,7 @@ static void handle_resource_free_rc(
tw_bf * b,
resource_msg * m,
tw_lp * lp){
(void)b;
assert(!resource_get(m->i.req, m->i.tok, &ns->r));
codes_local_latency_reverse(lp);
}
......@@ -281,7 +283,7 @@ static void handle_resource_deq(
resource_response(&p->m.cb, lp, ret, TOKEN_DUMMY);
free(p);
/* additionally attempt to dequeue next one down */
tw_event *e = codes_event_new(lp->gid, codes_local_latency(lp), lp);
tw_event *e = tw_event_new(lp->gid, codes_local_latency(lp), lp);
resource_msg *m_deq = (resource_msg*)tw_event_data(e);
msg_set_header(resource_magic, RESOURCE_DEQ, lp->gid, &m_deq->i.h);
/* only tok is needed, all others grabbed from q */
......@@ -320,6 +322,7 @@ static void handle_resource_reserve(
tw_bf * b,
resource_msg * m,
tw_lp * lp){
(void)b;
resource_token_t tok;
int ret = resource_reserve(m->i.req, &tok, &ns->r);
assert(!ret);
......@@ -330,6 +333,7 @@ static void handle_resource_reserve_rc(
tw_bf * b,
resource_msg * m,
tw_lp * lp){
(void)b;
/* this reversal method is essentially a hack that relies on each
* sequential reserve appending to the end of the list
* - we expect reserves to happen strictly at the beginning of the
......@@ -395,8 +399,8 @@ void resource_finalize(
struct qlist_head *ent;
for (int i = 0; i < MAX_RESERVE+1; i++){
qlist_for_each(ent, &ns->pending[i]){
fprintf(stderr, "WARNING: resource LP %lu has a pending allocation\n",
lp->gid);
fprintf(stderr, "WARNING: resource LP %llu has a pending allocation\n",
LLU(lp->gid));
}
}
......@@ -408,12 +412,12 @@ void resource_finalize(
"# format: <LP> <max used general> <max used token...>\n");
lp_io_write(lp->gid, RESOURCE_LP_NM, written, out_buf);
}
written = sprintf(out_buf, "%lu", lp->gid);
written = sprintf(out_buf, "%llu", LLU(lp->gid));
// compute peak resource usage
// TODO: wrap this up in the resource interface
for (int i = 0; i < ns->r.num_tokens+1; i++){
written += sprintf(out_buf+written, " %lu", ns->r.max[i]-ns->r.min_avail[i]);
for (unsigned i = 0; i < ns->r.num_tokens+1; i++){
written += sprintf(out_buf+written, " %llu", LLU(ns->r.max[i]-ns->r.min_avail[i]));
}
written += sprintf(out_buf+written, "\n");
lp_io_write(lp->gid, RESOURCE_LP_NM, written, out_buf);
......@@ -452,7 +456,7 @@ void resource_lp_configure(){
assert(avail > 0);
avail_unanno = (uint64_t)avail;
}
for (uint64_t i = 0; i < anno_map->num_annos; i++){
for (int i = 0; i < anno_map->num_annos; i++){
ret = configuration_get_value_longint(&config, RESOURCE_LP_NM,
"available", anno_map->annotations[i].ptr, &avail);
if (ret){
......
......@@ -60,18 +60,22 @@ static void template_finalize(
/* event type handlers */
static void handle_template_a(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp);
static void handle_template_b(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp);
static void handle_template_a_rev(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp);
static void handle_template_b_rev(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp);
......@@ -102,6 +106,8 @@ void template_init(){
void template_lp_init(
template_state * ns,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)lp;
/* Fill me in... */
}
......@@ -114,10 +120,10 @@ void template_event_handler(
switch (m->event_type){
case TEMPLATE_A:
handle_template_a(ns, m, lp);
handle_template_a(ns, b, m, lp);
break;
case TEMPLATE_B:
handle_template_b(ns, m, lp);
handle_template_b(ns, b, m, lp);
break;
/* ... */
default:
......@@ -135,10 +141,10 @@ void template_rev_handler(
switch (m->event_type){
case TEMPLATE_A:
handle_template_a_rev(ns, m, lp);
handle_template_a_rev(ns, b, m, lp);
break;
case TEMPLATE_B:
handle_template_b_rev(ns, m, lp);
handle_template_b_rev(ns, b, m, lp);
break;
/* ... */
default:
......@@ -150,33 +156,55 @@ void template_rev_handler(
void template_finalize(
template_state * ns,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)lp;
/* Fill me in... */
}
/* event type handlers */
void handle_template_a(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)b;
(void)m;
(void)lp;
}
void handle_template_b(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)b;
(void)m;
(void)lp;
}
void handle_template_a_rev(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)b;
(void)m;
(void)lp;
}
void handle_template_b_rev(
template_state * ns,
tw_bf * b,
template_msg * m,
tw_lp * lp){
(void)ns; // avoid warnings...
(void)b;
(void)m;
(void)lp;
}
/**** END IMPLEMENTATIONS ****/
......
......@@ -5,7 +5,7 @@
*/
#include "lp_template.h"
int main(int argc, char *argv[])
int main()
{
/* won't actually be called - just here to make linker happy */
template_init();
......
......@@ -7,7 +7,8 @@
#include <assert.h>
#include <getopt.h>
#include <stdio.h>
#include "codes/codes-workload.h"
#include <codes/codes-workload.h>
#include <codes/codes.h>
#include <inttypes.h>
static char type[128] = {'\0'};
......
......@@ -6,8 +6,9 @@
#include <assert.h>
#include "ross.h"
#include "codes/codes-workload.h"
#include <ross.h>
#include <codes/codes-workload.h>
#include <codes/codes.h>
/* list of available methods. These are statically compiled for now, but we
* could make generators optional via autoconf tests etc. if needed
......@@ -232,6 +233,7 @@ void codes_workload_get_next_rc(
int rank,
const struct codes_workload_op *op)
{
(void)wkld_id; // currently unused
struct rank_queue *tmp;
struct rc_op *tmp_op;
......@@ -304,24 +306,24 @@ void codes_workload_print_op(
app_id, rank, op->u.barrier.count, op->u.barrier.root);
break;
case CODES_WK_OPEN:
fprintf(f, "op: app:%d rank:%d type:open file_id:%lu flag:%d\n",
app_id, rank, op->u.open.file_id, op->u.open.create_flag);
fprintf(f, "op: app:%d rank:%d type:open file_id:%llu flag:%d\n",
app_id, rank, LLU(op->u.open.file_id), op->u.open.create_flag);
break;
case CODES_WK_CLOSE:
fprintf(f, "op: app:%d rank:%d type:close file_id:%lu\n",
app_id, rank, op->u.close.file_id);
fprintf(f, "op: app:%d rank:%d type:close file_id:%llu\n",
app_id, rank, LLU(op->u.close.file_id));
break;
case CODES_WK_WRITE:
fprintf(f, "op: app:%d rank:%d type:write "
"file_id:%lu off:%lu size:%lu\n",
app_id, rank, op->u.write.file_id, op->u.write.offset,
op->u.write.size);
"file_id:%llu off:%llu size:%llu\n",
app_id, rank, LLU(op->u.write.file_id), LLU(op->u.write.offset),
LLU(op->u.write.size));
break;
case CODES_WK_READ:
fprintf(f, "op: app:%d rank:%d type:read "
"file_id:%lu off:%lu size:%lu\n",
app_id, rank, op->u.read.file_id, op->u.read.offset,
op->u.read.size);
"file_id:%llu off:%llu size:%llu\n",
app_id, rank, LLU(op->u.read.file_id), LLU(op->u.read.offset),
LLU(op->u.read.size));
break;
case CODES_WK_SEND:
fprintf(f, "op: app:%d rank:%d type:send "
......@@ -365,7 +367,7 @@ void codes_workload_print_op(
break;
case CODES_WK_REQ_FREE:
fprintf(f, "op: app:%d rank:%d type:req free "
" req:%ld ",
" req:%d ",
app_id, rank,
op->u.free.req_id);
break;
......
......@@ -86,19 +86,19 @@ static void * checkpoint_workload_read_config(
int rc;
rc = configuration_get_value_double(&config, section_name, "checkpoint_sz",
rc = configuration_get_value_double(handle, section_name, "checkpoint_sz",
annotation, &p->checkpoint_sz);
assert(!rc);
rc = configuration_get_value_double(&config, section_name,
rc = configuration_get_value_double(handle, section_name,
"checkpoint_wr_bw", annotation, &p->checkpoint_wr_bw);
assert(!rc);
rc = configuration_get_value_int(&config, section_name, "total_checkpoints",
rc = configuration_get_value_int(handle, section_name, "total_checkpoints",
annotation, &p->total_checkpoints);
assert(!rc);
rc = configuration_get_value_double(&config, section_name, "mtti",
rc = configuration_get_value_double(handle, section_name, "mtti",
annotation, &p->mtti);
assert(!rc);
......
......@@ -162,6 +162,7 @@ static int convertTypes(int inst)
/* Gets the next operation specified in the workload file for the simulated MPI rank */
void iolang_io_workload_get_next(int app_id, int rank, struct codes_workload_op *op)
{
(void)app_id;
/* If the number of simulated compute nodes per LP is initialized only then we get the next operation
else we return an error code may be? */
codes_iolang_wrkld_state_per_rank* next_wrkld;
......
......@@ -9,6 +9,7 @@
#include <codes/codes-workload.h>
#include <codes/quickhash.h>
#include <codes/quicklist.h>
#include <codes/codes.h>
#define DEFAULT_HASH_TBL_SIZE 1024
......@@ -71,6 +72,7 @@ static void * iomock_workload_read_config(
char const * annotation,
int num_ranks)
{
(void)num_ranks; // not needed for this workload
iomock_params *p = malloc(sizeof(*p));
assert(p);
......
......@@ -341,6 +341,7 @@ static int recorder_io_workload_load(const char *params, int app_id, int rank)
/* pull the next trace (independent or collective) for this rank from its trace context */
static void recorder_io_workload_get_next(int app_id, int rank, struct codes_workload_op *op)
{
(void)app_id; // no need for this here
struct qhash_head *hash_link = NULL;
struct rank_traces_context *tmp = NULL;
......
......@@ -43,6 +43,8 @@ static int test_workload_load(const char* params, int app_id, int rank)
/* no params in this case; this example will work with any number of
* ranks
*/
(void)params;
(void)app_id;
struct wkload_stream_state* newv;
newv = (struct wkload_stream_state*)malloc(sizeof(*newv));
......@@ -90,6 +92,7 @@ static int test_workload_load(const char* params, int app_id, int rank)
/* find the next workload operation to issue for this rank */
static void test_workload_get_next(int app_id, int rank, struct codes_workload_op *op)
{
(void)app_id;
struct wkload_stream_state* tmp = wkload_streams;
struct wkload_stream_state* tmp2 = wkload_streams;
......
......@@ -184,7 +184,7 @@ static void svr_init(
/* skew each kickoff event slightly to help avoid event ties later on */
kickoff_time = g_tw_lookahead + tw_rand_unif(lp->rng);
e = codes_event_new(lp->gid, kickoff_time, lp);
e = tw_event_new(lp->gid, kickoff_time, lp);
m = tw_event_data(e);
msg_set_header(magic, KICKOFF, lp->gid, &m->h);
tw_event_send(e);
......@@ -279,6 +279,8 @@ static void handle_kickoff_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
double rate;
double seek;
......@@ -318,6 +320,8 @@ static void handle_kickoff_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
(void)m;
lsm_io_event_rc(lp);
lsm_io_event_rc(lp);
......@@ -334,6 +338,7 @@ static void handle_ack_rev_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
if(m->incremented_flag)
{
lsm_io_event_rc(lp);
......@@ -349,6 +354,7 @@ static void handle_ack_event(
svr_msg * m,
tw_lp * lp)
{
(void)b;
if (LSM_DEBUG)
printf("handle_ack_event(), lp %llu.\n",
(unsigned long long)lp->gid);
......@@ -384,6 +390,9 @@ static void handle_local_event(
svr_msg * m,
tw_lp * lp)
{
(void)ns;
(void)b;
(void)m;
if (LSM_DEBUG)
printf("handle_local_event(), lp %llu.\n",
(unsigned long long)lp->gid);
......
......@@ -150,7 +150,7 @@ static void svr_init(
/* skew each kickoff event slightly to help avoid event ties later on */
kickoff_time = g_tw_lookahead + tw_rand_unif(lp->rng);
e = codes_event_new(lp->gid, kickoff_time, lp);
e = tw_event_new(lp->gid, kickoff_time, lp);
m = tw_event_data(e);
m->event_type = KICKOFF;
tw_event_send(e);
......@@ -199,10 +199,11 @@ static void svr_finalize(
svr_state * ns,
tw_lp * lp)
{
(void)ns;
char buffer[256];
int ret;
sprintf(buffer, "LP %ld finalize data\n", (long)lp->gid);
sprintf(buffer, "LP %llu finalize data\n", LLU(lp->gid));
/* test having everyone write to same identifier */
ret = lp_io_write(lp->gid, "node_state_pointers", strlen(buffer)+1, buffer);
......@@ -218,7 +219,7 @@ static void svr_finalize(
/* test having one lp write two buffers to the same id */
if(lp->gid == 5)
{
sprintf(buffer, "LP %ld finalize data (intentional duplicate)\n", (long)lp->gid);
sprintf(buffer, "LP %llu finalize data (intentional duplicate)\n", LLU(lp->gid));
ret = lp_io_write(lp->gid, "node_state_pointers", strlen(buffer)+1, buffer);
assert(ret == 0);
}
......@@ -239,6 +240,10 @@ static void handle_kickoff_rev_event(
tw_lp * lp)
{
assert(0);
(void)ns;
(void)b;
(void)m;
(void)lp;
return;
}
......@@ -253,6 +258,10 @@ static void handle_kickoff_event(
//printf("handle_kickoff_event(), lp %llu.\n", (unsigned long long)lp->gid);
/* do nothing */
(void)ns;
(void)b;
(void)m;
(void)lp;
}
/*
......
......@@ -8,6 +8,7 @@
#include <mpi.h>
#include <codes/codes-mapping-context.h>
#include <codes/configuration.h>
#include <codes/codes.h>
#define ERR(_fmt, ...) \
do { \
......@@ -41,8 +42,8 @@ int main(int argc, char *argv[])
rtn_id = codes_mctx_to_lpid(&direct, NULL, 0);
if (12ul != rtn_id)
ERR("global_direct mapping: expected %lu, got %lu",
12ul, rtn_id);
ERR("global_direct mapping: expected %llu, got %llu",
12ull, LLU(rtn_id));
rtn_anno = codes_mctx_get_annotation(&direct, NULL, 0);