-
Notifications
You must be signed in to change notification settings - Fork 21
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
MPI vs pytest #69
Comments
Update on this: I tried out pytest-mpi as an alternative to the current So instead I took a stab at generalizing the current approach so that we can customize the behavior for different platforms. The proof-of-concept code can be seen here and here. Essentially what it does now is check for an environment variable set by the user ( I'm not entirely satisfied with this yet (I suspect there's a way to further simplify the Edit: I set up the slurm and LC-LSF executors to be used from inside an interactive job submitted by the user with |
Parsl actually has some infrastructure for this too (Execution Providers and Launchers). I wonder if we could nudge them into splitting it off into a standalone package at some point. |
@inducer Re: Different behavior for Results: MPI + Version 1: Works MPI + Version 1: Works Seems like version 2 is having trouble running python from the subprocess for some reason. Not sure what's going on with version 3. Any ideas? Edit: Version 3 works for both cases if I do |
Also, where would be a good place to stash these executor definitions? |
Looks like mpi4py uses unittest, not pytest. And they call MPI outside the test script. I don't see any launcher-handling code that we could borrow (just some CI configuration scripts for a few different platforms). I'll see if I can find any other Python codebases that use MPI. |
Dang. Well, the pickle version was looking pretty nice until I set up a test that used an array context and ran into this: pickled_test = pickle.dumps(test).hex()
> pickled_args = pickle.dumps(args).hex()
E AttributeError: Can't pickle local object 'pytest_generate_tests_for_pyopencl_array_context.<locals>.ArrayContextFactory'
test_partition.py:131: AttributeError Unless someone happens to know a workaround, I think that spells doom for this approach... |
mpiexec python -m pytest
) and "MPI inside pytest" (as meshmode currently does.If we choose "pytest inside MPI", then pytest-mpi might come in handy.
cc @lukeolson @MTCam
The text was updated successfully, but these errors were encountered: