Commit 8f5452bd authored by Jonathan Jenkins's avatar Jonathan Jenkins
Browse files

malloc the right size for wait ids in dumpi

parent 593d01bd
...@@ -270,7 +270,8 @@ int handleDUMPIWaitsome(const dumpi_waitsome *prm, uint16_t thread, ...@@ -270,7 +270,8 @@ int handleDUMPIWaitsome(const dumpi_waitsome *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITSOME; wrkld_per_rank.op_type = CODES_WK_WAITSOME;
wrkld_per_rank.u.waits.count = prm->count; wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t)); wrkld_per_rank.u.waits.req_ids =
malloc(prm->count * sizeof(*wrkld_per_rank.u.waits.req_ids));
for( i = 0; i < prm->count; i++ ) for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i]; wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i];
...@@ -290,7 +291,8 @@ int handleDUMPIWaitany(const dumpi_waitany *prm, uint16_t thread, ...@@ -290,7 +291,8 @@ int handleDUMPIWaitany(const dumpi_waitany *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITANY; wrkld_per_rank.op_type = CODES_WK_WAITANY;
wrkld_per_rank.u.waits.count = prm->count; wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t)); wrkld_per_rank.u.waits.req_ids =
malloc(prm->count * sizeof(*wrkld_per_rank.u.waits.req_ids));
for( i = 0; i < prm->count; i++ ) for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i]; wrkld_per_rank.u.waits.req_ids[i] = (int16_t)prm->requests[i];
...@@ -310,7 +312,8 @@ int handleDUMPIWaitall(const dumpi_waitall *prm, uint16_t thread, ...@@ -310,7 +312,8 @@ int handleDUMPIWaitall(const dumpi_waitall *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITALL; wrkld_per_rank.op_type = CODES_WK_WAITALL;
wrkld_per_rank.u.waits.count = prm->count; wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int16_t*)malloc(prm->count * sizeof(int16_t)); wrkld_per_rank.u.waits.req_ids =
malloc(prm->count * sizeof(*wrkld_per_rank.u.waits.req_ids));
for( i = 0; i < prm->count; i++ ) for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i]; wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i];
......
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