I’m running MacOS 10.15.6 and I use OpenMPI to run Julia programs. It worked fine with Julia 1.1. Then I uninstalled Julia 1.1, installed Julia 1.5.3, added the MPI.jl package, and now I get the following error whenever I run MPI:
You appear to have run julia under a different `mpiexec` than the one used by MPI.jl
The command I’m running from the terminal is:
mpirun julia test_mpi.jl
I have version 4.0.5 of Open MPI installed:
Dan@Daniels-MacBook-Pro 2DMT % mpirun --version
mpirun (Open MPI) 4.0.5
What I’ve noticed is that every process thinks it’s rank 0 and knows of no other processes, even though there should be 4 (the number of cores on my Macbook.
Does anyone know how I’m running a different version of julia than MPI.jl? I installed MPI.jl the usual way:
Pkg.add("MPI")
I don’t have any other versions of julia installed, as I cleaned my computer of everything julia related before installing julia 1.5.3.
The code I’m running is very simple:
import MPI
MPI.Init()
comm = MPI.COMM_WORLD
rank = MPI.Comm_rank(comm)
nproc = MPI.Comm_size(comm)
println("My rank is ",rank," and I am 1 of ",nproc," processes.")
MPI.Barrier(comm)
MPI.Finalize()
Running this code yields the above warning, plus
My rank is 0 and I am 1 of 1 processes