X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bd7d5780ee8b73efd58c83f5d6f864d0a941b3ed..29626b6969473f635cfb4f0734a10d6fb21516ae:/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c diff --git a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c index b3ccbfbeb1..5fe9cc1792 100644 --- a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c +++ b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -12,6 +12,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example") static int master(int argc, char *argv[]) { + xbt_assert(argc == 5); long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s"); double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size: %s"); double task_comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); @@ -27,7 +28,7 @@ static int master(int argc, char *argv[]) snprintf(sprintf_buffer,256, "Task_%d", i); msg_task_t task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL); if (number_of_tasks < 10000 || i % 10000 == 0) - XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name, number_of_tasks, mailbox); + XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", MSG_task_get_name(task), number_of_tasks, mailbox); MSG_task_send(task, mailbox); } @@ -86,6 +87,7 @@ static int alltoall_mpi(int argc, char *argv[]) static int slave(int argc, char *argv[]) { + xbt_assert(argc == 2); msg_task_t task = NULL; XBT_ATTRIB_UNUSED int res; int id = -1;