- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Code:
import mpi4py
import time
import numpy as np
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
print("rank",rank)
if __name__ == '__main__':
if rank == 0:
mem = np.array([0], dtype='i')
win = MPI.Win.Create(mem, comm=comm)
else:
win = MPI.Win.Create(None, comm=comm)
print(rank, "end")
(py3.6.8) ➜ ~ mpirun -n 2 python -u test.py
rank 0
rank 1
0 end
1 end
Abort(806449679): Fatal error in internal_Finalize: Other MPI error, error stack:
internal_Finalize(50)...........: MPI_Finalize failed
MPII_Finalize(345)..............:
MPID_Finalize(511)..............:
MPIDI_OFI_mpi_finalize_hook(895):
destroy_vni_context(1137).......: OFI domain close failed (ofi_init.c:1137:destroy_vni_context:Device or resource busy)
Why is this happening? How to debug? This error is not reported on the other machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in the Intel forums.
New window objects can be created by calling the "MPI.Win.Create()" method within a communicator and by specifying a memory buffer.
When a window instance is no longer needed, the "MPI.Win.Free()" method should be called.
So we should use MPI.Win.Free() method to free the new window objects that have been created. Please refer to the below code:
import mpi4py
import time
import numpy as np
from mpi4py import MPI
#comm = MPI.COMM_WORLD
#rank = comm.Get_rank()
#print("rank",rank)
if __name__ == '__main__':
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
print("rank",rank)
if rank == 0:
mem = np.array([0], dtype='i')
win = MPI.Win.Create(mem, comm=comm)
MPI.Win.Free(win)
else:
win = MPI.Win.Create(None, comm=comm)
MPI.Win.Free(win)
print(rank, "end")
Command to run the code:
mpirun -n 2 python -u test.py
Observed output:
Thanks & Regards,
Santosh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in the Intel forums.
New window objects can be created by calling the "MPI.Win.Create()" method within a communicator and by specifying a memory buffer.
When a window instance is no longer needed, the "MPI.Win.Free()" method should be called.
So we should use MPI.Win.Free() method to free the new window objects that have been created. Please refer to the below code:
import mpi4py
import time
import numpy as np
from mpi4py import MPI
#comm = MPI.COMM_WORLD
#rank = comm.Get_rank()
#print("rank",rank)
if __name__ == '__main__':
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
print("rank",rank)
if rank == 0:
mem = np.array([0], dtype='i')
win = MPI.Win.Create(mem, comm=comm)
MPI.Win.Free(win)
else:
win = MPI.Win.Create(None, comm=comm)
MPI.Win.Free(win)
print(rank, "end")
Command to run the code:
mpirun -n 2 python -u test.py
Observed output:
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Since your issue is resolved, make sure to accept my previous post as a solution. This would help others with similar issues. Thank you!
Best Regards,
Santosh
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page