-
Notifications
You must be signed in to change notification settings - Fork 3
1. Installation
KIMERA is written in the standard C++11. Therefore, in order to install it, we will need the proper C++ compiler. Moreover, KIMERA is paralelizated by means of the OPENMP library so such library is also requiered.
REQUERIMENTS:
-a C++ compiler. I have used TDM-GCC on Windows, GCC on linux and CLANG on mac. On windows and linux, you need 4.9.2 or higher (the current version on 21/12/2020 for TDM-GCC is 9.2.0 and for GCC is 10.2).
-openmp library.
WINDOWS:
- Installation of TDM-GCC
-
Compilation of KIMERA.
In the command prompt (you can access the windows command prompt by writting
cmd
after preessig Windows key and 'r' key), go to your KIMERA folder by indicating the path to it.cd C:\Path\to\your\KIMERA\folder\
for example:
cd C:\Programs\Kimera\
compile it with the following command, change the compilator paths if neccesary. (In this example we have installed the 64 version in the default installation folder):
C:\TDM-GCC-64\bin\g++.exe -L\C:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\9.2.0\include\ -Wl,-rpath=C:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\9.2.0\include\ -Wall -fexceptions -fopenmp -std=c++11 -O3 include\Atom.h include\Box.h include\Cell.h include\Control.h include\Data_printer.h include\Data_reader.h include\Event.h include\Event_definition.h include\Event_stack.h include\Event_stack_unstuck.h include\Linked_neighbour.h include\Models.h include\Position.h include\RandomGenerator.h include\Record.h include\Simulation.h include\Sym_equation.h include\Tracker.h include\Util.h main.cpp src\Atom.cpp src\Box.cpp src\Cell.cpp src\Control.cpp src\Data_printer.cpp src\Data_reader.cpp src\Event.cpp src\Event_definition.cpp src\Event_stack.cpp src\Event_stack_unstuck.cpp src\Linked_neighbour.cpp src\Models.cpp src\Position.cpp src\RandomGenerator.cpp src\Record.cpp src\Simulation.cpp src\Sym_equation.cpp src\Tracker.cpp src\Util.cpp -Iinclude -o Kimera.exe
TIP: If you get an error of 'Permission denied' (see Image), You must deselect the 'Read-only' attribute of your KIMERA folder (see Image) (left click -> Properties in the KIMERA folder).
-
(OPTIONAL, BUT RECOMMENDED) Install zip program. KIMERA will automatically zip your output files. zip 3.0
For Windows to recognise the 'zip' command, you will need to 'edit the system environment variables'.
1- image
2- image
3- image
4- add new line with the path where zip have been installed, for example by defaultC:\Program Files (x86)\GnuWin32\bin
5- Ok to all -
USAGE TIPS
A. It is better to use KIMERA from the command prompt by specifying the path to the input file
Kimera.exe path\to\kimera\inputfile\kimera.input
for example
Kimera.exe C:\Programs\Kimera\examples\AB_Kossel_crystal_random\kimera.input
same, but print the log in a text file:
Kimera.exe C:\Programs\Kimera\examples\AB_Kossel_crystal_random\kimera.input > log.txt
B. Nevertheless, you can also move your input files to the same folder as Kimera.exe, and double-click it.
LINUX:
-
Installation of GCC. Write the following commands in the terminal:
sudo apt update
sudo apt install build-essential
sudo apt-get install manpages-dev
- Installation of openMP library
sudo apt-get install libomp-dev
-
Compilation of KIMERA. In the terminal, go to KIMERA folder
for example
cd /home/user/Kimera
execute the makefile with
make
If it doesn't work, try to specify the path to your compliler (see and edit the makefile in the KIMERA folder)
make sure that the program has execution rights:
sudo chmod 777 Kimera.exe
-
(OPTIONAL, BUT RECOMMENDED) Install zip program. KIMERA will automatically zip your output files.
sudo apt-get install zip
-
USAGE TIPS
A. It is better to use KIMERA from the terminal by specifying the path to the input file
./Kimera.exe path/to/kimera/inputfile/kimera.input
for example
./Kimera.exe /home/user/Kimera/examples/AB_Kossel_crystal_random/kimera.input
same, but print the log in a text file:
./Kimera.exe /home/user/Kimera/examples/AB_Kossel_crystal_random/kimera.input > log.txt
B. Nevertheless, you can also move your input files to the same folder as Kimera.exe, and execute it.
MAC:
-
Installation of Clang. Write the following commands in the terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Installation of openMP library
brew install libomp
-
Compilation of KIMERA. In the terminal, go to KIMERA folder
for example
cd /home/user/Kimera
compile it with the following command:
clang++ -Wall -fexceptions -std=c++11 -O3 main.cpp src/*.cpp -Iinclude -o Kimera.exe -lomp
make sure that the program has execution rights:
chmod 777 Kimera.exe
-
USAGE TIPS
A. It is better to use KIMERA from the terminal by specifying the path to the input file
./Kimera.exe path/to/kimera/inputfile/kimera.input
for example
./Kimera.exe /home/user/Kimera/examples/AB_Kossel_crystal_random/kimera.input
same, but print the log in a text file:
./Kimera.exe /home/user/Kimera/examples/AB_Kossel_crystal_random/kimera.input > log.txt
B. Nevertheless, you can also move your input files to the same folder as Kimera.exe, and execute it. In order to execute by double-clicking KIMERA, you have to set the terminal as the default application to use it.
Whenever you use KIMERA, please cite "Martin, P., Gaitero, J. J., Dolado, J. S., & Manzano, H. (2020). KIMERA: A Kinetic Montecarlo Code for Mineral Dissolution. Minerals, 10(9), 825" https://www.mdpi.com/2075-163X/10/9/825/htm