Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: save_csv tests does not work on certain multi-node envs. #1626

Open
JuanPedroGHM opened this issue Aug 19, 2024 · 0 comments
Open

[Bug]: save_csv tests does not work on certain multi-node envs. #1626

JuanPedroGHM opened this issue Aug 19, 2024 · 0 comments
Labels
bug Something isn't working I/O testing Implementation of tests, or test-related issues

Comments

@JuanPedroGHM
Copy link
Member

JuanPedroGHM commented Aug 19, 2024

What happened?

The csv related tests fail on multi-node environments, because the temporary directory is not available on both nodes. If that is the case, save_csv should either throw a warning to the user, or collect the data on a single node.

Code snippet triggering the error

if data.comm.rank == 0:
      tmpfile = tempfile.NamedTemporaryFile(
          prefix="test_io_", suffix=".csv", delete=False
      )
      tmpfile.close()
      filename = tmpfile.name
  else:
      filename = None
  filename = data.comm.handle.bcast(filename, root=0)

  data.save(
      filename,
      header_lines=headers,
      sep=separator,
  )

Error message or erroneous outcome

heat never exits because half the ranks are trying to open a file that does not exit.

Version

main (development branch)

Python version

3.11

PyTorch version

2.1

MPI version

OpenMPI 4.1, 5.0
@JuanPedroGHM JuanPedroGHM added bug Something isn't working testing Implementation of tests, or test-related issues I/O labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I/O testing Implementation of tests, or test-related issues
Development

No branches or pull requests

1 participant