How to install Malva

1 - Install MPICH:

On Debian: $ sudo apt-get install mpich
On OSX: $ brew install mpich

2 - Clone the repository in your local machine:

$ git clone https://github.com/gabrielfagundez/malva

3 - Modify the malva/environment file:

# Malva Configuration.
Malva_DIR=/lib/computational_intelligence/malva

# MPICH library
MPI_BIN=/lib/mpich2/3.1/bin

4 - Compile the library

$ make all



How Malva works?

Malva skeletons are based on the separation of two concepts: the concrete problem to be solved and the general resolution method to be used. They can be seen as generic templates that just need to be instantiated with the features of a problem in order to solve it. All features related to the selected generic resolution method and its interaction with the concrete problem are implemented by the skeleton. While the particular features related to the problem must be given by the user, the knowledge to parallelize the execution of the resolution method is implemented in the skeleton, so that users do not need to deal with parallelism issues.

The design of the Malva library focuses on easy to use skeletons and general and efficient implementations. To achieve both objectives, the C++ programming language was selected due to its high level, modularity, flexibility and efficiency features. We have reduced to a minimum the use of inheritance and virtual methods in order to provide better efficiency and ease of use. To instantiate most problems, a basic knowledge of C++ is enough, and only sequential code without side effects is needed.

Skeletons are implemented by a set of required and provided C++ classes that represent an abstraction of the entities participating in the resolution method. The provided classes implement internal aspects of the skeleton in a problem-independent way. The required classes specify information and behavior related to the problem. This conceptual separation allows us to define required classes with a fixed interface but without any implementation, so that provided classes can use required classes in a generic way.

More specifically, each skeleton includes the Problem and Solution required classes, that encapsulate the problem-dependent entities needed by the resolution method. The Problem class abstracts the features of the problem that are relevant to the selected optimization method. The Solution class abstracts the features of the feasible solutions that are relevant to the selected resolution method. Depending on the skeleton, other classes may be required. On the other hand, each skeleton offers two provided classes: Solver and SetUpParams. The former abstracts the selected resolution method. The later contains the setup parameters needed to perform the execution (e.g. number of iterations, number of independent runs, parameters guiding the search, etc.). The Solver class provides methods to run the resolution scheme and methods to consult its progress or change its state. The only information the solver needs is an instance of the problem to solve and the setup parameters. In order to enable an skeleton to have different solver engines, the Solver class defines a unique interface and provides several subclasses that provide different sequential and parallel implementations (Solver_Seq, Solver_Lan and Solver_Wan).
IMAGEN DE ARQ


Implementation

The implementation of each skeleton is contained in three files:
  • #{skeleton}.hh: The file containing the definition of all classes (provides and requires).
  • #{skeleton}.pro.cc: The file containing the source code of the classes needed for the internal implementation of the method.
  • #{skeleton}.req.cc: The source file where all the required classes will be implemented.
  • In additional, the user must configure the method parameters in the file #{skeleton}.cfg.

    Contributing

    We encourage you to submit pull requests, propose features and discuss issues. Just fork the repository on your GitHub account, and code what you want!



    Fork me on GitHub