[CP2K:7837] CP2K on intel xeon phi
Iain Bethune
ibet... at epcc.ed.ac.uk
Mon Jun 13 08:37:41 UTC 2016
Aman,
If you want to run in native mode on KNC you could use the attached arch file as a starting point. As Hans said, it’s basically a case of adding the -mmic flag to cross-compile for the KNC’s processors. As usual, when at the bleeding edge of ifort versions, there are a few files which need to be compiled at lower optimisation levels.
The main issue with CP2K on KNC is that in order to get good performance, you need to get close to 240 threads (hence why we use the MPI+OpenMP version of CP2K), but to find a problem where you can get good scaling to 240 threads, while still fitting in the KNC’s memory (6, 8 or 16 GB depending on the exact model) is hard.
There are some (slightly outdated now) performance results here http://www.prace-ri.eu/IMG/pdf/wp140.pdf
- Iain
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phi-intel-mic-16.0.2.psmp
Type: application/octet-stream
Size: 1652 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20160613/52a7f013/attachment.obj>
-------------- next part --------------
--
Iain Bethune
Project Manager, EPCC
Email: ibet... at epcc.ed.ac.uk
Twitter: @IainBethune @PrimeGrid @CP2Kproject
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Peter Guthrie Tait Road, Edinburgh, EH9 3FD
> On 10 Jun 2016, at 08:36, Hans Pabst <hf.p... at gmail.com> wrote:
>
> Dear Aman,
>
> I am assuming you are talking about Xeon Phi x100 family (KNC). To prepare an ARCH file for Xeon Phi "native" is about cross-compiling the code using the "-mmic" flag. I think there was some practical experience at EPCC / University of Edinburgh. On the other hand, there was also an attempt to fit into the offload infrastructure which is in place for GPGPU / ACC backend. This code did not make it into production, and it is hence stripped from the main branch. It is still present for the intel branch, but I have not put any more into it recently.
>
> If you are talking about Xeon Phi x200 family (KNL), this is a whole different story and it works nicely. Let me summarize the steps for KNL:
> • It works since CP2K 3.0 (released), and onward (CP2K 4.0-development) using when using the master/trunk.
> • git clone https://github.com/cp2k/cp2k.git cp2k.git (or from SourceForge via Subversion or download of the official release)
> • ln -s cp2k.git/cp2k cp2k
> • It works since pre-CP2K 3.0 and onward using the CP2K/intel branch.
> • git clone --branch intel https://github.com/cp2k/cp2k.git cp2k.git
> • ln -s cp2k.git/cp2k cp2k
> • I strongly suggest using to use LIBXSMM (although you can run LIBSMM which currently only supports up to AVX2)
> • git clone https://github.com/hfp/libxsmm.git
> • git checkout tags/1.4.3 (if you don't the master)
> • I suggest to use my outgrown ARCH file(s), but you can also build your own (minimal) ARCH file
> • My ARCH files work for CP2K 3.0, and development (regardless of whether it is on the master or intel branch)
> • For 3.0/master/trunk branch you have to download the following ARCH files into the arch folder:
> https://github.com/cp2k/cp2k/raw/intel/cp2k/arch/Linux-x86-64-intel.x
> https://github.com/cp2k/cp2k/raw/intel/cp2k/arch/Linux-x86-64-intel.{psmp,popt,sopt,ssmp}
> • Building CP2K
> • LIBXSMM is auto-detected if the "cp2k" folder (symlink) and "libxsmm" folder are located in parallel,
> if not: use LIBXSMMROOT=/path/to/libxsmm along with below make command.
> • source /opt/intel/compilers_and_libraries_2017.0.064/linux/bin/compilervars.sh intel64
> • make ARCH=Linux-x86-64-intel VERSION=psmp AVX=3 MIC=1
> • There are quite some additional key-value pairs supported:
> • LIBXSMM=2: intercepts all GEMM calls to go through LIBXSMM (gives some minor/additional performance)
> • SYM=1: add symbols "-g" (it also enables VTune support in LIBXSMM if Intel VTune is source'd)
> • DBG=1: enables unoptimized code along with symbols (not for production runs)
> • MKL=2: enables parallel MKL (default is sequential, but sequential should be fine)
> • I recommend to use LIBINT, LIBXC, and ELPA unless you know that your workload cannot benefit.
> If you want/need (optimal) recipes for these libraries, let me know.
> • LIBINTROOT=/path/to/libint
> • LIBXCROOT=/path/to/libxc
> • ELPAROOT=/path/to/elpa
>
> Hans
>
> Am Freitag, 3. Juni 2016 16:21:29 UTC+2 schrieb Aman Jindal:
> Dear Users,
> Has anyone of you tried installing cp2k on Intel xeonphi. if yes, which arch file should be used (with what modifications)?
> thanks in advance,
> Aman
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com.
> To post to this group, send email to cp... at googlegroups.com.
> Visit this group at https://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.
More information about the CP2K-user
mailing list