Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
documentation:tools:software:cp2k [2018/02/27 10:07] – [CP2K] ltaulelldocumentation:tools:software:cp2k [2021/06/22 08:24] (Version actuelle) – [CP2K] cicaluga
Ligne 1: Ligne 1:
 ====== CP2K ====== ====== CP2K ======
 +   * a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems.
  
-<note warning>update needed</note>+^  Programme  ^  Version  ^  Compilateur  ^  chemin d'accès  ^  OS Processeur  ^  
 +|  cp2k.popt  |  6.1  |  openmpi-3.0.0     /applis/PSMN/debian9/software/Local/CP2K/6.1/exe/local/ |  Debian9 x86_64  |   
 +| | **module à charger** : iomkl/2017.4-3.0.0  |||| 
 +|  cp2k  |  8.1  |  openmpi-3.0.0  | /applis/PSMN/debian9/software/Local/CP2K/8.1/exe/local/ |  Debian9 x86_64  |   
 +| | **module à charger** : iomkl/2017.4-3.0.0 ||||
  
-   * a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. 
- 
-^  Programme  ^  Version  ^  Compilateur  ^  Interconnexion  ^  chemin d'accès  ^  OS / Processeur  ^  modèle de configuration  ^ 
-|  cp2k.popt  |  2.2.426  |  gcc 4.6.3  |  openmpi-1.4.5  |  /usr/bin/cp2k.popt  |  Debian7 x86_64  |  set_debian7-clean  | 
-| | **modulefile** : CP2K/2.2.426  |||| 
-| | | | | | | | 
-|  cp2k.sopt  |  2.5.1  |  gcc 4.7.2  |  openmpi-1.4.5  |  /applis/PSMN/debian7/CP2K/2.5.1/gnu-4.7.2/bin/  |  Debian7 x86_64  |  set_debian7-clean  | 
-|  cp2k.popt  |  2.5.1  |  gcc 4.7.2  |  openmpi-1.4.5  |  /applis/PSMN/debian7/CP2K/2.5.1/gnu-4.7.2/bin/  |  Debian7 x86_64  |  set_debian7-clean  | 
-|  cp2k.psmp  |  2.5.1  |  gcc 4.7.2  |  openmpi-1.4.5  |  /applis/PSMN/debian7/CP2K/2.5.1/gnu-4.7.2/bin/  |  Debian7 x86_64  |  set_debian7-clean  | 
-| | **modulefile** : CP2K/2.5.1  |||| 
-|  cp2k.popt  |  2.5.1  |  Intel 14.0.1  |  openmpi-1.6.4  |  /applis/PSMN/debian7/CP2K/2.5.1/intel-14.0.1/complete-elpa/  |  Debian7 E5-2670  |  N/A  | 
-| | **modulefile** : CP2K/2.5.1-complete  |||| 
-|  cp2k.popt  |  2.5.1  |  Intel 14.0.1  |  openmpi-1.6.4  |  /applis/PSMN/debian7/CP2K/2.5.1/intel-14.0.1/minimal-elpa/  |  Debian7 E5-2670  |  N/A  | 
-| | **modulefile** : CP2K/2.5.1-minimal  |||| 
  
  
 Pour utiliser les modules, consulter [[documentation:tools:modules|Environment Modules]] Pour utiliser les modules, consulter [[documentation:tools:modules|Environment Modules]]
