Skip to content

OMPIO: MPI_File_delete always calls POSIX unlink. #5443

@gbossu

Description

@gbossu

The issue is present on master, and also 3.0.x and 3.1.x (at least)

I am currently working on bringing the support for DDN’s IME burst buffer technology to OMPIO (probably a future PR). While doing so, I realized that the MPI_File_delete is implemented incorrectly in OMPIO: no matter the filesystem or file type, POSIX’s unlink is called. The delete function defined in each fs component actually never gets called.

Basically, when mca_common_ompio_file_delete is called (for MPI_File_open, the equivalent would be mca_common_ompio_file_open), no fs component is selected, POSIX unlink is called straight away.

Instead, what we should do is just the same as for the file_open call: a selection algorithm should be ran to determine which fs component should handle the deletion.

However, we can’t use the already defined mca_fs_base_delete (which performs the fs selection algorithm), because it requires an ompio file handle, and we only have a file name when deleting a file. We could create a new selection function that takes only a file name, but it would be a bad practice as :

  • It would create highly redundant code
  • For the selection algorithm, we use the query functions defined in each fs component. And these functions also require a file handle

We also can’t create a complete ompio file handle, because it requires a piece of information we don’t have: the communicator. I couldn’t find a really good way to address this issue.

I will file a PR with my work, which is a quick fix for this issue. But it’s far from perfect and could even be considered a hack. Help would be much appreciated to write a better patch.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions