This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Christoph Böddeker
Recipients Christoph Böddeker, arigo, berker.peksag, serhiy.storchaka, whitespacer
Date 2017-04-09.18:40:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491763258.35.0.889373981526.issue29694@psf.upfronthosting.co.za>
In-reply-to
Content
I had a problem that can be solved with the presented change.  
But I had also problems to reproduce it in a small example.
I am not sure if a test is allowed to depend on external libraries.

The code at the end executed with
    mpirun -np 3 python test.py
always breaks with the current code of pathlib and works with the fix.

Maybe this helps to write a test and shows a usecase where this fix is necessary.

P.S.: I was not able to produce the error with multiprosessing.

from mpi4py import MPI
from pathlib import Path
import tempfile

comm = MPI.COMM_WORLD
rank = comm.rank
size = comm.size

with tempfile.TemporaryDirectory() as tmp_dir:

    tmp_dir = comm.bcast(tmp_dir, root=0)
    p = Path(tmp_dir) / 'a' / 'b'
    comm.barrier()
    p.mkdir(parents=True, exist_ok=True)
History
Date User Action Args
2017-04-09 18:40:58Christoph Böddekersetrecipients: + Christoph Böddeker, arigo, berker.peksag, serhiy.storchaka, whitespacer
2017-04-09 18:40:58Christoph Böddekersetmessageid: <1491763258.35.0.889373981526.issue29694@psf.upfronthosting.co.za>
2017-04-09 18:40:58Christoph Böddekerlinkissue29694 messages
2017-04-09 18:40:57Christoph Böddekercreate