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

only one generator for type matching

parent ffe77f0c
No related branches found
No related tags found
No related merge requests found
...@@ -29,26 +29,13 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -29,26 +29,13 @@ class InvalidComErrorColl(ErrorGenerator):
def generate(self, generate_level, real_world_score_table): def generate(self, generate_level, real_world_score_table):
# Generate codes with type mismatch # type missmatches are generated by ParamMatchingTypes.py
for func_to_use in self.func_with_one_type_arg:
tm = get_collective_template(func_to_use)
type_to_use = "MPI_DOUBLE" # this could be a list of types
tm.set_description("ParamMatching-Type-" + func_to_use, "Wrong datatype matching")
for call in tm.get_instruction("MPICALL", return_list=True):
call.set_rank_executing(0)
call.set_arg("datatype", type_to_use)
call.set_has_error()
c = CorrectMPICallFactory.get(func_to_use)
c.set_rank_executing('not0')
c.set_has_error()
tm.insert_instruction(c, after_instruction=call)
yield tm
# Generate codes with op mismatch # Generate codes with op mismatch
for func_to_use in self.func_with_op: for func_to_use in self.func_with_op:
tm = get_collective_template(func_to_use) tm = get_collective_template(func_to_use)
op_to_use = "MPI_MAX" # this could be a list of op op_to_use = "MPI_MAX" # this could be a list of op
#TODO implement Real world coverage for that
tm.set_description("ParamMatching-Op-" + func_to_use, "Wrong operation matching") tm.set_description("ParamMatching-Op-" + func_to_use, "Wrong operation matching")
for call in tm.get_instruction("MPICALL", return_list=True): for call in tm.get_instruction("MPICALL", return_list=True):
...@@ -80,6 +67,7 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -80,6 +67,7 @@ class InvalidComErrorColl(ErrorGenerator):
for func_to_use in self.functions_to_use: for func_to_use in self.functions_to_use:
tm = get_collective_template(func_to_use) tm = get_collective_template(func_to_use)
com_to_use = "MPI_COMM_SELF" com_to_use = "MPI_COMM_SELF"
#TODO use real word coverage for that
tm.set_description("ParamMatching-Com-" + func_to_use, "Wrong communicator matching") tm.set_description("ParamMatching-Com-" + func_to_use, "Wrong communicator matching")
for call in tm.get_instruction("MPICALL", return_list=True): for call in tm.get_instruction("MPICALL", return_list=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment