Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
3 files
+ 11
48
Compare changes
  • Side-by-side
  • Inline

Files

+ 3
16
@@ -4,7 +4,7 @@ from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
from scripts.Infrastructure.Instruction import Instruction
from scripts.Infrastructure.MPICallFactory import CorrectMPICallFactory
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_invalid_param_p2p_case
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_invalid_param_p2p_case, insert_probe
class InvalidRankErrorP2P(ErrorGenerator):
@@ -43,23 +43,10 @@ class InvalidRankErrorP2P(ErrorGenerator):
tm.set_description("InvalidParam-Rank-" + probe_to_use, "Invalid Rank: %s" % rank_to_use)
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("source", rank_to_use)
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
Loading