Building & Installing

Prerequisites

GGEMS is based on the OpenCL library. For each platform (NVIDIA, Intel and AMD), you must install the corresponding drivers.

Warning

GGEMS has not been validated with AMD. Useful AMD drivers could be found here.

NVIDIA

To use GGEMS on an NVIDIA platform, simply install CUDA (version 12.6 is recommended) along with the corresponding driver.

Important

The CUDA library is not used by GGEMS. Only the OpenCL library provided with CUDA is used. It’s recommended to install CUDA from NVIDIA website. For linux user, installing cuda using the ‘apt’ program for instance is not recommended. If the NVIDIA driver does not match the correct CUDA version, GGEMS may not work.

INTEL

To use GGEMS on an Intel platform (CPU or GPU) you must install the driver. For this, it is recommended to install the driver provided by Intel oneAPI Base Toolkit. The library will be installed with the Intel compiler and the other libraries.

OpenGL visualization

Since GGEMS v1.2, the OpenGL library can be used to visualize a simulation in 3D space. OpenGL can be used on any OS. 3 libraries have to be installed to use OpenGL correctly:

  • GLFW : an Open Source and multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.

  • GLEW : a cross-platform open-source C/C++ extension loading library.

  • GLM : a C++ header for mathematics library based on the OpenGL Shading Language (GLSL) specifications.

Important

For linux users, GLEW library must be installed from source (glew-XXX.zip). It’s mandatory to link GGEMS and libGLEW.a static library.

Important

For linux users, GLFW and GLM libraries can be installed using the ‘apt’ program for example.

Warning

For Windows users the libraries should be downloaded from their respective website and installed if possible in the standard location C:\Program Files (x86)

GGEMS Installation

To install GGEMS, CMake and setuptools (a python project combined with CMake) are required.

In the following section, a recommended installation procedure is provided as an example. First clone the GGEMS project:

$ git clone https://github.com/GGEMS/ggems.git

Enter the directory ggems and launch the installation command (set opengl to OFF to deactivate it):

$ cd ggems
$ python setup.py build_ext --opengl=ON install --user

Note

On Windows OS, multi-processor compilation is possible using Ninja, and running the command:

$ python setup.py build_ext --generator=Ninja --opengl=ON install --user

GGEMS is now installed on your machine. To check the installation, you can try the examples or launch GGEMS in a Python console.

from ggems import *
opencl_manager = GGEMSOpenCLManager()
opencl_manager.print_infos()
exit()