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 08:56] – add do_regtest 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 74: | Line 74: | ||
| export OMP_NUM_THREADS=2 | export OMP_NUM_THREADS=2 | ||
| </ | </ | ||
| - | The binaries with the file extension '' | + | The binaries with the file extension '' |
| + | |||
| + | It is also suggested | ||
| < | < | ||
| export OMP_STACKSIZE=16M | export OMP_STACKSIZE=16M | ||
| + | ulimit -s 65000 | ||
| </ | </ | ||
| + | and the '' | ||
| ==== Test the serial CP2K binary ==== | ==== Test the serial CP2K binary ==== | ||
| Line 89: | Line 93: | ||
| make -j ARCH=local VERSION=ssmp TESTOPTS=" | make -j ARCH=local VERSION=ssmp TESTOPTS=" | ||
| </ | </ | ||
| - | which will only run the test cases in the folder '' | + | which will only run the test cases in the folder '' |
| < | < | ||
| ~/ | ~/ | ||
| </ | </ | ||
| + | All data generated by '' | ||
| + | < | ||
| + | make ARCH=local VERSION=ssmp testclean | ||
| + | </ | ||
| + | whereas | ||
| + | < | ||
| + | make ARCH=local VERSION=ssmp realclean | ||
| + | </ | ||
| + | and | ||
| + | < | ||
| + | make distclean | ||
| + | </ | ||
| + | will remove all data from '' | ||
| ==== Build and test a parallel CP2K binary ==== | ==== Build and test a parallel CP2K binary ==== | ||
| Line 99: | 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 109: | Line 126: | ||
| < | < | ||
| cd tools/ | cd tools/ | ||
| - | ./ | + | ./ |
| </ | </ | ||
| The commands for compiling | The commands for compiling | ||
| Line 139: | 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 !** | + | **Enjoy CP2K under Windows!** |
howto/compile_on_windows.1701421016.txt.gz · Last modified: by krack
