Error in bulid MPI

Hi,

I had an error when I built MPI on my MacBook:

(@v1.4) pkg> build MPI
   Building MPI → `~/.julia/packages/MPI/k7f4E/deps/build.log`
┌ Error: Error building `MPI`: 
│ [ Info: using system MPI
│ ERROR: LoadError: libmpi could not be found
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] top-level scope at /Users/ke/.julia/packages/MPI/k7f4E/deps/build.jl:75
│  [3] include(::String) at ./client.jl:439
│  [4] top-level scope at none:5
│ in expression starting at /Users/ke/.julia/packages/MPI/k7f4E/deps/build.jl:63
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:899

I have installed open_mpi via Homebrew before I built MPI in Julia.

Could anyone help me to fix it? Thank you!

Hi, it seems like MPI.jl could not find your installation of OpenMPI.

If you know the path to that installation, you can try setting the JULIA_MPI_PATH environment variable before building again, as detailed in the MPI.jl docs.

1 Like

Yeah, you are right!
I add a line to .bash_profile:

export JULIA_MPI_PATH=/usr/local/Cellar/open-mpi/4.0.4_1

and build MPI again, then it worked.

Thank you!