Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added xbt_assert statement to smpi_mpi_dt.c
authorChristian Heinrich <christian.heinrich@livando.com>
Wed, 18 Mar 2015 17:32:10 +0000 (18:32 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 4 Jun 2015 12:41:13 +0000 (14:41 +0200)
* This will help prevent a value <= 0

src/smpi/smpi_mpi_dt.c

index 8746df9..dd279e6 100644 (file)
@@ -406,6 +406,7 @@ void smpi_datatype_create(MPI_Datatype* new_type, int size,int lb, int ub, int h
 }
 
 void smpi_datatype_free(MPI_Datatype* type){
+  xbt_assert((*type)->in_use >= 0);
   if((*type)->attributes !=NULL){
       xbt_dict_cursor_t cursor = NULL;
       int* key;