Use local installation of MPI/PETSc?

I have a sneaking suspicion that the conda-forge versions of mpi/petsc are not as fast as my locally installed OpenMPI and PETSc version. I have some evidence of this, as I used the osu_bw.py bandwidth test (see MVAPICH :: Benchmarks), and found that the bandwidth in a local installation of mpi4py was quite a bit higher than the conda-forge binary.

This makes me suspicious of the petsc4py installation as well, which I have not tested (the “streams” benchmark would be useful here, but I don’t know how to test that in pets4py).

Anyway, I’ve looked a fair bit, and as far as I can tell, the only way to use local installations of mpi4py/petsc4py is to compile all of fenicsx/dolfinx/ffcx/ufl/basix/etc from source, which is a pain, though not impossible. However, I would really prefer to not do that.

Does anyone know a way to force a conda-forge installation of fenics-dolfinx to use local installations of mpi4py/petsc4py?

Thanks!

The whole point of conda is to get pre-built, compatible binaries.

There are probably ways of doing it in a native mode, but it is far out of my own expertise.

If you want an optimized environment i would suggest using spack:

That makes sense, I was hoping that there would be some way to do this, but what you say about Conda makes sense. Thanks!