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

fix previous fix about doubly allocating buffers

parent ab034535
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ class CorrectColl(ErrorGenerator): ...@@ -31,7 +31,7 @@ class CorrectColl(ErrorGenerator):
tm.set_description("Correct-" + func_to_use, "Correct code") tm.set_description("Correct-" + func_to_use, "Correct code")
yield tm yield tm
# Separate function called depending of process ID # Separate function called depending on process ID
for func_to_use in self.functions_to_use: for func_to_use in self.functions_to_use:
tm = get_two_collective_template(func_to_use, func_to_use) tm = get_two_collective_template(func_to_use, func_to_use)
tm.set_description("Correct-" + func_to_use + "-" + func_to_use, "Correct code") tm.set_description("Correct-" + func_to_use + "-" + func_to_use, "Correct code")
......
...@@ -6,6 +6,7 @@ from scripts.Infrastructure.MPICallFactory import MPICallFactory, CorrectMPICall ...@@ -6,6 +6,7 @@ from scripts.Infrastructure.MPICallFactory import MPICallFactory, CorrectMPICall
from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory, get_matching_recv from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory, get_matching_recv
from scripts.Infrastructure.Template import TemplateManager from scripts.Infrastructure.Template import TemplateManager
from scripts.Infrastructure.TemplateFactory import get_collective_template, get_two_collective_template from scripts.Infrastructure.TemplateFactory import get_collective_template, get_two_collective_template
from scripts.Infrastructure.Variables import BASIC_TEST_LEVEL
class InvalidComErrorColl(ErrorGenerator): class InvalidComErrorColl(ErrorGenerator):
...@@ -92,5 +93,5 @@ class InvalidComErrorColl(ErrorGenerator): ...@@ -92,5 +93,5 @@ class InvalidComErrorColl(ErrorGenerator):
yield tm yield tm
if not generate_full_set: if generate_level <= BASIC_TEST_LEVEL:
return return
...@@ -108,7 +108,9 @@ def get_correct_case(type_1, count_1, func_to_use, comm): ...@@ -108,7 +108,9 @@ def get_correct_case(type_1, count_1, func_to_use, comm):
comm_var_name = get_intercomm(comm, tm) comm_var_name = get_intercomm(comm, tm)
if type_1 in predefined_types: if type_1 in predefined_types:
buf_name = get_buffer_for_type(type_1, count_1) buf_alloc = get_buffer_for_type(type_1, count_1)
tm.insert_instruction(buf_alloc, before_instruction=tm._instructions[0])
buf_name = buf_alloc.get_name()
type_var = type_1 type_var = type_1
else: else:
buf_name, type_var = get_buffer_for_usertype(type_1, tm, tm._instructions[0], count_1) buf_name, type_var = get_buffer_for_usertype(type_1, tm, tm._instructions[0], count_1)
......
...@@ -55,7 +55,9 @@ def get_correct_case(type_1, size_1, send_func, recv_func, comm): ...@@ -55,7 +55,9 @@ def get_correct_case(type_1, size_1, send_func, recv_func, comm):
call = tm.get_instruction(identifier="MPICALL", rank_excuting=1) call = tm.get_instruction(identifier="MPICALL", rank_excuting=1)
if type_1 in predefined_types: if type_1 in predefined_types:
buf_name = get_buffer_for_type(type_1, size_1) buf_alloc = get_buffer_for_type(type_1, size_1)
tm.insert_instruction(buf_alloc,before_instruction=tm._instructions[0])
buf_name = buf_alloc.get_name()
type_var = type_1 type_var = type_1
else: else:
buf_name, type_var = get_buffer_for_usertype(type_1, tm, tm._instructions[0], size_1) buf_name, type_var = get_buffer_for_usertype(type_1, tm, tm._instructions[0], size_1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment