Skip to content

Instantly share code, notes, and snippets.

@ultimatile
Last active February 5, 2023 16:24
Show Gist options
  • Save ultimatile/40e1990a439f3b8d45dea738b9d637f4 to your computer and use it in GitHub Desktop.
Save ultimatile/40e1990a439f3b8d45dea738b9d637f4 to your computer and use it in GitHub Desktop.
Building Quantum ESPRESSO by CMake
# with install
# Replace <path to QE source directory> and <path to install directory> with the appropriate paths.
cmake -S <path to QE source directory> -Bbuild -DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_INSTALL_PREFIX=<path to install directory> -DQE_ENABLE_OPENMP=ON
cmake --build build --target install
# without install
# Replace <path to QE source directory> with the appropriate path.
cmake -S <path to QE source directory> -Bbuild -DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90 -DQE_ENABLE_OPENMP=ON
cmake --build build
@ultimatile
Copy link
Author

ultimatile commented Jan 25, 2023

MPI is enabled and OpenMP is disabled by default.
Use of the GPU requires other settings.

Detailed info about CMake build is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment