Hello Folks,

I've got a question about the opal_dss.load functionality.

If I have a construct like


buf = OBJ_NEW(opal_buffer_t);
opal_dss.load(buffer, input_ptr, num_bytes_to_load);

OBJ_RELEASE(buf);

I'm finding that input_ptr has to have been something
returned by malloc and friends or else I get heap corruption.

I can't do something like

oob_allgatherv(input_ptr, bytes_from_each_rank, output_ptr);

for (cptr = output_ptr, i = 0 ; i < pmix_size ;i ++) {
opal_dss.load(buf, cptr, bytes_from_each_rank[i]);
unpack message into dstore
cptr += bytes_from_each_rank[i];
}

I have to create a separate malloc'd buffer each time through the
loop and do a memcpy into the tmp buffer, then call opal_dss.load
for that particular tmp buffer.

Is this expected behavior of opal_dss.load?  Is there a way to
avoid these extra mallocs/memcopy's?

If I don't do the above technique, the heap allocator blows up
in OBJ_RELEASE of buffer.

Thanks,

Howard

Reply via email to