Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
documentation:tools:software:cp2k [2017/04/05 08:26] – cpetit | documentation:tools:software:cp2k [2021/06/22 08:24] (Version actuelle) – [CP2K] cicaluga | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
* 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. | * 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 | + | ^ Programme |
- | | cp2k.popt | + | | cp2k.popt |
- | | | **modulefile** : CP2K/ | + | | | **module à charger** : iomkl/2017.4-3.0.0 |
- | | | | | | | | | | + | | cp2k | |
- | | cp2k.sopt | + | | | **module à charger** : iomkl/2017.4-3.0.0 |||| |
- | | cp2k.popt | + | |
- | | cp2k.psmp | + | |
- | | | **modulefile** : CP2K/2.5.1 | + | |
- | | cp2k.popt | + | |
- | | | **modulefile** : CP2K/2.5.1-complete | + | |
- | | cp2k.popt | 2.5.1 | Intel 14.0.1 | + | |
- | | | **modulefile** : CP2K/ | + | |
Pour utiliser les modules, consulter [[documentation: | Pour utiliser les modules, consulter [[documentation: | ||
- | |||
- | ===== Doc users CP2K version > 3 ===== | ||
- | |||
- | Rush de build pour CP2K (version 3.x et sup.) | ||
- | |||
- | <code bash> | ||
- | export MKLROOT="/ | ||
- | module load openmpi/ | ||
- | |||
- | tar -xjvf cp2k-4.1.tar.bz2 | ||
- | cd cp2k-4.1/ | ||
- | |||
- | ./ | ||
- | </ | ||
- | |||
- | Now copy makefiles to arch dir : | ||
- | <code bash> | ||
- | cp cp2k-4.1/ | ||
- | </ | ||
- | |||
- | To build CP2K you must change directory: | ||
- | <code bash> | ||
- | cd ../ | ||
- | make -j 8 ARCH=local VERSION=sopt | ||
- | make -j 8 ARCH=local VERSION=popt | ||
- | </ | ||
- | |||
- | 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/ | ||
- | </ | ||
- | |||
- | '' | ||
- | |||
- | ===== Doc admin-sys PSMN ===== | ||
- | |||
- | ==== CP2K 2.5.1 + gcc 4.7.2 ==== | ||
- | |||
- | |||
- | * Makefile (patch from Debian) | ||
- | |||
- | <code diff Makefile1.patch> | ||
- | --- cp2k-orig/ | ||
- | +++ cp2k/ | ||
- | @@ -414,7 +414,7 @@ | ||
- | # | ||
- | | ||
- | -test -d $(TOOLDIR)/ | ||
- | - { cd makedepf90-build ; ./configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) ; $(MAKE) VERSION=" | ||
- | + { cd makedepf90-build ; CPPFLAGS= ./configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) ; $(MAKE) VERSION=" | ||
- | |||
- | # | ||
- | # the rule how to generate the .o from the .F | ||
- | </ | ||
- | |||
- | <code diff Makefile2.patch> | ||
- | --- cp2k-orig/ | ||
- | +++ cp2k/ | ||
- | @@ -394,7 +394,7 @@ | ||
- | +$(LD) $(LDFLAGS) -o $(CP2KSHELL) cp2k_shell.o $(ALL_LIB) $(LIBS) | ||
- | |||
- | | ||
- | - | ||
- | + | ||
- | |||
- | # Allow the standalone DBCSR programs to compile with CUDA and/or HWTOPO | ||
- | </ | ||
- | |||
- | * arch/ | ||
- | |||
- | <code make Linux-generic-gfortran.sopt> | ||
- | CC = gcc | ||
- | CPP = | ||
- | FC = gfortran | ||
- | LD = gfortran | ||
- | AR = ar -r | ||
- | |||
- | DFLAGS | ||
- | CPPFLAGS = -C -traditional $(DFLAGS) | ||
- | FCFLAGS | ||
- | LDFLAGS | ||
- | LIBS = -llapack -lblas -lfftw3 -lint -lderiv -lxc | ||
- | </ | ||
- | |||
- | * arch/ | ||
- | |||
- | <code make Linux-generic-gfortran.popt> | ||
- | CC = mpicc | ||
- | CPP = | ||
- | FC = mpif90 | ||
- | LD = gfortran | ||
- | AR = ar -r | ||
- | |||
- | DFLAGS | ||
- | CPPFLAGS = -C -traditional $(DFLAGS) | ||
- | FCFLAGS | ||
- | LDFLAGS | ||
- | LIBS = -llapack -lblas -lfftw3 -lint -lderiv -lxc -lmpi -lmpif90 -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK) | ||
- | </ | ||
- | |||
- | * arch/ | ||
- | |||
- | <code make Linux-generic-gfortran.psmp> | ||
- | CC = mpicc | ||
- | CPP = | ||
- | FC = mpif90 | ||
- | LD = gfortran | ||
- | AR = ar -r | ||
- | |||
- | DFLAGS | ||
- | CPPFLAGS = -C -traditional $(DFLAGS) | ||
- | FCFLAGS | ||
- | LDFLAGS | ||
- | LIBS = -llapack -lblas -lfftw3 -lfftw3_threads -lint -lderiv -lxc -lmpi -lmpif90 -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK) | ||
- | </ | ||
- | |||
- | * build | ||
- | |||
- | à faire dans l' | ||
- | |||
- | < | ||
- | > cd cp2k/ | ||
- | 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 | ||
- | </ | ||
- | |||
- | Les binaires seront dans cp2k/ | ||
- | |||
- | ====== 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' | ||
- | |||
- | ==== Environnement de travail ==== | ||
- | |||
- | Il faut d' | ||
- | |||
- | <code bash> | ||
- | $ source / | ||
- | $ source / | ||
- | $ module use / | ||
- | $ module load Base/psmn | ||
- | $ module load openmpi/ | ||
- | </ | ||
- | |||
- | ==== Download CP2K ==== | ||
- | |||
- | <code bash> | ||
- | $ svn checkout svn:// | ||
- | | ||
- | ... | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | <note important> | ||
- | ==== Etape de " | ||
- | |||
- | <code bash> | ||
- | $ cd cp2k-devel-cic/ | ||
- | </ | ||
- | |||
- | 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' | ||
- | |||
- | <code make> | ||
- | # Linux-x86-64-intel-MKL.popt | ||
- | # | ||
- | # | ||
- | CC = cc | ||
- | CPP = | ||
- | FC = mpif90 | ||
- | LD = mpif90 | ||
- | AR = ar -r | ||
- | |||
- | MKLROOT=/ | ||
- | INTEL_LIB = $(MKLROOT)/ | ||
- | LIBXC_DIR = / | ||
- | |||
- | CPPFLAGS = | ||
- | DFLAGS | ||
- | | ||
- | CFLAGS | ||
- | |||
- | FCFLAGS | ||
- | | ||
- | FCFLAGS2 | ||
- | | ||
- | FCFLAGS3 | ||
- | | ||
- | |||
- | LDFLAGS | ||
- | |||
- | LIBS = $(INTEL_LIB)/ | ||
- | -L${INTEL_LIB} -lmkl_blas95_lp64 \ | ||
- | -L${INTEL_LIB} -lmkl_lapack95_lp64 \ | ||
- | -Wl, | ||
- | $(INTEL_LIB)/ | ||
- | $(INTEL_LIB)/ | ||
- | $(INTEL_LIB)/ | ||
- | -lpthread -lm \ | ||
- | -L$(LIBXC_DIR)/ | ||
- | |||
- | |||
- | OBJECTS_ARCHITECTURE = machine_intel.o | ||
- | |||
- | graphcon.o: graphcon.F | ||
- | $(FC) -c $(FCFLAGS2) $< | ||
- | |||
- | qs_vxc_atom.o: | ||
- | $(FC) -c $(FCFLAGS2) $< | ||
- | </ | ||
- | |||
- | ==== Etape de " | ||
- | |||
- | <code bash> | ||
- | $ cd ../ | ||
- | $ make -j 4 ARCH=Linux-x86-64-intel-MKL VERSION=popt | ||
- | </ | ||
- | |||
- | Cette étape peut durer quelques dizaines de minutes (un café bien mérité est possible ...). | ||
- | |||
- | Le binaire est ainsi généré : $HOME/ | ||
==== Test de l' | ==== Test de l' | ||
Ligne 251: | 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> |
- | | + | |
- | $ 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 / | ||
+ | $ cd tests_cp2k_6.1/QS | ||
+ | $ mpirun -np 2 /applis/PSMN/debian9/ | ||
</ | </ | ||
- | (à completer " | + | Regarder par exemple le temps total (la 1ère ligne " |
- | + | ||
- | Regarder par exemple le temps total (la 1ère ligne " | + | |
- | ==== 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. | ||