Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
1 file
+ 7
8
Compare changes
  • Side-by-side
  • Inline
@@ -24,7 +24,7 @@ def get_default_template(mpi_func):
@@ -24,7 +24,7 @@ def get_default_template(mpi_func):
def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing.Tuple[str, str] = "mpi_irecv"):
def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing.Tuple[str, str] = "mpi_irecv"):
"""
"""
Contructs a default template for the given mpi send recv function pair
Contructs a default template for the given mpi send recv function pair it contains a send from rank 1 to rank 0
Returns:
Returns:
TemplateManager Initialized with a default template
TemplateManager Initialized with a default template
The function is contained in a block named MPICALL with seperate calls for rank 1 and 2)
The function is contained in a block named MPICALL with seperate calls for rank 1 and 2)
@@ -142,16 +142,15 @@ def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing
@@ -142,16 +142,15 @@ def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing
tm.register_instruction_block(b)
tm.register_instruction_block(b)
# wait for op to complete
# wait for op to complete
if send_func in isend_funcs + persistent_send_funcs:
wait_block = InstructionBlock("WAIT")
b = InstructionBlock("WAIT")
b.register_instruction(CorrectMPICallFactory().mpi_wait(), 1)
tm.register_instruction_block(b)
 
if send_func in isend_funcs + persistent_send_funcs:
 
wait_block.register_instruction(CorrectMPICallFactory().mpi_wait(), 1)
if recv_func in irecv_funcs + persistent_recv_funcs + [["mpi_mprobe", "mpi_imrecv"],
if recv_func in irecv_funcs + persistent_recv_funcs + [["mpi_mprobe", "mpi_imrecv"],
["mpi_improbe", "mpi_imrecv"]]:
["mpi_improbe", "mpi_imrecv"]]:
b = InstructionBlock("WAIT")
wait_block.register_instruction(CorrectMPICallFactory().mpi_wait(), 0)
b.register_instruction(CorrectMPICallFactory().mpi_wait(), 0)
tm.register_instruction_block(b)
tm.register_instruction_block(wait_block) # if no waits: block is empty
# end MPI operation
# end MPI operation
# cleanup
# cleanup
Loading