Skip to content

Commit

Permalink
Update MPI init
Browse files Browse the repository at this point in the history
  • Loading branch information
luraess committed Sep 14, 2023
1 parent d8ac8ff commit 330f43a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts_future_API/mpi_utils2.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MPI
function init_distributed(dims::Tuple=(0, 0, 0); init_MPI=true)
init_MPI && MPI.Init()
init_MPI && (Threads.nthreads() > 1 ? MPI.Init(threadlevel=:multiple) : MPI.Init())
nprocs = MPI.Comm_size(MPI.COMM_WORLD)
dims = Tuple(MPI.Dims_create(nprocs, dims))
# create MPI communicator
Expand Down

0 comments on commit 330f43a

Please sign in to comment.