Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MBI: display the expected diagnostic on error
[simgrid.git] / teshsuite / smpi / MBI / RMAArgGenerator.py
index 5e42794..04cef56 100755 (executable)
@@ -44,7 +44,7 @@ int main(int argc, char **argv) {
   MPI_Comm_size(MPI_COMM_WORLD, &numProcs);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
-  int *winbuf = malloc(N * sizeof(int));
+  int *winbuf = (int *)malloc(N * sizeof(int));
 
   MPI_Win win;
   MPI_Win_create(&winbuf, N * sizeof(int), 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
@@ -91,7 +91,7 @@ for e in gen.epoch:
         patterns['change_arg'] = ""
 
         # Generate a code with a null type
-        replace = patterns
+        replace = patterns.copy()
         replace['shortdesc'] = 'Invalid argument in one-sided operation.'
         replace['longdesc'] = 'A one-sided operation has MPI_DATATYPE_NULL as a type.'
         replace['outcome'] = 'ERROR: InvalidDatatype'
@@ -100,7 +100,7 @@ for e in gen.epoch:
         gen.make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace)
 
         # Generate a code with an invalid type
-        replace = patterns
+        replace = patterns.copy()
         replace['shortdesc'] = 'Invalid argument in one-sided operation.'
         replace['longdesc'] = 'Use of an invalid datatype in one-sided operation.'
         replace['outcome'] = 'ERROR: InvalidDatatype'