-
Notifications
You must be signed in to change notification settings - Fork 925
Closed
Description
Background information
User code which does not set AMODE for MPI_File_open() causes OpenMPI to segfault
What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)
git, but also 4.1.1
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Standard 4.1.1 tarball installation, but also git master
If you are building/installing from a git clone, please copy-n-paste the output from git submodule status
.
79fadef 3rd-party/openpmix (v1.1.3-2999-g79fadef7)
f35d66e576e65405c19ee74b0665818c438bb06e 3rd-party/prrte (dev-31245-gf35d66e576)
Please describe the system on which you are running
- Operating system/version:
- Computer hardware:
- Network type:
Details of the problem
The code
MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, "mpi_file_split_collective_correctness.txt", MPI_MODE_CREATE, MPI_INFO_NULL, &fh));
fails to set AMODE to MPI_File_open(), the open is supposed to fail with error 21 (MPI_ERR_AMODE), but segfaults in:
#0 0x00007f0e2d474a69 in mca_common_ompio_file_close () from /opt/bwhpc/common/mpi/openmpi/4.1.1-gnu-11.1/lib/libmpi.so.40
#1 0x00007f0e2d526c4e in mca_io_ompio_file_close () from /opt/bwhpc/common/mpi/openmpi/4.1.1-gnu-11.1/lib/libmpi.so.40
#2 0x00007f0e2d426aea in file_destructor () from /opt/bwhpc/common/mpi/openmpi/4.1.1-gnu-11.1/lib/libmpi.so.40
#3 0x00007f0e2d427059 in ompi_file_open () from /opt/bwhpc/common/mpi/openmpi/4.1.1-gnu-11.1/lib/libmpi.so.40
#4 0x00007f0e2d44c225 in PMPI_File_open () from /opt/bwhpc/common/mpi/openmpi/4.1.1-gnu-11.1/lib/libmpi.so.40
The issue is, that the file_destructor calls down to mca_common_ompio_file_close which assumes a fully opened file trying to barrier prior to closing the file.
Metadata
Metadata
Assignees
Labels
No labels