🐡
AD over MPI
Not supported yet.
using Zygote
using MPI
MPI.Init()
comm = MPI.COMM_WORLD
rank = MPI.Comm_rank(comm)
f(x::Float64) = MPI.Allreduce((x-rank)^2, MPI.SUM, comm)
println(f(1.0), " ", f'(1.0))
mpirun -np 2 julia test.jl
ERROR: ERROR: LoadError: LoadError: Can't differentiate foreigncall expression
Discussion