Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
1 file
+ 19
4
Compare changes
  • Side-by-side
  • Inline
+ 19
4
@@ -45,6 +45,7 @@ class InvalidCommErrorP2P(ErrorGenerator):
return ["P2P"]
def generate(self, generate_full_set):
# TODO one may want to refactor it for better readability
for send_func in self.functions_to_check:
send_func_to_use = send_func
for comm_to_use in self.comms_to_check:
@@ -80,11 +81,23 @@ class InvalidCommErrorP2P(ErrorGenerator):
if comm_to_use in self.missmatching_comms + self.intercomms and recv_func == "mpi_irecv":
# combination repeated
continue
tm.set_description(error_string + "-Comm-" + recv_func, error_string+": %s" % comm_to_use)
tm.set_description(error_string + "-Comm-" + recv_func, error_string + ": %s" % comm_to_use)
else:
tm.set_description(error_string + "-Comm-" + send_func, error_string+": %s" % comm_to_use)
# TODO enter probe func call
tm.set_description(error_string + "-Comm-" + send_func, error_string + ": %s" % comm_to_use)
# add an additional probe call
if send_func == "mpi_probe":
tm.get_block("MPICALL").insert_instruction(CorrectMPICallFactory.get(send_func), kind=0,
before_index=0)
if send_func == "mpi_iprobe":
tm.get_block("MPICALL").insert_instruction("int flag=0;", kind=0,
before_index=0)
tm.get_block("MPICALL").insert_instruction("while (!flag){", kind=0,
before_index=1)
tm.get_block("MPICALL").insert_instruction(CorrectMPICallFactory.get(send_func), kind=0,
before_index=2)
tm.get_block("MPICALL").insert_instruction("}", kind=0,
before_index=3) # end while
kind = 1
if check_receive:
@@ -92,6 +105,8 @@ class InvalidCommErrorP2P(ErrorGenerator):
idx = 0
if recv_func == "mpi_improbe":
idx = 1
if recv_func == "mpi_iprobe":
idx = 2
tm.get_block("MPICALL").get_instruction(kind=kind, index=idx).set_arg("comm", comm_to_use)
tm.get_block("MPICALL").get_instruction(kind=kind, index=idx).set_has_error()
Loading