]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix status parameter in MPI_File_write 577/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 19 Feb 2015 18:27:09 +0000 (13:27 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 19 Feb 2015 18:27:09 +0000 (13:27 -0500)
Reported by Thomas Geenen. Setting the MPI_Status* parameter to NULL is
not correct and fails with intel MPI. The correct argument to pass is
MPI_STATUS_IGNORE.

source/base/data_out_base.cc

index 07b89fd41c09a2ea3ee6a80cb5f81d2a1c213275..5749190fb7c881bf0cbec329e3e694e733fb5ba4 100644 (file)
@@ -6657,7 +6657,7 @@ void DataOutInterface<dim,spacedim>::write_vtu_in_parallel (const char *filename
       std::stringstream ss;
       DataOutBase::write_vtu_header(ss, vtk_flags);
       header_size = ss.str().size();
-      MPI_File_write(fh, const_cast<char *>(ss.str().c_str()), header_size, MPI_CHAR, NULL);
+      MPI_File_write(fh, const_cast<char *>(ss.str().c_str()), header_size, MPI_CHAR, MPI_STATUS_IGNORE);
     }
 
   MPI_Bcast(&header_size, 1, MPI_INT, 0, comm);
@@ -6668,7 +6668,7 @@ void DataOutInterface<dim,spacedim>::write_vtu_in_parallel (const char *filename
     DataOutBase::write_vtu_main (get_patches(), get_dataset_names(),
                                  get_vector_data_ranges(),
                                  vtk_flags, ss);
-    MPI_File_write_ordered(fh, const_cast<char *>(ss.str().c_str()), ss.str().size(), MPI_CHAR, NULL);
+    MPI_File_write_ordered(fh, const_cast<char *>(ss.str().c_str()), ss.str().size(), MPI_CHAR, MPI_STATUS_IGNORE);
   }
 
   //write footer
@@ -6677,7 +6677,7 @@ void DataOutInterface<dim,spacedim>::write_vtu_in_parallel (const char *filename
       std::stringstream ss;
       DataOutBase::write_vtu_footer(ss);
       unsigned int footer_size = ss.str().size();
-      MPI_File_write_shared(fh, const_cast<char *>(ss.str().c_str()), footer_size, MPI_CHAR, NULL);
+      MPI_File_write_shared(fh, const_cast<char *>(ss.str().c_str()), footer_size, MPI_CHAR, MPI_STATUS_IGNORE);
     }
   MPI_File_close( &fh );
 #endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.