CMake Build Instructions¶
Create a binary directory and enter it. This will contain the results of your build (the libraries and executables).
mkdir XGC-bin cd XGC-bin
Run CMake to configure a build of XGC. Additional settings can be passed as
To interactively edit configuration settings, use
ccmakefor a CLI or
cmake-guifor a GUI.
XGC depends on ADIOS, PETSc, FFTW.
Using system-installed dependencies¶
- You will need to provide CMake with the location of XGC’s dependencies if they
are already installed on your system.
cmake -DADIOS1_ROOT=<path to ADIOS1> -DPETSc_ROOT=<path to PETSc> -DFFTW_ROOT=<path to FFTW> <path to XGC-Devel>
XGC can download, build, and install its dependencies for you.
We call this feature a superbuild. To enable this feature, pass
-DBUILD_DEPENDENCIES=ON to cmake when configuring the build.
cmake /path/to/XGC-Devel -DBUILD_DEPENDENCIES=ON make
This tells CMake to download and build all of the dependencies before building XGC.
Building at HPC facilities¶
If you are building XGC at an HPC facility then XGC’s dependencies have likely already been installed for you.
XGC’s CMake build system knows where to find these dependencies at the following HPC facilities:
If you set the environment variable
XGC_PLATFORM to one of these values then
CMake will automatically find XGC’s dependencies for you.
export XGC_PLATFORM=greene cmake /path/to/XGC-Devel make -j