- 
-===== Doc users CP2K version > 3 ===== 
- 
-Rush de build pour CP2K (version 3.x et sup.)  
- 
-<code bash> 
-export MKLROOT="/applis/PSMN/compil/intel/v15/mkl" 
-module load openmpi/2.0.1-gnu-5.4.0 
- 
-tar -xjvf cp2k-4.1.tar.bz2 
-cd cp2k-4.1/tools/toolchain/ 
- 
-./install_cp2k_toolchain.sh --with-mkl=/applis/PSMN/compil/intel/v15/mkl 
-</code> 
- 
-Now copy makefiles to arch dir : 
-<code bash> 
-cp cp2k-4.1/tools/toolchain/install/arch/local.*opt ../../arch/ 
-</code> 
- 
-To build CP2K you must change directory: 
-<code bash> 
-cd ../../makefiles/ 
-make -j 8 ARCH=local VERSION=sopt 
-make -j 8 ARCH=local VERSION=popt 
-</code> 
- 
-Do **NOT** build several versions at the same time. Known to be buggy. 
- 
-To use the installed tools, libraries and cp2k version(s) compiled with it you will first need to execute at the prompt every time you want to use cp2k: 
-<code bash> 
-source cp2k-4.1/tools/toolchain/install/setup 
-</code> 
- 
-''cp2k.sopt'' and ''cp2k.popt'' are available in your ''$PATH''. 
- 
-===== Doc admin-sys PSMN ===== 
- 
-==== CP2K 2.5.1 + gcc 4.7.2 ==== 
- 
- 
-  * Makefile (patch from Debian) 
- 
-<code diff Makefile1.patch> 
---- cp2k-orig/makefiles/Makefile 
-+++ cp2k/makefiles/Makefile 
-@@ -414,7 +414,7 @@ 
- # 
- makedepf90: 
-        -test -d $(TOOLDIR)/makedepf90-build || ( mkdir makedepf90-build ; cp $(TOOLSRC)/makedepf90/* makedepf90-build ) 
--       { cd makedepf90-build ; ./configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) ; $(MAKE) VERSION="2.8.8cp2k" ; $(MAKE) install ; } 
-+       { cd makedepf90-build ; CPPFLAGS= ./configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) ; $(MAKE) VERSION="2.8.8cp2k" ; $(MAKE) install ; } 
-  
- # 
- # the rule how to generate the .o from the .F 
-</code> 
- 
-<code diff Makefile2.patch> 
---- cp2k-orig/makefiles/Makefile  2014-02-28 13:07:47.203872318 +0100 
-+++ cp2k/makefiles/Makefile       2014-02-28 13:08:10.095990024 +0100 
-@@ -394,7 +394,7 @@ 
-        +$(LD) $(LDFLAGS) -o $(CP2KSHELL) cp2k_shell.o $(ALL_LIB) $(LIBS) 
-  
- $(FES): $(FESOBJS) graph.o  
--       +$(LD) $(LDFLAGS) -o $(FES) graph.o $(FESOBJS) 
-+       +$(LD) $(LDFLAGS) -o $(FES) graph.o $(FESOBJS) $(ALL_LIB) $(LIBS) 
-  
- # Allow the standalone DBCSR programs to compile with CUDA and/or HWTOPO 
-</code> 
- 
-  * arch/Linux-generic-gfortran.sopt (new file from Debian) 
- 
-<code make Linux-generic-gfortran.sopt> 
-CC         = gcc 
-CPP        = 
-FC         = gfortran 
-LD         = gfortran 
-AR         = ar -r 
- 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 $(FFTW3_ALIGN) -D__LIBINT -D__LIBXC2 
-CPPFLAGS = -C -traditional $(DFLAGS) 
-FCFLAGS  = -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-none $(DFLAGS) 
-LDFLAGS  = $(FCFLAGS)  
-LIBS     = -llapack -lblas -lfftw3 -lint -lderiv -lxc 
-</code> 
- 
-  * arch/Linux-generic-gfortran.popt (new file from Debian) 
- 
-<code make Linux-generic-gfortran.popt> 
-CC         = mpicc 
-CPP        = 
-FC         = mpif90 
-LD         = gfortran 
-AR         = ar -r 
- 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 $(FFTW3_ALIGN) -D__LIBINT -D__LIBXC2 -D__parallel -D__BLACS -D__SCALAPACK 
-CPPFLAGS = -C -traditional $(DFLAGS) 
-FCFLAGS  = -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-none $(DFLAGS) 
-LDFLAGS  = $(FCFLAGS) $(LIB_BLACS) $(LIB_SCALAPACK)  
-LIBS     = -llapack -lblas -lfftw3 -lint -lderiv -lxc -lmpi -lmpif90 -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK) 
-</code> 
- 
-  * arch/Linux-generic-gfortran.psmp (new file from Debian) 
- 
-<code make Linux-generic-gfortran.psmp> 
-CC         = mpicc 
-CPP        = 
-FC         = mpif90 
-LD         = gfortran 
-AR         = ar -r 
- 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 $(FFTW3_ALIGN) -D__LIBINT -D__LIBXC2 -D__parallel -D__BLACS -D__SCALAPACK 
-CPPFLAGS = -C -traditional $(DFLAGS) 
-FCFLAGS  = -g -Wall -O2 -fopenmp -ffast-math -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-none $(DFLAGS) 
-LDFLAGS  = $(FCFLAGS) $(LIB_BLACS) $(LIB_SCALAPACK)  
-LIBS     = -llapack -lblas -lfftw3 -lfftw3_threads -lint -lderiv -lxc -lmpi -lmpif90 -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK) 
-</code> 
- 
-  * build 
- 
-à faire dans l'ordre (sopt, puis popt, puis psmp) de l'étape ''3a'' du fichier ''INSTALL'' 
- 
-<code> 
-> cd cp2k/makefiles 
-make -j 8 ARCH=Linux-generic-gfortran VERSION=sopt 
-make -j 8 ARCH=Linux-generic-gfortran VERSION=popt 
-make -j 8 ARCH=Linux-generic-gfortran VERSION=psmp 
-</code> 
- 
-Les binaires seront dans cp2k/exe/$ARCH/cp2k.$VERSION. Ils sont semi-statique (ie: tant qu'on change pas de plateforme, on peut les placer où on veut). 
- 
-====== Installations optimisées de CP2K ====== 
- 
-{{INLINETOC}} 
-===== Version la plus récénte compilée avec compilateurs Intel et MKL sur les systèmes Debian ===== 
- 
-Il s'agit de la version du dépôt de développement CP2K (la plus complète au niveau des fonctionnalités).  
- 
-L'installation ci-dessous a été faite à l'automne 2014 (sur la dernière révision du CP2K et avec les dernières versions de la suite Intel et OpenMPI disponibles à ce moment là). 
- 
-==== Environnement de travail ==== 
- 
-Il faut d'abord charger l'environnement correspondant (Debian + Intel + OpenMPI) sur l'un des serveurs de compilation Debian : 
- 
-<code bash>  
-   $ source /usr/local/modeles/set_debian7-clean.csh 
-   $ source /usr/share/modules/init/tcsh 
-   $ module use /applis/PSMN/Modules 
-   $ module load Base/psmn 
-   $ module load openmpi/1.6.4-intel-14.0.1 
-</code> 
- 
-==== Download CP2K ==== 
- 
-<code bash>  
-   $ svn checkout svn://svn.code.sf.net/p/cp2k/code/trunk cp2k-devel-cic 
-      cp2k-devel-cic/basis_sets 
-   ... 
-      cp2k-devel-cic/potentials/mm_potentials/mathematica/FitPot.nb 
-   Révision 14631 extraite. 
-</code> 
- 
-<note important>NEW (15 juin 2015) : La révision 15430 a été testée et fonctionne de la même façon.</note> 
-==== Etape de "configuration" ==== 
- 
-<code bash>  
-   $ cd cp2k-devel-cic/cp2k/arch 
-</code> 
- 
-Créer le fichier de configuration Linux-x86-64-intel-MKL.popt comme suit, afin de prendre correctement en compte les composantes BLAS, LAPACK et FFT de MKL (avec l'interface FFTw) :  
- 
-<code make>  
-# Linux-x86-64-intel-MKL.popt 
-# 
-# 
-CC       = cc 
-CPP      =  
-FC       = mpif90  
-LD       = mpif90 
-AR       = ar -r 
- 
-MKLROOT=/softs/intel/v13/mkl 
-INTEL_LIB = $(MKLROOT)/lib/intel64 
-LIBXC_DIR = /applis/PSMN/debian7/Libs/libXC/2.0.1/intel-14.0.1-avx 
- 
-CPPFLAGS = 
-DFLAGS   = -D__MKL -D__FFTW3 -D__LIBXC2 -D__parallel \ 
-    -D__SCALAPACK  
-CFLAGS   = $(DFLAGS)  
- 
-FCFLAGS  = $(DFLAGS) -O2 -g -traceback -fpp -free \ 
-           -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw 
-FCFLAGS2  = $(DFLAGS) -O1 -g -traceback -fpp -free \ 
-           -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw 
-FCFLAGS3  = $(DFLAGS) -O0 -g -traceback -fpp -free \ 
-           -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw 
- 
-LDFLAGS  = $(FCFLAGS) -static-intel 
- 
-LIBS     = $(INTEL_LIB)/libmkl_scalapack_lp64.a \ 
-          -L${INTEL_LIB} -lmkl_blas95_lp64 \ 
-          -L${INTEL_LIB} -lmkl_lapack95_lp64 \ 
- -Wl,--start-group  $(INTEL_LIB)/libmkl_intel_lp64.a \ 
- $(INTEL_LIB)/libmkl_sequential.a \ 
- $(INTEL_LIB)/libmkl_core.a \ 
- $(INTEL_LIB)/libmkl_blacs_openmpi_lp64.a -Wl,--end-group \ 
- -lpthread -lm \ 
- -L$(LIBXC_DIR)/lib -lxc \ 
- 
- 
-OBJECTS_ARCHITECTURE = machine_intel.o 
- 
-graphcon.o: graphcon.F 
- $(FC) -c $(FCFLAGS2) $< 
- 
-qs_vxc_atom.o: qs_vxc_atom.F 
- $(FC) -c $(FCFLAGS2) $<    
-</code> 
- 
-==== Etape de "build" ==== 
- 
-<code bash>  
-   $ cd ../makefiles 
-   $ make -j 4 ARCH=Linux-x86-64-intel-MKL VERSION=popt 
-</code> 
- 
-Cette étape peut durer quelques dizaines de minutes (un café bien mérité est possible ...). 
- 
-Le binaire est ainsi généré : $HOME/cp2k-devel-cic/cp2k/exe/Linux-x86-64-intel-MKL/cp2k.popt 
  
 ==== Test de l'installation ==== ==== Test de l'installation ====
Ligne 254: Ligne 16:
 On peut lancer un test rapide fourni dans CP2K directement sur le serveur de compilation : On peut lancer un test rapide fourni dans CP2K directement sur le serveur de compilation :
  
-<code bash>  +<code bash> 
-   cd ../tests/QS/ +   module load iomkl/2017.4-3.0.0  
-   $ mpirun -np 2 $HOME/.../cp2k-devel-cic/cp2k/exe/Linux-x86-64-intel-MKL/cp2k.popt C.inp+   $ mkdir tests_cp2k_6.1  
 +   $ cp -a /applis/PSMN/debian9/software/Local/CP2K/6.1/tests/QS tests_cp2k_6.1 
 +   $ cd tests_cp2k_6.1/QS 
 +   $ mpirun -np 2 /applis/PSMN/debian9/software/Local/CP2K/6.1/exe/local/cp2k.popt C.inp
 </code> </code>
  
-(à completer "..." pour avoir le chemin exact où cette compilation a été faite) +Regarder par exemple le temps total (la 1ère ligne "CP2K") dans le tableau TIMING (3.380 s pour la présente compilation) 
- +
-Regarder par exemple le temps total (la 1ère ligne "CP2K") dans le tableau TIMING (2.928 s pour la présente compilation)  +
-==== Test en conditions de production ====+
  
-Plusieurs jobs ont été exécutés sur des configurations fournies par des utilisateurs PSMN en utilisant les queues de production E5-2670. Les résultats ont montré un gain du temps de calcul par un facteur entre 5 et 6 par rapport aux installations génériques.  
  
  
documentation/tools/software/cp2k.1519726068.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)