{"id":1756,"date":"2014-08-08T09:43:07","date_gmt":"2014-08-08T09:43:07","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=1756"},"modified":"2017-03-14T11:09:57","modified_gmt":"2017-03-14T11:09:57","slug":"cp2k","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/cp2k\/","title":{"rendered":"CP2K"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>CP2K is a program to perform atomistic and molecular simulations of solid state, liquid, molecular, and biological systems. It provides a general framework for different methods such as e.g., density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW) and classical pair and many-body potentials.<\/p>\n<p>Version 2.5.1 is installed on the CSF. It was compiled with Intel Compilers 12.0.5 &#038; MKL (with -msse4.1 and -axAVX) and support for MPI (no OpenMP). This software will not run on the AMD nodes, it is optimised for the Intel hardware.<\/p>\n<p>Version 2.6.0 is also available. Note that this version was not compiled on the CSF, instead the pre-compiled binary from the CP2K download site was installed. This version will only run on a maximum of 16 cores in smp.pe.<\/p>\n<p>Version 4.1 is available for distributed parallel use on all nodes, but will only run usefully across Infiniband-connected nodes, at least in modes like Quickstep which are very latency-sensitive.  It is built with the <a href=\"https:\/\/www.cp2k.org\/howto:compile\">add-ons<\/a> libint, libderiv, libxsmm, libxc, and ELPA; it may be possible to add others if required. (The way it is built sidesteps a bad <a href=\"https:&#47;&#x2f;w&#x77;&#x77;&#46;&#x6d;a&#105;&#x6c;&#45;&#x61;r&#99;&#x68;i&#x76;e&#46;&#x63;o&#x6d;&#x2f;&#117;&#x73;e&#114;&#x73;&#64;&#x6c;i&#115;&#x74;&#115;&#x2e;o&#112;&#x65;n&#x2d;&#x6d;&#112;&#x69;&#46;&#111;&#x72;&#103;\/\/msg30732.html\">performance problem<\/a> on Infiniband which you might see elsewhere.) There is a pure MPI binary, cp2k.popt, and an MPI+OpenMP one, cp2k.psmp, but running the latter properly still needs some investigation.  See the <a href=\"#parsub\">parallel submission<\/a> recipe below for running the popt version.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>The software is open source under the GNU General Public License.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load the appropriate modulefile. <\/p>\n<p>For version 4.1:<\/p>\n<pre>\r\nmodule load apps\/gcc\/cp2k\/4.1\r\n<\/pre>\n<p>Potentials and bases can then be found in the directory pointed to by $CP2K_DATA.<\/p>\n<p>For version 2.6.0:<\/p>\n<pre>\r\nmodule load apps\/binapps\/cp2k\/2.6.0\r\n<\/pre>\n<p>For version 2.5.1 on a single node jobs (2 to 24 cores)<\/p>\n<pre>\r\nmodule load apps\/intel-12.0\/cp2k\/popt\/2.5.1\r\n<\/pre>\n<p>For version 2.5.1 jobs requiring two or more compute nodes ( 48+ cores in multiples of 24)<\/p>\n<pre>\r\nmodule load apps\/intel-12.0\/cp2k\/popt\/2.5.1-ib\r\n<\/pre>\n<h2>Running the application &#8211; version 2.6.1<\/h2>\n<h3>Serial batch job submission<\/h3>\n<p>A serial version of CP2K has not been installed. CP2K should be run on 2 or more cores &#8211; see below.<\/p>\n<h3>Parallel batch job submission &#8211; 2 to 24 cores<\/h3>\n<p>This version will only run on 2 or more processors up to a maximum of 24.<\/p>\n<ol>\n<li>Load the appropriate modulefile<\/li>\n<li>Create a directory (preferably in scratch) for your job. <\/li>\n<li>Place all relevant files, e.g. input, in the directory.<\/li>\n<li>Create a job submission script\/textfile, e.g:\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n##Set current dir as the work directory\r\n#$ -cwd\r\n## Inherit login node including modulefile settings\r\n#$ -V\r\n## Submit to single node parallel environment and request up to 16 cores\r\n#$ -pe smp.pe 4\r\n\r\n## Run the executable specifying your input file. \r\n## The variable $NSLOTS automatically uses the no. of cores requested in the pe.\r\n\r\nexport OMP_NUM_THREADS=$NSLOTS\r\ncp2k.ssmp -i C.inp\r\n<\/pre>\n<\/li>\n<li>Submit the job with: <code>qsub scriptname<\/code> . Replacing &#8216;scriptname&#8217; with the name of your file.>\/li>\n<\/ol>\n<h2>Running the application &#8211; version 2.5.1 and 4.1 (multi-node)<\/h2>\n<p>Please do not run CP2K on the login node. Jobs should be submitted to the compute nodes via batch.<\/p>\n<h3>Serial batch job submission<\/h3>\n<p>A serial version of CP2K has not been installed. CP2K should be run on 2 or more cores &#8211; see below.<\/p>\n<h3>Parallel batch job submission &#8211; 2 to 24 cores<\/h3>\n<ol>\n<li>Load the appropriate modulefile<\/li>\n<li>Create a directory (preferably in scratch) for your job. <\/li>\n<li>Place all relevant files, e.g. input, in the directory.<\/li>\n<li>Create a job submission script\/textfile, e.g:\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n##Set current dir as the work directory\r\n#$ -cwd\r\n## Inherit login node including modulefile settings\r\n#$ -V\r\n## Submit to single node parallel environment and request up to 16 cores\r\n#$ -pe smp.pe 8\r\n\r\n## Run the executable specifying your input file. \r\n## The variable $NSLOTS automatically uses the no. of cores requested in the pe.\r\n\r\nmpirun -np $NSLOTS cp2k.popt -i H2O-32.inp\r\n<\/pre>\n<\/li>\n<li>Submit the job with: <code>qsub scriptname<\/code> . Replacing &#8216;scriptname&#8217; with the name of your file.>\/li>\n<\/ol>\n<h3><a id=\"parsub\">Parallel batch job submission &#8211; 48 or more cores in multiples of 24<\/a><\/h3>\n<ol>\n<li>You should have tested that your job scales well on 2-24 cores before using 48+<\/li>\n<li>Load the appropriate modulefile<\/li>\n<li>Create a directory (preferably in scratch) for your job. <\/li>\n<li>Place all relevant files, e.g. input, in the directory.<\/li>\n<li>Create a job submission script\/textfile, e.g:\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n##Set current dir as the work directory\r\n#$ -cwd\r\n## Inherit login node including modulefile settings\r\n#$ -V\r\n## Multi-node environment uses 48 cores or more and in multiples of 24\r\n#$ -pe orte-24-ib.pe 48\r\n\r\n## Run the executable specifying your input file. \r\n## The variable $NSLOTS automatically uses the no. of cores requested in the pe.\r\n\r\nmpirun -np $NSLOTS cp2k.popt -i H2O-32.inp\r\n<\/pre>\n<\/li>\n<li>Submit the job with: <code>qsub scriptname<\/code> . Replacing &#8216;scriptname&#8217; with the name of your file.<\/li>\n<\/ol>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.cp2k.org\/\">CP2K website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview CP2K is a program to perform atomistic and molecular simulations of solid state, liquid, molecular, and biological systems. It provides a general framework for different methods such as e.g., density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW) and classical pair and many-body potentials. Version 2.5.1 is installed on the CSF. It was compiled with Intel Compilers 12.0.5 &#038; MKL (with -msse4.1 and -axAVX) and support for MPI (no OpenMP)&#8230; <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/cp2k\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1756","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=1756"}],"version-history":[{"count":17,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1756\/revisions"}],"predecessor-version":[{"id":3695,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1756\/revisions\/3695"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=1756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}