howto:compile_on_windows
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| howto:compile_on_windows [2023/12/01 13:18] – krack | howto:compile_on_windows [2025/08/21 14:08] (current) – Revert last change and force full cleaning krack | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ==== Install Linux base system ==== | ==== Install Linux base system ==== | ||
| - | Search in the [[https:// | + | Search in the [[https:// |
| ==== Install required packages ==== | ==== Install required packages ==== | ||
| Line 17: | Line 17: | ||
| Install additional software packages required to build CP2K which are not included in the base system like '' | Install additional software packages required to build CP2K which are not included in the base system like '' | ||
| < | < | ||
| - | sudo apt -y install make | + | sudo apt -y install |
| sudo apt -y install gcc g++ gfortran | sudo apt -y install gcc g++ gfortran | ||
| </ | </ | ||
| Line 34: | Line 34: | ||
| git clone --recursive https:// | git clone --recursive https:// | ||
| </ | </ | ||
| - | or download a CP2K release version like 2023.2 | + | or download a CP2K release version like 2025.2 |
| < | < | ||
| - | git clone --recursive -b support/v2023.2 https:// | + | git clone --recursive -b support/v2025.2 https:// |
| </ | </ | ||
| Line 82: | Line 82: | ||
| </ | </ | ||
| and the '' | and the '' | ||
| - | </ | ||
| ==== Test the serial CP2K binary ==== | ==== Test the serial CP2K binary ==== | ||
| Line 117: | Line 116: | ||
| First reset the CP2K repository to the state of a fresh '' | First reset the CP2K repository to the state of a fresh '' | ||
| < | < | ||
| - | git clean -fdx | + | git clean -ffdx |
| </ | </ | ||
| Install additional packages needed for an MPI/OpenMP parallel CP2K binary. Here we use the MPI implementation '' | Install additional packages needed for an MPI/OpenMP parallel CP2K binary. Here we use the MPI implementation '' | ||
| < | < | ||
| - | sudo apt -y install mpich bzip2 unzip zlib1g-dev | + | sudo apt -y install |
| </ | </ | ||
| and some system packages for data compression have to be installed as well. | and some system packages for data compression have to be installed as well. | ||
| Line 127: | Line 126: | ||
| < | < | ||
| cd tools/ | cd tools/ | ||
| - | ./ | + | ./ |
| </ | </ | ||
| The commands for compiling | The commands for compiling | ||
| Line 157: | Line 156: | ||
| cp2k.ssmp | cp2k.ssmp | ||
| </ | </ | ||
| - | and likewise with '' | + | and likewise with '' |
| + | |||
| + | CP2K MPI/OpenMP parallel runs are launched with '' | ||
| + | < | ||
| + | mpiexec -n 4 -genv OMP_NUM_THREADS=2 | ||
| + | </ | ||
| + | will use 4 MPI ranks with 2 OpenMP threads each (i.e. it will consume 8 CPU cores) to run the input file '' | ||
| + | |||
| + | The '' | ||
| + | < | ||
| + | mpiexec -n 4 -genv OMP_NUM_THREADS=1 cp2k.psmp H2O-32.inp | ||
| + | mpiexec -n 4 | ||
| + | </ | ||
| + | are basically equivalent. | ||
| **Enjoy CP2K under Windows!** | **Enjoy CP2K under Windows!** | ||
howto/compile_on_windows.1701436716.txt.gz · Last modified: by krack
