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

added case for mpi_sendrecv using same buffer

parent a2ce1791
No related branches found
No related tags found
1 merge request!6More Work on infrastructure IV
......@@ -68,9 +68,9 @@ class InvalidBufErrorP2P(ErrorGenerator):
# without allocation: usage is undefined behaviour
if check_receive:
tm.set_description("InvalidParam-Buffer-" + recv_func, "Invalid Rank: %s" % buf_to_use)
tm.set_description("InvalidParam-Buffer-" + recv_func, "Invalid Buffer: %s" % buf_to_use)
else:
tm.set_description("InvalidParam-Buffer-" + send_func, "Invalid Rank: %s" % buf_to_use)
tm.set_description("InvalidParam-Buffer-" + send_func, "Invalid Buffer: %s" % buf_to_use)
if check_receive:
if tm.get_block("MPICALL").get_operation(kind=0, index=0).has_arg("buf"):
......@@ -86,3 +86,32 @@ class InvalidBufErrorP2P(ErrorGenerator):
tm.get_block("MPICALL").get_operation(kind=1, index=0).set_has_error()
return tm
class MessageRaceErrorSendRecv(ErrorGenerator):
def __init__(self):
pass
def get_num_errors(self):
# MPI_IN_PLACE and same buffer
return 1 * 2
# the number of errors to produce in the extended mode (all possible combinations)
def get_num_errors_extended(self):
return 1
def get_feature(self):
return ["P2P"]
def generate(self, i):
tm = get_send_recv_template("mpi_sendrecv", "mpi_sendrecv")
tm.set_description("InvalidParam-Buffer-mpi_sendrecv", "send and recv buffer must be disjoint in sendrecv")
for k in [0, 1]:
if i == 0:
tm.get_block("MPICALL").get_operation(kind=k, index=0).set_arg("recvbuf", "buf")
else:
tm.get_block("MPICALL").get_operation(kind=k, index=0).set_arg("recvbuf", "MPI_IN_PLACE")
tm.get_block("MPICALL").get_operation(kind=k, index=0).set_has_error()
return tm
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment