Running MPI jobs using MPI.jl Julia 1.1.0

Hi,

who knows that can we use MPI.jl for Julia 1.1.0 (no error, no bug)

Best!

I’m not sure I understand the question - are you saying that you have trouble using MPI.jl on Julia 1.1.0? If so it’d probably be helpful if you could produce an MWE that illustrates your problem.

1 Like

Cite

Currently MPIManager only works with Julia 0.4 . It has three modes of operation

After install MPI.jl

then


using MPI
mpirun -np 4 julia testone.jl
ERROR: syntax: extra token "4" after end of expression

You appear to be typing a shell command into Julia.

Cite

To run a Julia script with MPI, first make sure that  `using MPI`  or  `import MPI`  is included at the top of your script. You should then be able to run the MPI job as expected, e.g., with

`mpirun -np 3 julia 01-hello.jl`

How in Win10?

mpirun -np 3 julia 01-hello.jl from the command line (not julia).

the problem is terminal shows me that it’s running under 1 processor CPU, which has to be 4.

Code

import MPI
include("02-broadcast-impl.jl")

# need to also import Distributed to use addprocs()
using Distributed
function main()
    MPI.Init()



    do_broadcast()

    MPI.Finalize()
end

main()

------------------------------------------------------------------------------
 Running on 1 processes
------------------------------------------------------------------------------
[00] A:Complex{Float64}[1.0+2.0im, 2.0+4.0im, 3.0+6.0im, 4.0+8.0im, 5.0+10.0im]
[00] B:Dict("foo"=>"bar")
[00] f(3):14

How can I solve this problem in Julia 1.1.0?