From 9eda0c13b52408652574a5259fdeb422d7b5f980 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 19 Feb 2015 13:27:09 -0500 Subject: [PATCH] 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. --- source/base/data_out_base.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5