Open michel2323 opened 1 year ago
@michel2323 try https://github.com/EnzymeAD/Enzyme.jl/pull/513
@michel2323 try #513
@wsmoses Gives the same log to my eyes. Attached them here to be sure. out_22.log out_11.log
Do I need to build Enzyme proper?
These are now indeed different errors.
@michel2323 try a building enzyme proper with https://github.com/EnzymeAD/Enzyme/pull/897
Differentiation works now! However, the differentiated code deadlocks in an MPI_Wait
. I will try to find out why.
I went back to MPI@0.19
with the following signatures for the sends/receives:
push!(requests, MPI.Isend(next[2:2], rank-1, 0, MPI.COMM_WORLD))
push!(requests, MPI.Irecv!(next[1:1], rank-1, 0, MPI.COMM_WORLD))
This worked. Adding the an explicit tag value with MPI@0.20
gets rid of the deadlock.
push!(requests, MPI.Isend(next[2:2], MPI.COMM_WORLD; dest=rank-1, tag=0))
push!(requests, MPI.Irecv!(next[1:1], MPI.COMM_WORLD; source=rank-1, tag=0))
However, as per MPI.jl doc that's also the default value for the tag https://juliaparallel.org/MPI.jl/stable/reference/pointtopoint/#Initiation , so I don't really understand.
NVM, Enzyme does not seem to handle the default tag MPI.ANY_TAG
of the MPI.Irecv!
.
@michel2323 can I ask you to add MPI test to Enzyme.jl?
Add an Enzyme.API.printall!(true) to see what is happening?
I implemented a simple halo exchange:
I'm using Julia 1.8.2 and MPI artifact with
Logs are attached with 1 rank and 2 ranks. I think they don't differ much though. out_2.log out_1.log The barrier seems needed as I get MPI calls after MPI.FInalize was called.