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 [2020/06/17 09:05] – cicaluga | documentation:tools:software:cp2k [2025/03/12 14:19] (Version actuelle) – supprimée ltaulell | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== CP2K ====== | ||
| - | |||
| - | <note warning> | ||
| - | |||
| - | * 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 | ||
| - | | cp2k.popt | ||
| - | | | **modulefile** : iomkl/ | ||
| - | | | | | | | | | | ||
| - | |||
| - | |||
| - | 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 ====== | ||
| - | |||
| - | ===== 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' | ||
| - | |||
| - | On peut lancer un test rapide fourni dans CP2K directement sur le serveur de compilation : | ||
| - | |||
| - | <code bash> | ||
| - | $ cd ../ | ||
| - | $ mpirun -np 2 $HOME/ | ||
| - | </ | ||
| - | |||
| - | (à completer " | ||
| - | |||
| - | 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. | ||
| - | |||
| - | |||
| - | ===== Site officiel ===== | ||
| - | * https:// | ||
| - | |||