Skip to content

[RFC] Make MPI an Optional dependency

Vicentini Filippo requested to merge PhilipVinc/remove-mpi into v3.0

Created by: PhilipVinc

We could argue that MPI is necessary to achieve high performance with netket, but people trying out the library for the first time, or students, possibly don't have MPI installed.

As it's not trivial to install it if you don't have admin access to your machine, or if you have an old distro (on linux), making it optional might go a long way to help them meet netket.

This PR has no functional change, as I had already made mpi4py an optional dependency long ago. However, while on mac it is possible to install mpi4py even without mpicc compiler (though you can't load it), on linux you cannot install mpi4py without the right compilers...

What this PR does is simply remove mpi4py from the direct dependencies of netket, and slightly reword the readme in order to say that if MPI is not installed, then it won't be used.

Still, i should add a check for mpi version>=3. in the init code.

Please let me know if you think this is a good idea or not.

Merge request reports