User Tools

Site Tools


dev:starting

Starting development

CP2K invites the community to contribute to its development!

Documentation improvements, bug fixes, performance enhancements, portability issues, new features, new methods … you are encouraged to contribute so that the community as a whole can benefit.

In order to contribute code for integration into CP2K, get in touch with some of the developers having SVN write access .

Preparing a patch

Following these guidelines will avoid common mistakes and make it easier to integrate patches. It usually takes less than one hour:

  1. 'make -j pretty' to auto-format the code (variables).
  2. 'make -j ARCH=… VERSION=“sdbg pdbg ssmp”' will check if the code compiles in serial (sdbg) / parallel (pdbg) / with omp (ssmp).
  3. prepare and add testcases suitable for regtesting the code (i.e. that run quickly through all new code paths)
  4. run these testcases by hand. Be sure to use bounds checking, and valgrind to check for undefined variables or memory leaks (see debug page)
  5. run the full regression testing suite, be sure the new testcases run correctly, and no other tests are incorrectly affected.
  6. generate an 'svn diff > patch.MyNewFeature' of the code and carefully check the result:
    1. are new files, including tests, visible ? Use 'svn add' as needed.
    2. Are only the intended files and code modified ? Use 'svn revert' as needed
    3. Does the code contain stray write statements or debug info ?
    4. Is all new code sufficiently documented and explained ?
    5. Are the input keywords clearly described ?
    6. Are proper citations added the bibliography ?
  7. If any of the above steps required changes to the code, go back to the first step, otherwise send for review / inclusion to a person with SVN write access.

Where to start

CP2K is a large project, there is no way to study the full code, and start when that is done! Start working on small patches first, that are easy to code, to test and to integrate. Small patches are easier for people with SVN write access to review and thus will be more quickly integrated in the SVN code. As experience with the code grows, tackling larger projects becomes realistic. Developers that regularly contribute high quality patches can be granted SVN write access.

dev/starting.txt · Last modified: 2014/11/04 07:51 by vondele