From: Timo Heister Date: Thu, 19 Feb 2015 18:27:09 +0000 (-0500) Subject: fix status parameter in MPI_File_write X-Git-Tag: v8.3.0-rc1~441^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F577%2Fhead;p=dealii.git fix status parameter in MPI_File_write 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. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 07b89fd41c..5749190fb7 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6657,7 +6657,7 @@ void DataOutInterface::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(ss.str().c_str()), header_size, MPI_CHAR, NULL); + MPI_File_write(fh, const_cast(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::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(ss.str().c_str()), ss.str().size(), MPI_CHAR, NULL); + MPI_File_write_ordered(fh, const_cast(ss.str().c_str()), ss.str().size(), MPI_CHAR, MPI_STATUS_IGNORE); } //write footer @@ -6677,7 +6677,7 @@ void DataOutInterface::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(ss.str().c_str()), footer_size, MPI_CHAR, NULL); + MPI_File_write_shared(fh, const_cast(ss.str().c_str()), footer_size, MPI_CHAR, MPI_STATUS_IGNORE); } MPI_File_close( &fh ); #endif