User Tools

Site Tools


dev:starting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:starting [2020/04/17 11:38] tmuellerdev:starting [2022/12/16 09:27] (current) – Fix link krack
Line 56: Line 56:
      - In the case of success, the PR will be merged by one of the CP2K administrators      - In the case of success, the PR will be merged by one of the CP2K administrators
      - In the case of error, please check what's wrong in the CI logs, fix it in your branch, and commit/push again. The CI will automatically rerun on the new version of the code (no need to close the PR, it will be automatically updated!). Repeat until the CI runs fine.      - In the case of error, please check what's wrong in the CI logs, fix it in your branch, and commit/push again. The CI will automatically rerun on the new version of the code (no need to close the PR, it will be automatically updated!). Repeat until the CI runs fine.
-     + 
 +===== Prepare a development environment with Spack ===== 
 + 
 +The HPC package manager [[https://spack.io/|Spack]] can be used to provide a development environment for CP2K. 
 + 
 +<note important>We assume that you followed the basic instructions to install Spack and that the ''spack'' command is available and that you have a checkout of the CP2K source code (for the latter, follow the instructions above).</note> 
 + 
 +  - change into the CP2K directory: ''cd cp2k'' 
 +  - create a Spack environment (here for building an ''sopt'' profile) to make sure we collect all dependencies in one view: ''spack env create -d envs/sopt'' 
 +  - activate the Spack environment using: ''spack env activate -d envs/sopt'' 
 +  - install everything required for CP2K and build & install CP2K from the current source tree (this may take while): ''spack dev-build cp2k@master ~openmp ~mpi'' 
 +  - start a new shell with all the environment variables set using ''spack build-env cp2k@master ~openmp ~mpi -- bash'' 
 +  - to recompile, run: ''make VERSION=sopt'' 
 + 
 +If you experience problems with other tools (like your editor) when inside the Spack environment, you can directly run the build command using: ''spack build-env cp2k@master ~openmp ~mpi %%--%% make VERSION=sopt''
dev/starting.1587123489.txt.gz · Last modified: 2020/08/21 10:14 (external edit)