Skip to content
Snippets Groups Projects

P2P

Open
Jammer, Timrequested to merge
p2p into main
1 file
+ 16
8
Compare changes
  • Side-by-side
  • Inline
#! /usr/bin/python3
#! /usr/bin/python3
from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
 
from scripts.Infrastructure.Instruction import Instruction
from scripts.Infrastructure.InstructionBlock import InstructionBlock
from scripts.Infrastructure.InstructionBlock import InstructionBlock
from scripts.Infrastructure.MPICallFactory import MPICallFactory, CorrectMPICallFactory
from scripts.Infrastructure.MPICallFactory import MPICallFactory, CorrectMPICallFactory
from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory, get_matching_recv
from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory, get_matching_recv
@@ -18,9 +19,9 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
@@ -18,9 +19,9 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
functions_to_check = ["mpi_irecv",
functions_to_check = ["mpi_irecv",
"mpi_isend", "mpi_issend", "mpi_irsend", "mpi_ibsend",
"mpi_isend", "mpi_issend", "mpi_irsend", "mpi_ibsend",
"mpi_send_init", "mpi_ssend_init", "mpi_bsend_init", "mpi_rsend_init", "mpi_psend_init",
"mpi_send_init", "mpi_ssend_init", "mpi_bsend_init", "mpi_rsend_init", "mpi_psend_init",
"mpi_precv_init", "mpi_recv_init"
"mpi_precv_init", "mpi_recv_init", "mpi_imrecv"
]
]
recv_funcs = ["mpi_irecv", "mpi_recv_init", "mpi_precv_init"]
recv_funcs = ["mpi_irecv", "mpi_recv_init", "mpi_precv_init", "mpi_imrecv"]
def __init__(self):
def __init__(self):
pass
pass
@@ -38,7 +39,10 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
@@ -38,7 +39,10 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
recv_func = send_func
recv_func = send_func
send_func = "mpi_isend"
send_func = "mpi_isend"
tm = get_send_recv_template(send_func, recv_func)
recv_func_to_use = recv_func
 
if recv_func == "mpi_imrecv":
 
recv_func_to_use = ["mpi_mprobe", "mpi_imrecv"]
 
tm = get_send_recv_template(send_func, recv_func_to_use)
if check_receive:
if check_receive:
tm.set_description("LocalConcurrency-receive-" + recv_func,
tm.set_description("LocalConcurrency-receive-" + recv_func,
@@ -47,12 +51,16 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
@@ -47,12 +51,16 @@ class LocalConcurrencyErrorP2P(ErrorGenerator):
tm.set_description("LocalConcurrency-send-" + send_func,
tm.set_description("LocalConcurrency-send-" + send_func,
"usage of send buffer before operation is completed")
"usage of send buffer before operation is completed")
 
conflicting_inst = Instruction("buf[2]=1;")
 
conflicting_inst.set_has_error()
 
kind = 1
if check_receive:
if check_receive:
tm.get_block("MPICALL").get_instruction(kind=0, index=0).set_has_error()
kind = 0
tm.get_block("MPICALL").register_instruction("buf[2]=1;" + ERROR_MARKER_COMMENT, kind=1)
idx = 0
else:
if recv_func == "mpi_imrecv":
tm.get_block("MPICALL").get_instruction(kind=1, index=0).set_has_error()
idx = 1
tm.get_block("MPICALL").register_instruction("buf[2]=1;" + ERROR_MARKER_COMMENT, kind=1)
tm.get_block("MPICALL").get_instruction(kind=kind, index=idx).set_has_error()
 
tm.get_block("MPICALL").register_instruction(conflicting_inst, kind=kind)
yield tm
yield tm
if not generate_full_set:
if not generate_full_set:
Loading