Skip to content

1. Installation

PabloMartin91 edited this page Feb 1, 2021 · 18 revisions

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:

  1. Installation of TDM-GCC
    • Installation of openMP library, which is available as an optional component in the TDM-GCC compiler installation

      Image

    • After the installation of TDM-GCC and the openMP library, restart your system.

  1. 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).

  1. (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 default C:\Program Files (x86)\GnuWin32\bin
    5- Ok to all

  2. 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:

  1. 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

  2. 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

  3. (OPTIONAL, BUT RECOMMENDED) Install zip program. KIMERA will automatically zip your output files.

    sudo apt-get install zip

  4. 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:

  1. 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

  2. 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

  3. 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.

Clone this wiki locally