Open jotabf opened 2 years ago
A user on our cluster has hit a very similar issue with v4.1.3, but using MPI_Win_allocate
and MPI_Fetch_and_op
, and only when the two ranks have different sized windows (everything but rank 0 has a zero-sized window in their example). As with here, it fails with osc/rdma
but works with osc/ucx
.
Running with an --enable-debug
build gave the attached mpi_fetch_test.log (the mpirun
command is in that log file), but the key line I found was this:
[1,1]<stderr>:[gadi-login-07.gadi.nci.org.au:1091310] remote address range 0x7f2558006008 - 0x7f255800600c is out of range. Valid address range is 0x7f2558006008 - 0x7f2558006008 (0 bytes)
I.e. rank 1 thinks that the window size it's getting from (i.e. on rank 0) is 0 bytes, even though it's non-zero. My thoughts were that it was using the local window's size rather of the remote size, but I wasn't able to see how that might come about.
I've attached a test program (mpi_fetch_test.txt, just rename to .f90
first - GitHub doesn't like that extension) that shows the failure, it can be compiled and run with a simple
mpif90 mpi_fetch_test.f90
mpirun -np 2 ./a.out
I was running the same code with --enable-debug
(on openmpi installation) and it was generating an infinite loop with this output:
mpirun -n 2 -mca osc rdma -mca btl_openib_allow_ib 1 --mca osc_base_verbose 100 ./test.o
[...]
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216`755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
[r1i3n3:216755] shared lock incremented. old value 0x8000000000000000
[r1i3n3:216755] another peer has exclusive access to lock
[r1i3n3:216755] releasing shared lock 303cc70 on peer 0. value 0xffffffffffffffff
[r1i3n3:216755] allocating frag. pending = 1
[r1i3n3:216755] allocating frag. pending = 2
[r1i3n3:216755] pending atomic 0x2580e80 complete with status 0
[r1i3n3:216755] returning frag. pending = 3
[r1i3n3:216755] pending atomic 0x25d0c80 complete with status 0
[r1i3n3:216755] returning frag. pending = 2
Nevermind. I see what you are doing there. That should be valid.
Will dig into this tomorrow and see what is going on. I don't think much has changes with the dynamic window code in years and it was working.
Can you try with 5.0.0 or the main branch? I wonder if some fix did not make it back to 4.1.x.
I'm seeing similar errors with osc/rdma in the ARMCI test suite. Interestingly, I only see them on shared memory and not when running with one process per node. Will have to investigate.
@hjelmn Did you find anything useful?
Funny thing: I cannot reproduce this issue with the test case provided at the top. Will have to use the ARMCI tests...
@benmenadue I see a similar problem with windows allocated through MPI_Win_allocated
and filed https://github.com/open-mpi/ompi/issues/10521. In short, using hcoll causes a problem on the machine I'm using and leads osc/rdma to believe that all processes allocate the same window size when they don't. One workaround is to disable hcoll by passing --mca coll ^hcoll
to mpirun. Any chance you could give that a try?
@jotabf I think I can reproduce a hang in MPI_Get
with osc/rdma and btl/openib. I have not had any success in debugging this though. However, support for openib has been deprecated in the 4.x series and was removed in the 5.x release. The replacement for IB systems is osc/ucx, which should be selected by default on 5.0.x on your system and works for me.
@devreal I mentioned there, but not here. The PR #10413 solve my problems. For now, I'm using a local code that I modified waiting for the changing incorporate into some official version.
Yes, I was using osc/rdma and btl/openib when I had this problem. I still have a problem in my code using osc/ucx with some unexpected synchronization. Because of this, I have avoided using it. Is it not possible to use osc/rdma in 5.x?
I still have a problem in my code using osc/ucx with some unexpected synchronization.
Do you have the details for that? Could you open a ticket (if there isn't one already)?
Because of this, I have avoided using it. Is it not possible to use osc/rdma in 5.x?
Technically yes, using either btl/tcp (likely slow because no RDMA) or btl/uct (currently broken, see https://github.com/open-mpi/ompi/issues/10522). The implementation officially supported by Mellanox is osc/ucx.
I saw the problem in the Issue in https://github.com/open-mpi/ompi/issues/9580 . Initially, my problem was another, but from this point https://github.com/open-mpi/ompi/issues/9580#issuecomment-954090542, I noticed that my issue with osc/ucx. If it is not clear, I can try to reproduce the problem and open a new issue. However, I understood that the issue was about an atomic operation that still does not has a solution.
Thank you for taking the time to submit an issue!
Background information
What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)
v4.1.1
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Please describe the system on which you are running
Details of the problem
Hello everyone,
I'm trying to run a mpi code with
MPI_Get()
using a Dynamic Windown (MPI_Win_create_dynamic
+MPI_Win_attach
) I have two scenarios: The first am trying to run my code with the following configurationswith this configuration, I have the problem that the execution got stuck in the
MPI_Get()
, sometimes generations the following errorI can solve this change the changing
osc = ucx
. The code run ok, but with this, I return to another problem that I have described here (https://github.com/open-mpi/ompi/issues/9580).Then, my idea is to solve the problem with MPI_Get() using
osc = rdma
. I'm using the following code to test theMPI_Get()
I'm using a combination of
MPI_Win_create_dynamic()
andMPI_Get()
, wherein in this case I use the target memory address as thedisplacement
parameter inMPI_Get()
. Repeating, this works with ucx but not with rdma. I think the rdmaMPI_Get()
function does not do the proper handling of thedisplacement
value when this means the target address.