Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
1 file
+ 12
4
Compare changes
  • Side-by-side
  • Inline
@@ -41,9 +41,10 @@ class RecvBeforeSend(ErrorGenerator):
# this is a correct case with no deadlock
# introduce deadlock by moving rank 1s send after the recv
rank_1_send_instr = ([c for c in tm.get_instruction("MPI_ALL", return_list=True) if c.get_rank_executing() == 1]
+ [c for c in tm.get_instruction("START", return_list=True) if
c.get_rank_executing() == 1])
rank_1_send_instr = (
[c for c in tm.get_instruction("MPI_CALL", return_list=True) if c.get_rank_executing() == 1]
+ [c for c in tm.get_instruction("START", return_list=True) if
c.get_rank_executing() == 1])
wait_calls = [c for c in tm.get_instruction("WAIT", return_list=True) if c.get_rank_executing() == 1]
@@ -53,6 +54,13 @@ class RecvBeforeSend(ErrorGenerator):
tm.insert_instruction(wait_calls, before_instruction="FREE", before_first_of_list=True)
yield tm
assert send_func == "mpi_send"
tm.set_description("MissingCall-" + send_func, "Deadlock, as call to send is missing")
for c in tm.get_instruction("REVERSE_MSG_SEND", return_list=True)+tm.get_instruction("MPICALL", return_list=True):
if c.get_function() == send_func:
tm.remove_instruction(instruction=c)
yield tm
def generate_probe(self, probe_to_use):
tm = get_send_recv_template("mpi_send", "mpi_recv")
@@ -103,7 +111,7 @@ class RecvBeforeSend(ErrorGenerator):
yield tm
def generate(self, generate_full_set):
for recv_func in self.recv_funcs:
for recv_func in self.recv_funcs:
yield from self.generate_impl("mpi_send", recv_func)
if not generate_full_set:
return
Loading