Skip to content

Using mpi4py.futures within Jupyter notebooks #294

Answered by minrk
YarShev asked this question in Q&A
Discussion options

You must be logged in to vote

I think the key is to ensure whenever Jupyter launches a kernel, it's launched under mpiexec

To start a kernel process with mpiexec, you'll want to modify kernel.json and add mpiexec to the command launched (argv). You can locate the kernelspec directory with jupyter kernelspec list, but it will generally be at $PREFIX/share/jupyter/kernels/python3/kernel.json. You can change the command to be a more customizable launch script, rather than launching ipykernel directly, if you want to be able to e.g. try to detect whether mpiexec should be invoked or not.

You may also want to copy the python3 kernel to a new directory, e.g. mpi (this will create an 'mpi' kernel in your kernel list), if y…

Replies: 8 comments 20 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@YarShev
Comment options

@dalcinl
Comment options

@YarShev
Comment options

Comment options

You must be logged in to vote
17 replies
@dalcinl
Comment options

@YarShev
Comment options

@YarShev
Comment options

@dalcinl
Comment options

@YarShev
Comment options

Answer selected by dalcinl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #291 on January 10, 2023 11:14.