Skip to content

Fix for test_load_multiple_csv#2193

Open
brownbaerchen wants to merge 5 commits intohelmholtz-analytics:mainfrom
brownbaerchen:fix_io_tests
Open

Fix for test_load_multiple_csv#2193
brownbaerchen wants to merge 5 commits intohelmholtz-analytics:mainfrom
brownbaerchen:fix_io_tests

Conversation

@brownbaerchen
Copy link
Collaborator

The test uses os.mkdir on rank 0 to create a directory in persistent storage. This fails when the directory already exists. This issue is currently preventing me from running the tests locally in parallel since only rank 0 fails and the test results in a deadlock.
This test runs only if the optional dependency pandas is installed which is why I didn't run into this issue sooner and why maybe you are not affected.

@brownbaerchen brownbaerchen requested a review from mtar March 11, 2026 08:00
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Mar 11, 2026
@brownbaerchen brownbaerchen added the High priority, urgent label Mar 11, 2026
@brownbaerchen
Copy link
Collaborator Author

Hm. The CI on Helmholtz cloud has not been triggered because I merged main locally and then pushed rather than synching here. That's not ideal.

Copy link
Collaborator

@mtar mtar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brownbaerchen, the change may lead to other smaller issues.

import pandas as pd

csv_path = os.path.join(os.getcwd(), "heat/datasets/csv_tests")
csv_path = ht.comm.bcast(tempfile.mkdtemp())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will create many temporary directories on multiprocess, but only the broadcasted one will be deleted. Furthermore, the default temporary directory is often leads to /tmp if not set otherwise. This can cause issues on HPC if more than one node is used and no environment variable is set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I am now creating the temporary directory only on rank 0 and within the current working directory of where the test is run from.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Mar 12, 2026
@ClaudiaComito ClaudiaComito added this to the 1.8.0 milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High priority, urgent

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants