Commit 86516ff3 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

fixed example

parent 37703e17
......@@ -56,20 +56,28 @@ int main(int argc, char** argv) {
ret = mona_msg_init_unexpected(mona, buf, msg_len);
ASSERT_MESSAGE(ret == NA_SUCCESS, "Could not initialize message");
na_op_id_t op_id = mona_op_create(mona);
ret = mona_msg_send_unexpected(
mona, buf, msg_len, plugin_data, addr, 0, 0, NA_OP_ID_IGNORE);
mona, buf, msg_len, plugin_data, addr, 0, 0, &op_id);
ASSERT_MESSAGE(ret == NA_SUCCESS, "Could not send message");
mona_op_destroy(mona, op_id);
ret = mona_addr_free(mona, addr);
ASSERT_MESSAGE(ret == NA_SUCCESS, "Could not free address");
} else {
MPI_Send(addr_str, 128, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
na_op_id_t op_id = mona_op_create(mona);
ret = mona_msg_recv_unexpected(
mona, buf, msg_len, plugin_data, NA_OP_ID_IGNORE);
mona, buf, msg_len, plugin_data, &op_id);
ASSERT_MESSAGE(ret == NA_SUCCESS, "Could not receive message");
mona_op_destroy(mona, op_id);
printf("[1] Receiving message from rank 0\n");
for(i = mona_msg_get_unexpected_header_size(mona); i < (int)msg_len; i++) {
......
......@@ -40,7 +40,7 @@ static void mona_progress_loop(void* uarg) {
// TODO put a high timeout value to avoid busy-spinning
// if there is no other ULT in the pool that could run
na_ret = NA_Progress(mona->na_class, mona->na_context, 0);
if (na_ret != NA_SUCCESS) {
if (na_ret != NA_SUCCESS && na_ret != NA_TIMEOUT) {
fprintf(stderr, "WARNING: unexpected return value from NA_Progress (%d)\n", na_ret);
}
}
......
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