The contents of this package include an MD code for the simulation of atoms using a Lennard-Jones potential, which non-optimized serial version was provided by Dr. Axel Kohlmeyer, that has been optimized with multi-threading parallelization. The tasks were divided as follows:
- Refactoring and optimizing for single-core performance, assigned to Neeraj Kulhari;
- openMP parallelization, assigned to Andrea Stacchetti;
- MPI parallelization, assigned to Iara Ota.
To use the code, follow the following steps.
- Clone the repository using the command
git clone https://github.com/iaraota/MHPC-P2.8-project.git
. - Navigate to the project folder:
cd MHPC-P2.8-project
- Create a build folder and navigate to it:
mkdir build && cd build
- Run
cmake ..
to configure the project.
Use one of the following commands depending on the desired build option:
- The optimized version, created by Neeraj Kulhari. Command:
make optimized
; - The openMP implementation of the optimized version, created by Andrea Stacchetti. Command:
make omp
; - The MPI implementation of the optimized version, created by Iara Ota. Command:
make mpi
; - The hybrid version with openMP and MPI implementation. Command
make hybrid
. - The google tests. Command:
make unittest
To clean the project and remove all executables and object files, use the command make clean
.
To execute the unit tests, you need to compile both the tests and one version. For example, you can run the following commands:
make unittest
make optimized
make test
These commands will compile the necessary code for the unit tests and the optimized version, allowing you to run the tests to verify the functionality of the program.
src
: Contains the source code for the ljdm simulation.include
: Contains header files for the ljdm simulation.examples
: Contains examples for input files for the ljdm simulation.reference
: Contains the reference solution for the inputs in theexample
folder.tests
: Contains google tests for the ljdm simulation.Report
: Contains the final report for the benchmark of the project.Obj
andObj-serial
: Contains the object files generated during compilation.