Skip to content

Commit 06b0c51

Browse files
authored
Merge pull request #31 from fverdugo/mpi_init
Mpi init
2 parents 2792ec7 + 5a6d806 commit 06b0c51

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PartitionedArrays"
22
uuid = "5a9dfac6-5c52-46f7-8278-5e2210713be9"
33
authors = ["Francesc Verdugo <[email protected]> and contributors"]
4-
version = "0.2.1"
4+
version = "0.2.2"
55

66
[deps]
77
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"

src/MPIBackend.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ function get_part_ids(b::MPIBackend,nparts::Tuple)
1919
end
2020

2121
function prun(driver::Function,b::MPIBackend,nparts)
22-
MPI.Init()
22+
if !MPI.Initialized()
23+
MPI.Init()
24+
end
2325
#try
2426
part = get_part_ids(b,nparts)
2527
driver(part)

0 commit comments

Comments
 (0)