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

File IO race condition when restarting pigeons with MPI #311

Open
dominic-chang opened this issue Jan 23, 2025 · 1 comment
Open

File IO race condition when restarting pigeons with MPI #311

dominic-chang opened this issue Jan 23, 2025 · 1 comment

Comments

@dominic-chang
Copy link
Contributor

Hi, I recently tried to restart a pigeons run that I had going previously by firing up multiple processes that were each running.

pigeons(pt.exec_folder,
    on = Pigeons.MPIProcesses(
        n_mpi_processes = 20,
        walltime="10-00:00:00",
        n_threads = 24,
        dependencies = [
            Pigeons, 
            preamble_path
        ],
        mpiexec_args=`--mpi=pmi2`
    )
)

This resulted in the following error

ERROR: LoadError: IOError: rm("results/latest"): not a directory (ENOTDIR)
Stacktrace:
 [1] uv_error
   @ ./libuv.jl:100 [inlined]
 [2] rm(path::String; force::Bool, recursive::Bool)
   @ Base.Filesystem ./file.jl:307
 ...

I assume it's because each process is trying to remove the results/latest folder all at the same time. I'm not sure if this is a bug, or if I used the API incorrectly.

@alexandrebouchard
Copy link
Member

Thanks for reporting! It seems to occur with "rm("results/latest", force = true)" which according to Julia doc one have thought to be OK (" If force=true is passed, a non-existing path is not treated as error.") but maybe because of multithreading as you said it might not behave as advertise. I will push a fix momentarily....

alexandrebouchard added a commit that referenced this issue Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants