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

add invalid comm for topology function

parent 870ffe5b
Branches
No related tags found
No related merge requests found
...@@ -8,11 +8,9 @@ from scripts.Infrastructure.Template import TemplateManager ...@@ -8,11 +8,9 @@ from scripts.Infrastructure.Template import TemplateManager
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_collective_template from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_collective_template
class CorrectColl(ErrorGenerator): class CorrectColl(ErrorGenerator):
functions_to_use = ["mpi_allgather","mpi_allreduce","mpi_alltoall","mpi_barrier","mpi_bcast", "mpi_reduce", "mpi_scatter","mpi_exscan","mpi_gather", "mpi_reduce_scatter_block", "mpi_scan", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan" ] functions_to_use = ["mpi_allgather","mpi_allreduce","mpi_alltoall","mpi_barrier","mpi_bcast", "mpi_reduce", "mpi_scatter","mpi_exscan","mpi_gather", "mpi_reduce_scatter_block", "mpi_scan", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan", "mpi_cart_create" ]
functions_not_supported_yet = ["mpi_gatherv", "mpi_scatterv", "mpi_igatherv", "mpi_iscatterv"] functions_not_supported_yet = ["mpi_gatherv", "mpi_scatterv", "mpi_igatherv", "mpi_iscatterv"]
topology_functions = ["mpi_cart_create"]
def __init__(self): def __init__(self):
pass pass
...@@ -30,12 +28,3 @@ class CorrectColl(ErrorGenerator): ...@@ -30,12 +28,3 @@ class CorrectColl(ErrorGenerator):
if not generate_full_set: if not generate_full_set:
return return
for func_to_use in self.topology_functions:
tm = get_collective_template(func_to_use)
tm.set_description("Correct-"+func_to_use, "Correct code")
yield tm
if not generate_full_set:
return
...@@ -9,7 +9,7 @@ from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_c ...@@ -9,7 +9,7 @@ from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_c
class InvalidComErrorColl(ErrorGenerator): class InvalidComErrorColl(ErrorGenerator):
invalid_com = ["MPI_COMM_NULL", "NULL"] invalid_com = ["MPI_COMM_NULL", "NULL"]
functions_to_use = ["mpi_allgather","mpi_allreduce","mpi_alltoall","mpi_barrier","mpi_bcast", "mpi_reduce", "mpi_scatter","mpi_exscan","mpi_gather", "mpi_reduce_scatter_block", "mpi_scan", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan" ] functions_to_use = ["mpi_allgather","mpi_allreduce","mpi_alltoall","mpi_barrier","mpi_bcast", "mpi_reduce", "mpi_scatter","mpi_exscan","mpi_gather", "mpi_reduce_scatter_block", "mpi_scan", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan", "mpi_cart_create" ]
functions_not_supported_yet = ["mpi_allgatherv", "mpi_alltoallv", "mpi_alltoallw", "mpi_gatherv", "mpi_reduce_scatter", "mpi_scatterv"] functions_not_supported_yet = ["mpi_allgatherv", "mpi_alltoallv", "mpi_alltoallw", "mpi_gatherv", "mpi_reduce_scatter", "mpi_scatterv"]
####functions_to_use = ["mpi_allgather","mpi_allgatherv","mpi_allreduce","mpi_alltoall","mpi_alltoallv","mpi_alltoallw","mpi_barrier","mpi_bcast", "mpi_exscan","mpi_gather", "mpi_gatherv","mpi_reduce", "mpi_reduce_scatter", "mpi_reduce_scatter_block", "mpi_scan", "mpi_scatter", "mpi_scatterv", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan"] ####functions_to_use = ["mpi_allgather","mpi_allgatherv","mpi_allreduce","mpi_alltoall","mpi_alltoallv","mpi_alltoallw","mpi_barrier","mpi_bcast", "mpi_exscan","mpi_gather", "mpi_gatherv","mpi_reduce", "mpi_reduce_scatter", "mpi_reduce_scatter_block", "mpi_scan", "mpi_scatter", "mpi_scatterv", "mpi_ibarrier", "mpi_iallreduce", "mpi_ialltoall", "mpi_ibcast", "mpi_ireduce", "mpi_iscatter", "mpi_igather", "mpi_iscan"]
...@@ -24,10 +24,10 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -24,10 +24,10 @@ class InvalidComErrorColl(ErrorGenerator):
for com_to_use in self.invalid_com: for com_to_use in self.invalid_com:
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)
arg_to_replace = "comm"
tm.set_description("InvalidParam-Comm-"+func_to_use, "Invalid communicator: %s" % com_to_use) tm.set_description("InvalidParam-Comm-"+func_to_use, "Invalid communicator: %s" % com_to_use)
for call in tm.get_instruction("MPICALL", return_list=True): for call in tm.get_instruction("MPICALL", return_list=True):
arg_to_replace = "comm" if call.has_arg("comm") else "comm_old"
call.set_arg(arg_to_replace, com_to_use) call.set_arg(arg_to_replace, com_to_use)
call.set_has_error() call.set_has_error()
......
...@@ -8,7 +8,7 @@ from scripts.Infrastructure.Template import TemplateManager ...@@ -8,7 +8,7 @@ from scripts.Infrastructure.Template import TemplateManager
from scripts.Infrastructure.TemplateFactory import get_collective_template from scripts.Infrastructure.TemplateFactory import get_collective_template
class InvalidComErrorColl(ErrorGenerator): class InvalidComErrorColl(ErrorGenerator):
invalid_type = ["MPI_DATATYPE_NULL"] invalid_type = ["MPI_DATATYPE_NULL", "NULL"]
functions_to_use = ["mpi_bcast", "mpi_ibcast", "mpi_reduce", "mpi_ireduce", "mpi_exscan", "mpi_scan", "mpi_iscan", "mpi_gather", "mpi_igather", "mpi_allgather", "mpi_iallgather", "mpi_allreduce", "mpi_iallreduce", "mpi_alltoall", "mpi_ialltoall", "mpi_scatter", "mpi_iscatter" ] functions_to_use = ["mpi_bcast", "mpi_ibcast", "mpi_reduce", "mpi_ireduce", "mpi_exscan", "mpi_scan", "mpi_iscan", "mpi_gather", "mpi_igather", "mpi_allgather", "mpi_iallgather", "mpi_allreduce", "mpi_iallreduce", "mpi_alltoall", "mpi_ialltoall", "mpi_scatter", "mpi_iscatter" ]
func_one_type_arg = ["mpi_bcast", "mpi_reduce", "mpi_exscan", "mpi_scan", "mpi_ibcast", "mpi_ireduce", "mpi_iscan", "mpi_allreduce", "mpi_iallreduce" ] func_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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment