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

added InvalidOp generator for collective

parent 73aa5f69
Branches
No related tags found
No related merge requests found
#! /usr/bin/python3
from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
from scripts.Infrastructure.InstructionBlock import InstructionBlock
from scripts.Infrastructure.MPICallFactory import MPICallFactory, CorrectMPICallFactory
from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory, get_matching_recv
from scripts.Infrastructure.Template import TemplateManager
from scripts.Infrastructure.TemplateFactory import get_send_recv_template, get_collective_template
class InvalidComErrorColl(ErrorGenerator):
invalid_op = ["MPI_OP_NULL"]
functions_to_use = ["mpi_reduce", "mpi_ireduce", "mpi_allreduce", "mpi_iallreduce"]
def __init__(self):
pass
def get_feature(self):
return ["COLL"]
def generate(self, generate_full_set):
for op_to_use in self.invalid_op:
for func_to_use in self.functions_to_use:
tm = get_collective_template(func_to_use, seperate=False)
tm.set_description("InvalidParam-Op-"+func_to_use, "Invalid operator: %s" % op_to_use)
tm.get_block("MPICALL").get_instruction(kind='all', index=0).set_arg("op", op_to_use)
tm.get_block("MPICALL").get_instruction(kind='all', index=0).set_has_error()
yield tm
# only check for one comm
if not generate_full_set:
return
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment