Skip to content

Commit

Permalink
Merge pull request #91 from JordiManyer/bugfix-mpiexec-with-subcommun…
Browse files Browse the repository at this point in the history
…icator

Bugfix: Executing programs within a subcommunicator of COMM_WORLD
  • Loading branch information
amartinhuertas authored Jan 17, 2023
2 parents 6e7d42e + b501814 commit d069a5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MPIBackend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ function with_backend(driver,b::MPIBackend,nparts,args...;kwargs...)
driver(part,args...;kwargs...)
else
try
part = get_part_ids(b,nparts)
driver(part,args...;kwargs...)
part = get_part_ids(b,nparts)
if i_am_in(part)
driver(part,args...;kwargs...)
end
catch e
@error "" exception=(e, catch_backtrace())
if MPI.Initialized() && !MPI.Finalized()
Expand Down
1 change: 1 addition & 0 deletions test/mpi/InterfacesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module InterfacesTests

include("mpiexec.jl")
run_mpi_driver(procs=4,file="driver_interfaces.jl")
run_mpi_driver(procs=6,file="driver_interfaces.jl")

end # module

0 comments on commit d069a5f

Please sign in to comment.