Skip to content

Can't open more than 234 files over the course of a program run #4336

Closed
@william-dawson

Description

@william-dawson

Background information

I'm sure that this bug is rarely encountered, but I encountered this when testing my code, which involves running it with a large number of parameters.

What version of Open MPI are you using? (e.g., v1.10.3, v2.1.0, git branch name and hash, etc.)

2.1.2

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

Installed using homebrew.

Please describe the system on which you are running

Mac OS 10.12.6
MacBook Pro (Retina, 13-inch, Early 2015)


Details of the problem

You can reproduce the code with the following Fortran program:

PROGRAM TestFileIO
  USE MPI
  IMPLICIT NONE
  INTEGER :: counter
  INTEGER :: mpi_err
  INTEGER :: mpi_file_handler
  INTEGER(KIND=MPI_OFFSET_KIND), PARAMETER :: zero_size = 0

  CALL MPI_Init(mpi_err)

  DO counter = 1, 250
    CALL MPI_File_open(MPI_COMM_WORLD, "test.txt", &
        & IOR(MPI_MODE_CREATE,MPI_MODE_WRONLY), MPI_INFO_NULL, &
        & mpi_file_handler, mpi_err)
    CALL MPI_File_close(mpi_file_handler, mpi_err)
  END DO

  CALL MPI_Finalize(mpi_err)
END PROGRAM

Compile with: mpif90 test.f90 -o test
Run with: mpirun -np 1 ./test

[redacted] mca_sharedfp_sm_file_open: Error, unable to open file for mmap: /tmp/OMPIO_test.txt_-1648689151_.sm
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open
[redacted] mca_sharedfp_sm_file_open: Error during file open

I also tried putting sleep statements after the close calls, but the same error occurs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions