folder containing all libraries that are used by main.cpp
Base Class for all following Implementations of the desired task. Responsible for parsing the data from the given dataset from .npy files into Eigen vectors.
Given functionality:
VI_Processor_Base- reads all files.npythat are needed for the value iteration, transforms them toEigenvectors/SparseMatrixvoid Process()- function that callsvalue_iteration_implof respective processorstd::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationfloat iteration_step()- performs the value iteration for given amount of steps (before remerging wholeprobability matrix) on given subset of theprobability matrixvoid debug_message()- prints given debugging messages for respective processor
Header of vi_processor_base.cpp
first implementation of a communication scheme. Using MPI_Allgatherv,MPI_Allreduce and MPI_Gatherv. Waits for given amount of periods before re-gathering the updated J, inherits functionality from VI_Processor_Base.
Given functionality:
std::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationvoid value_iteration_impl()- concrete implementation of communication scheme, doing the value iteration
Header of vi_processor_impl_distr_01.cpp
second implementation of a communication scheme. Using MPI_Send, MPI_Recv and MPI_Bcast. Waits for given amount of periods before re-gathering the updated J, inherits functionality from VI_Processor_Base. Logic of communication scheme is similar to VI_Processor_Impl_Distr_01
Given functionality:
std::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationvoid value_iteration_impl()- concrete implementation of communication scheme, doing the value iteration
Header of vi_processor_impl_distr_02.cpp
third implementation of a communication scheme. Using MPI_Sendrecv and MPI_Gatherv. Updates J every period completely, inherits functionality from VI_Processor_Base. Works synchronely
Given functionality:
std::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationvoid value_iteration_impl()- concrete implementation of communication scheme, doing the value iteration
Header of vi_processor_impl_distr_03.cpp
third implementation of a communication scheme. Using MPI_Isend and MPI_Irecv, MPI_Ibcast and MPI_Igatherv. Waits for given amount of periods before re-gathering the updated J, inherits functionality from VI_Processor_Base. Logic of communication scheme is similar to VI_Processor_Impl_Distr_02 but non-blocking
Given functionality:
std::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationvoid value_iteration_impl()- concrete implementation of communication scheme, doing the value iteration
Header of vi_processor_impl_distr_04.cpp
third implementation of a communication scheme. Using MPI_Igather, MPI_Bcast and MPI_Gatherv. Waits for given amount of periods before re-gathering the updated J, inherits functionality from VI_Processor_Base. Logic of communication scheme is similar to VI_Processor_Impl_Distr_01 but non-blocking
Given functionality:
std::string GetName()- get name of implementationbool SetParameter()- set parameter of implementationstd::map<std::string, float> GetParameters()- get parameter of implementationvoid value_iteration_impl()- concrete implementation of communication scheme, doing the value iteration
Header of vi_processor_impl_distr_05.cpp
local implementation of value iteration without any communication scheme or parallelization. Implemented to use as reference for performance comparisons. Updates J every period completely, inherits functionality from VI_Processor_Base. Works synchronely
Given functionality:
std::string GetName()- get name of implementationvoid value_iteration_impl()- concrete implementation of value iteration
Header of vi_processor_impl_local.cpp