X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/292285977d176872c30cd7d8f1e81090855cb42a..bdfe4f8674f98efbf2d67ad854ef83a1d5f855ed:/src/smpi/smpi_global.c diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 1c5039687f..4ebd97af96 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -295,6 +295,10 @@ void smpi_global_init(void) for (i = 0; i < process_count; i++) { smpi_group_set_mapping(group, i, i); } + + //check correctness of MPI parameters + + xbt_assert(sg_cfg_get_int("smpi/async_small_thres")<=sg_cfg_get_int("smpi/send_is_detached_thres")); } void smpi_global_destroy(void) @@ -303,8 +307,8 @@ void smpi_global_destroy(void) int i; smpi_bench_destroy(); - smpi_group_unuse(smpi_comm_group(MPI_COMM_WORLD)); - smpi_comm_destroy(MPI_COMM_WORLD); + while(smpi_group_unuse(smpi_comm_group(MPI_COMM_WORLD))>0); + xbt_free(MPI_COMM_WORLD); MPI_COMM_WORLD = MPI_COMM_NULL; for (i = 0; i < count; i++) { smpi_group_unuse(smpi_comm_group(process_data[i]->comm_self));