 ==================================================================================================
 Protocol for the creation of a CP2K release (branch) version (Matthias Krack, 13.06.2013)
 ==================================================================================================

 1. Agreement about a new release branch (2.4 in this case) among the CP2K developers

 2. Check if the following requirements for the release are fulfilled:
    a) Clean g95 and gfortran popt regtest
    b) Successful build and clean regtest of a gfortran sdbg, sopt, popt, pdbg, ssmp, and psmp version
    c) Clean valgrind gfortran sdbg regtest
    d) Check the SMP executables with H2O-32 benchmark input, e.g. using the script
#!/bin/sh
cwd=$PWD
cd cp2k/tests/QS/benchmark
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=1
mpiexec -np 8 ../../../exe/Linux-x86-64-gnu/cp2k.popt H2O-32.inp >${cwd}/H2O-32-popt-8-1.out
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=1
mpiexec -np 8 ../../../exe/Linux-x86-64-gnu/cp2k.psmp H2O-32.inp >${cwd}/H2O-32-psmp-8-1.out
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=2
mpiexec -np 4 ../../../exe/Linux-x86-64-gnu/cp2k.psmp H2O-32.inp >${cwd}/H2O-32-psmp-4-2.out
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=4
mpiexec -np 2 ../../../exe/Linux-x86-64-gnu/cp2k.psmp H2O-32.inp >${cwd}/H2O-32-psmp-2-4.out
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=8
mpiexec -np 1 ../../../exe/Linux-x86-64-gnu/cp2k.psmp H2O-32.inp >${cwd}/H2O-32-psmp-1-8.out
#
../../../tools/clean_cwd.sh
export OMP_NUM_THREADS=8
              ../../../exe/Linux-x86-64-gnu/cp2k.ssmp H2O-32.inp >${cwd}/H2O-32-ssmp-1-8.out
#
cd ${cwd}

 3. Create a new branch directory on the SVN server using

    svn mkdir svn+ssh://mkrack@svn.code.sf.net/p/cp2k/code/branches/cp2k-2_4-branch

    Description text: "Creating CP2K release branch 2.4"

 4. Copy the current CP2K version from the trunk using

    svn copy -m "Creating CP2K release branch 2.4" \
        svn+ssh://mkrack@svn.code.sf.net/p/cp2k/code/trunk/cp2k\
        svn+ssh://mkrack@svn.code.sf.net/p/cp2k/code/branches/cp2k-2_4-branch/cp2k

 5. Check the release version out using

    svn co svn+ssh://mkrack@svn.code.sf.net/p/cp2k/code/branches/cp2k-2_4-branch cp2k-2_4-branch

 6. a) Change cp2k_info.F (comment/uncomment release/branch line),
    b) create a file cp2k/REVISION with the revision number of the release branch
    c) change cp2k/web/manual/update_manual (substitute "trunk" with "cp2k-2_4-branch")
    d) provide saxon8.jar manual generation
    e) Commit the changes with:
       cd cp2k-2_4-branch/cp2k
       svn add REVISION
       svn ci REVISION src web
       Description text: "Store the revision number of the release branch"

 7. Compile the release branch version (and optionally run a regtest)

 8. Create a new manual directory on "cp2k.org":public_html/manual/cp2k-2_4-branch

 9. Run update_manual script in cp2k/web/manual/

10. Export the release branch (checkout without .svn folder) using

    svn export http://svn.code.sf.net/p/cp2k/code/branches/cp2k-2_4-branch/cp2k cp2k-2.4

11. Check the exported branch release (just compile it or even run a regtest)

12. Create a bzip2 tar file using

    tar -cjf cp2k-2.4.tar.bz2 cp2k-2.4

13. Create statically linked sopt and ssmp versions

14. Upload the tar file to sourceforge to make it appear in the list under "Files" for download using

    scp cp2k-2.4/exe/Linux-x86-64-gnu-static/cp2k.sopt mkrack@frs.sourceforge.net:/home/frs/project/cp2k/precompiled/cp2k-2.4-Linux-x86_64.sopt
    scp cp2k-2.4/exe/Linux-x86-64-gnu-static/cp2k.ssmp mkrack@frs.sourceforge.net:/home/frs/project/cp2k/precompiled/cp2k-2.4-Linux-x86_64.ssmp
    scp cp2k-2.4.tar.bz2 mkrack@frs.sourceforge.net:/home/frs/project/cp2k/cp2k-2.4.tar.bz2

15. Increment the version number of the development version from 2.4 to 2.5 in the files

    cp2k/src/cp2k_info.F
    cp2k/doc/Doxyfile.template
    cd cp2k
    svn ci src/ doc/
    Description text: "Increment CP2K development version number"

16. Update the web links on www.cp2k.org correspondingly
