I have been struggling with a function of mine that uses MPI and gave me mysterious errors only in some cases (always hard to debug MPI stuff on Windows anyway). But I think I may have found some indication of what's going on, consider this:


mpi --send-functions
    switch = 5
    if switch == 2
        m = ones(2)    # works
    elif switch == 3
        m = eigen(mnormal(3,3)) # fails
    elif switch == 4
        m = mnormal(3,3)    # works (in isolation)
        m = eigen(m)        # fails with this
    elif switch == 5
        m = complex(zeros(5), ones(5)) # fails
    if $mpirank==0
        print m
    # and everything works if the following is commented out
    mpireduce(&m, vcat) # same with "vcat" in quotes

end mpi --np=2


It seems to me that mpireduce() cannot handle the new complex-valued matrices. If that hypothesis is correct, is it because the gretlmpi.exe program that is shipped with gretl on Windows wasn't updated when the new complex number handling was introduced? Or is it because the mpi-related stuff simply wasn't adjusted in the source? Or some other reason? In any case, it would be very interesting, of course, if it works on Linux.

This is with the Dec 22nd snapshot on Windows 10. MPI in general is working fine here (see the working examples in the code above).