Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
1 file
+ 6
15
Compare changes
  • Side-by-side
  • Inline
@@ -4,7 +4,8 @@ from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
from scripts.Infrastructure.Instruction import Instruction
from scripts.Infrastructure.MPICallFactory import CorrectMPICallFactory, MPICallFactory
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_invalid_param_p2p_case, replace_wait
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_invalid_param_p2p_case, replace_wait, \
insert_probe
class InvalidStatusErrorP2P(ErrorGenerator):
@@ -55,22 +56,10 @@ class InvalidStatusErrorP2P(ErrorGenerator):
tm.set_description("InvalidParam-Status-" + probe_to_use,
"Invalid Status: %s\n wrong usage of status_ignore vs statusES_ignore" % status)
probe_call = CorrectMPICallFactory.get(probe_to_use)
recv_call = tm.get_instruction(identifier="MPICALL", rank_excuting=0)
probe_call = insert_probe(tm, probe_to_use, recv_call)
probe_call.set_arg("status", status)
probe_call.set_has_error()
probe_call.set_rank_executing(0)
if probe_to_use == "mpi_iprobe":
tm.add_stack_variable("int") # the flag
tm.insert_instruction(Instruction("int flag=0;", rank=0), before_instruction="MPICALL",
before_first_of_list=True)
tm.insert_instruction(Instruction("while (!flag){", rank=0), before_instruction="MPICALL",
before_first_of_list=True)
tm.insert_instruction(probe_call, before_instruction="MPICALL", before_first_of_list=True)
tm.insert_instruction(Instruction("}", rank=0), before_instruction="MPICALL",
before_first_of_list=True) # end while
else:
tm.insert_instruction(probe_call, before_instruction="MPICALL", before_first_of_list=True)
return tm
@@ -117,3 +106,5 @@ class InvalidStatusErrorP2P(ErrorGenerator):
yield self.generate_mprobe("mpi_mprobe", "mpi_mrecv", True, status)
yield self.generate_mprobe("mpi_mprobe", "mpi_mrecv", False, status)
yield self.generate_mprobe("mpi_improbe", "mpi_mrecv", True, status)
# TODO sendrecv cases
Loading