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

Refactoring: Renamed Class

parent 355b9df2
No related branches found
No related tags found
1 merge request!3more work on infrastructure II
#! /usr/bin/python3 #! /usr/bin/python3
from scripts.Infrastructure.MPICallFactory import MPI_Call_Factory from scripts.Infrastructure.MPICallFactory import MPICallFactory
from scripts.Infrastructure.Template import InstructionBlock from scripts.Infrastructure.Template import InstructionBlock
from scripts.Infrastructure.AllocCall import AllocCall from scripts.Infrastructure.AllocCall import AllocCall
...@@ -40,7 +40,7 @@ class CorrectParameterFactory: ...@@ -40,7 +40,7 @@ class CorrectParameterFactory:
# todo also for send and non default args # todo also for send and non default args
def get_matching_recv(call): def get_matching_recv(call):
correct_params = CorrectParameterFactory() correct_params = CorrectParameterFactory()
recv = MPI_Call_Factory().mpi_recv( recv = MPICallFactory().mpi_recv(
correct_params.get("BUFFER"), correct_params.get("BUFFER"),
correct_params.get("COUNT"), correct_params.get("COUNT"),
correct_params.get("DATATYPE"), correct_params.get("DATATYPE"),
......
...@@ -16,7 +16,7 @@ from collections import OrderedDict ...@@ -16,7 +16,7 @@ from collections import OrderedDict
from scripts.Infrastructure.MPICall import MPI_Call from scripts.Infrastructure.MPICall import MPI_Call
class MPI_Call_Factory: class MPICallFactory:
""" """
...@@ -24,13 +24,13 @@ correct_call_factory_header=""" ...@@ -24,13 +24,13 @@ correct_call_factory_header="""
from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory
class CorrectMPI_Call_Factory: class CorrectMPICallFactory:
""" """
template_correct = """ template_correct = """
def @{FUNC_KEY}@(self): def @{FUNC_KEY}@(self):
correct_params = CorrectParameterFactory() correct_params = CorrectParameterFactory()
return MPI_Call_Factory().@{FUNC_KEY}@(@{PARAMS}@) return MPICallFactory().@{FUNC_KEY}@(@{PARAMS}@)
""" """
def main(): def main():
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from scripts.Infrastructure.ErrorGenerator import ErrorGenerator from scripts.Infrastructure.ErrorGenerator import ErrorGenerator
from scripts.Infrastructure.InstructionBlock import InstructionBlock from scripts.Infrastructure.InstructionBlock import InstructionBlock
from scripts.Infrastructure.MPICallFactory import MPI_Call_Factory, CorrectMPI_Call_Factory 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
from scripts.Infrastructure.Template import TemplateManager from scripts.Infrastructure.Template import TemplateManager
...@@ -32,7 +32,7 @@ class Invalid_negative_rank_error(ErrorGenerator): ...@@ -32,7 +32,7 @@ class Invalid_negative_rank_error(ErrorGenerator):
# include the buffer allocation in the template (all ranks execute it) # include the buffer allocation in the template (all ranks execute it)
tm.register_instruction_block(correct_params.get_buffer_alloc()) tm.register_instruction_block(correct_params.get_buffer_alloc())
send = MPI_Call_Factory().mpi_send( send = MPICallFactory().mpi_send(
correct_params.get("buf"), correct_params.get("buf"),
correct_params.get("count"), correct_params.get("count"),
correct_params.get("datatype"), correct_params.get("datatype"),
...@@ -41,7 +41,7 @@ class Invalid_negative_rank_error(ErrorGenerator): ...@@ -41,7 +41,7 @@ class Invalid_negative_rank_error(ErrorGenerator):
correct_params.get("comm"), correct_params.get("comm"),
) )
send.set_has_error() send.set_has_error()
recv = CorrectMPI_Call_Factory().mpi_recv() recv = CorrectMPICallFactory().mpi_recv()
b = InstructionBlock() b = InstructionBlock()
# only rank 0 execute the send # only rank 0 execute the send
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment