Skip to content
Snippets Groups Projects
Commit aac6f99b authored by Emmanuelle Saillard's avatar Emmanuelle Saillard
Browse files

add root mismatch

parent 0d73c92a
Branches
No related tags found
No related merge requests found
...@@ -24,11 +24,10 @@ class InvalidRankErrorColl(ErrorGenerator): ...@@ -24,11 +24,10 @@ class InvalidRankErrorColl(ErrorGenerator):
for func_to_use in self.functions_to_use: for func_to_use in self.functions_to_use:
for rank_to_use in self.invalid_ranks: for rank_to_use in self.invalid_ranks:
tm = get_collective_template(func_to_use) tm = get_collective_template(func_to_use)
arg_to_replace = "root"
tm.set_description("InvalidParam-Rank-"+func_to_use, "Invalid Rank: %s" % rank_to_use) tm.set_description("InvalidParam-Rank-"+func_to_use, "Invalid Rank: %s" % rank_to_use)
for call in tm.get_instruction("MPICALL", return_list=True): for call in tm.get_instruction("MPICALL", return_list=True):
call.set_arg(arg_to_replace, rank_to_use) call.set_arg("root", rank_to_use)
call.set_has_error() call.set_has_error()
yield tm yield tm
......
...@@ -12,6 +12,7 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -12,6 +12,7 @@ class InvalidComErrorColl(ErrorGenerator):
func_with_one_type_arg = ["mpi_bcast", "mpi_reduce", "mpi_exscan", "mpi_scan", "mpi_ibcast", "mpi_ireduce", "mpi_iscan", "mpi_allreduce", "mpi_iallreduce" ] func_with_one_type_arg = ["mpi_bcast", "mpi_reduce", "mpi_exscan", "mpi_scan", "mpi_ibcast", "mpi_ireduce", "mpi_iscan", "mpi_allreduce", "mpi_iallreduce" ]
functions_not_supported_yet = ["mpi_reduce_scatter_block", "mpi_allgatherv", "mpi_alltoallv", "mpi_alltoallw", "mpi_gatherv", "mpi_reduce_scatter", "mpi_scatterv"] functions_not_supported_yet = ["mpi_reduce_scatter_block", "mpi_allgatherv", "mpi_alltoallv", "mpi_alltoallw", "mpi_gatherv", "mpi_reduce_scatter", "mpi_scatterv"]
func_with_op = ["mpi_reduce", "mpi_ireduce", "mpi_allreduce", "mpi_iallreduce"] func_with_op = ["mpi_reduce", "mpi_ireduce", "mpi_allreduce", "mpi_iallreduce"]
func_with_root = ["mpi_reduce", "mpi_bcast", "mpi_gather", "mpi_scatter", "mpi_ireduce", "mpi_ibcast", "mpi_igather", "mpi_iscatter"]
def __init__(self): def __init__(self):
pass pass
...@@ -24,12 +25,11 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -24,12 +25,11 @@ class InvalidComErrorColl(ErrorGenerator):
# Generate codes with type mismatch # Generate codes with type mismatch
for func_to_use in self.func_with_one_type_arg: for func_to_use in self.func_with_one_type_arg:
tm = get_collective_template(func_to_use) tm = get_collective_template(func_to_use)
type_to_use = "MPI_INT" type_to_use = "MPI_DOUBLE" # this could be a list of types
tm.set_description("ParamMatching-Type-"+func_to_use, "Wrong datatype matching") tm.set_description("ParamMatching-Type-"+func_to_use, "Wrong datatype matching")
for call in tm.get_instruction("MPICALL", return_list=True): for call in tm.get_instruction("MPICALL", return_list=True):
call.set_rank_executing(0) call.set_rank_executing(0)
call.set_arg("datatype", "MPI_DOUBLE") call.set_arg("datatype", type_to_use)
call.set_has_error() call.set_has_error()
c = CorrectMPICallFactory.get(func_to_use) c = CorrectMPICallFactory.get(func_to_use)
c.set_rank_executing('not0') c.set_rank_executing('not0')
...@@ -41,12 +41,12 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -41,12 +41,12 @@ class InvalidComErrorColl(ErrorGenerator):
# 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_SUM" op_to_use = "MPI_MAX" # this could be a list of op
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):
call.set_rank_executing(0) call.set_rank_executing(0)
call.set_arg("op", "MPI_MAX") call.set_arg("op", op_to_use)
call.set_has_error() call.set_has_error()
c = CorrectMPICallFactory.get(func_to_use) c = CorrectMPICallFactory.get(func_to_use)
c.set_rank_executing('not0') c.set_rank_executing('not0')
...@@ -55,6 +55,20 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -55,6 +55,20 @@ class InvalidComErrorColl(ErrorGenerator):
yield tm yield tm
# Generate codes with root mismatch
for func_to_use in self.func_with_root:
tm = get_collective_template(func_to_use)
rank_to_use = "rank" # process ID, declared in the template
tm.set_description("ParamMatching-Root-"+func_to_use, "Wrong root matching")
for call in tm.get_instruction("MPICALL", return_list=True):
call.set_rank_executing(0)
call.set_arg("root", rank_to_use)
call.set_has_error()
c = CorrectMPICallFactory.get(func_to_use)
yield tm
# Generate codes with communicator mismatch # Generate codes with communicator mismatch
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment