Skip to content
Snippets Groups Projects
Commit c4407ac8 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

Simplified InvalidBuf case

parent cfc7d277
Branches
No related tags found
1 merge request!14Infrastructure: Remove Instructionblock
......@@ -381,7 +381,7 @@ class TemplateManager:
old_instruction = [old_instruction]
idxs_to_replace = self.__get_instruction_index(old_instruction)
if len(idxs_to_replace) == len(new_instruction_list):
if len(idxs_to_replace) != len(new_instruction_list):
raise ValueError("Number of instructions to Replace does not match number of given instructions")
for (index, replacement) in zip(idxs_to_replace, new_instruction_list):
......
......@@ -159,6 +159,21 @@ def get_send_recv_template(send_func: str = "mpi_isend", recv_func: str | typing
return tm
def get_invalid_param_p2p_case(param, value, check_receive, send_func, recv_func):
tm = get_send_recv_template(send_func, recv_func)
rank = 1
if check_receive:
rank = 0
for call in tm.get_instruction(identifier="MPICALL", return_list=True):
if call.get_rank_executing() == rank:
assert call.has_arg(param)
call.set_arg(param, value)
return tm
def get_collective_template(collective_func, seperate=True):
"""
Contructs a default template for the given mpi collecive
......
......@@ -6,8 +6,8 @@ from scripts.Infrastructure.GeneratorManager import GeneratorManager
if __name__ == "__main__":
gencodes_dir = "../gencodes/"
gm = GeneratorManager("./errors")
# gm = GeneratorManager("./errors/devel")
#gm = GeneratorManager("./errors")
gm = GeneratorManager("./errors/devel")
# remove all testcases from previous execution (ease of debugging)
for root, dirs, files in os.walk(gencodes_dir):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment