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

fix usage of preprocessor define conflicting with the coverage analysis

parent 2b76e72a
No related branches found
No related tags found
1 merge request!10P2P
...@@ -74,14 +74,16 @@ class InvalidCommErrorP2P(ErrorGenerator): ...@@ -74,14 +74,16 @@ class InvalidCommErrorP2P(ErrorGenerator):
if comm_to_use in self.missmatching_comms and comm_to_use != "MPI_COMM_SELF": if comm_to_use in self.missmatching_comms and comm_to_use != "MPI_COMM_SELF":
comm_var_name = get_communicator(comm_to_use, tm) comm_var_name = get_communicator(comm_to_use, tm)
# use precprcessor to make this two identifieres same # change the arg in the MPI call to the result variable name
# alternatively, chang the arg in the MPI call to teh result variable name for call in tm.get_instruction(identifier="MPICALL", return_list=True):
tm.insert_instruction(Instruction("#define " + comm_to_use + " " + comm_var_name), if call.get_arg("comm") == comm_to_use:
before_instruction=0) call.set_arg("comm", comm_var_name)
if comm_to_use in self.intercomms: if comm_to_use in self.intercomms:
comm_var_name = get_intercomm(comm_to_use, tm) comm_var_name = get_intercomm(comm_to_use, tm)
tm.insert_instruction(Instruction("#define " + comm_to_use + " " + comm_var_name), for call in tm.get_instruction(identifier="MPICALL", return_list=True):
before_instruction=0) if call.get_arg("comm") == comm_to_use:
call.set_arg("comm", comm_var_name)
# if intercomm: set rank to 0 instead of 1 as ther is only one rank in intercomm # if intercomm: set rank to 0 instead of 1 as ther is only one rank in intercomm
if comm_to_use in self.intercomms and not comm_to_use == "mpi_intercomm_merge": if comm_to_use in self.intercomms and not comm_to_use == "mpi_intercomm_merge":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment