diff options
author | a.kudelin | 2019-04-29 21:07:27 +0300 |
---|---|---|
committer | a.kudelin | 2019-04-29 21:12:05 +0300 |
commit | b90b1ed4314605a10cbf19be73a652d20e9d569c (patch) | |
tree | 5bc3b43f44f55d211acbf18840a355e883f6359e | |
parent | 1e7710db90153c60362461c1baa39826da8c0fad (diff) | |
download | aur-b90b1ed4314605a10cbf19be73a652d20e9d569c.tar.gz |
Added MPI support and regtesting
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | basic.psmp (renamed from basic.ssmp) | 9 | ||||
-rw-r--r-- | cuda.psmp (renamed from basic_cuda.ssmp) | 7 | ||||
-rw-r--r-- | cuda_plumed.psmp (renamed from basic_cuda_plumed.ssmp) | 7 | ||||
-rw-r--r-- | plumed.psmp (renamed from basic_plumed.ssmp) | 9 |
6 files changed, 72 insertions, 57 deletions
@@ -1,7 +1,7 @@ pkgbase = cp2k - pkgdesc = A quantum chemistry and solid state physics software package for atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. + pkgdesc = A quantum chemistry and solid state physics software package pkgver = 6.1.0 - pkgrel = 2 + pkgrel = 3 url = https://www.cp2k.org arch = x86_64 license = GPL2 @@ -9,25 +9,28 @@ pkgbase = cp2k makedepends = gcc-fortran makedepends = python2 makedepends = make + makedepends = sed depends = lapack depends = blas depends = fftw depends = gcc-libs depends = glibc + depends = cp2k-data + depends = openmpi + depends = scalapack depends = libxc>=4.0.4 depends = libint>=1.1.4 optdepends = cuda: GPU calculations support - optdepends = plumed: enhanced sampling support + optdepends = plumed-mpi: enhanced sampling support source = https://github.com/cp2k/cp2k/archive/v6.1.0.tar.gz - source = basic.ssmp - source = basic_cuda.ssmp - source = basic_plumed.ssmp - source = basic_cuda_plumed.ssmp - sha256sums = d7dd5f164e1e51d2dcb8c7d927b99f6ac1d0f8de4a665bd9daee1a14864c30ae - sha256sums = dd91990853df6aa45719c6b991db19beb1a8dce556a25149e90bb562e7ba9ff9 - sha256sums = 961ff801e2f4de80faffb84b6c46a457f2c149f32d88daeda5afd992841741b0 - sha256sums = c30512606e0d3857cba7f29febebfc71ea6e658b56784ab5befb2aaeb2dfb006 - sha256sums = 39e3ef335cf51d4cfe436bd4cb1d21a4b9b33af3718bcaf737fbf307c85945fb + source = basic.psmp + source = cuda_plumed.psmp + source = cuda.psmp + source = plumed.psmp + sha256sums = f11714771bf7abf162559e7a7d0c9bb8d3bca7286e3381d2d0a586d51af316bb + sha256sums = 1c7ec39e9c6f8499ae52352a77dee36b7acd71aa9d5db6cfc7ecb4c430e410b6 + sha256sums = c44269f40c73f15061fd855412507b8d7c0b158ffb3ba6b9d498f67b68756e0c + sha256sums = e1310d0afecbaed27fb44ebd15000f1fd43ff1955241c2d21e7ed86a2c582541 pkgname = cp2k @@ -1,27 +1,28 @@ pkgname=cp2k pkgver=6.1.0 -pkgrel=2 -pkgdesc="A quantum chemistry and solid state physics software package for atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems." +pkgrel=3 +_arch="basic" +_version="psmp" +_buildmode=0 +_corenumber=$( grep -c ^processor /proc/cpuinfo ) +pkgdesc="A quantum chemistry and solid state physics software package" arch=("x86_64") url="https://www.cp2k.org" license=("GPL2") -depends=('lapack' 'blas' 'fftw' 'gcc-libs' 'glibc' - 'libxc>=4.0.4' 'libint>=1.1.4') -makedepends=('gcc' 'gcc-fortran' 'python2' 'make') +depends=('lapack' 'blas' 'fftw' 'gcc-libs' 'glibc' 'cp2k-data' + 'openmpi' 'scalapack' 'libxc>=4.0.4' 'libint>=1.1.4') +makedepends=('gcc' 'gcc-fortran' 'python2' 'make' 'sed') optdepends=('cuda: GPU calculations support' - 'plumed: enhanced sampling support') + 'plumed-mpi: enhanced sampling support') source=("https://github.com/cp2k/cp2k/archive/v${pkgver}.tar.gz" - "basic.ssmp" - "basic_cuda.ssmp" - "basic_plumed.ssmp" - "basic_cuda_plumed.ssmp") -sha256sums=('d7dd5f164e1e51d2dcb8c7d927b99f6ac1d0f8de4a665bd9daee1a14864c30ae' - 'dd91990853df6aa45719c6b991db19beb1a8dce556a25149e90bb562e7ba9ff9' - '961ff801e2f4de80faffb84b6c46a457f2c149f32d88daeda5afd992841741b0' - 'c30512606e0d3857cba7f29febebfc71ea6e658b56784ab5befb2aaeb2dfb006' - '39e3ef335cf51d4cfe436bd4cb1d21a4b9b33af3718bcaf737fbf307c85945fb') -_buildmode=0 -_version="basic" + "basic.${_version}" + "cuda_plumed.${_version}" + "cuda.${_version}" + "plumed.${_version}") +sha256sums=('f11714771bf7abf162559e7a7d0c9bb8d3bca7286e3381d2d0a586d51af316bb' + '1c7ec39e9c6f8499ae52352a77dee36b7acd71aa9d5db6cfc7ecb4c430e410b6' + 'c44269f40c73f15061fd855412507b8d7c0b158ffb3ba6b9d498f67b68756e0c' + 'e1310d0afecbaed27fb44ebd15000f1fd43ff1955241c2d21e7ed86a2c582541') if [ -d "/opt/cuda" ] then @@ -37,26 +38,28 @@ fi case $_buildmode in 0) - _version="basic" + _arch="basic" ;; 1) - _version="basic_cuda" + _arch="cuda" ;; 2) - _version="basic_plumed" + _arch="plumed" ;; 3) - _version="basic_cuda_plumed" + _arch="cuda_plumed" ;; esac prepare() { - cd $srcdir/$pkgname-$pkgver - - mv ../${_version}.ssmp arch/ + cd ${srcdir}/${pkgname}-${pkgver} + module load cuda + mv ../${_arch}.${_version} arch/ + # Changing the location of the data directory + sed -i 's#$(CP2KHOME)/data/#/usr/share/cp2k/data/#g' makefiles/Makefile # A fix for Kepler GPUs sed -i 's/P100/K20X/g' src/dbcsr/libsmm_acc/libcusmm/generate.py sed -i 's/largeDB(/largeDB1(/g' src/dbcsr/libsmm_acc/libcusmm/parameters_K20X.txt @@ -65,16 +68,21 @@ prepare() { } build() { - cd ${srcdir}/${pkgname}-${pkgver} + cd ${srcdir}/${pkgname}-${pkgver}/makefiles - cd makefiles - make ARCH=$_version VERSION=ssmp + make ARCH=${_arch} VERSION=${_version} +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver}/tools/regtesting + ./do_regtest -cp2kdir ../.. -nosvn -version ${_version} -arch ${_arch} -nobuild -maxtasks ${_corenumber} + msg2 "A few non-critical tests may fail" } package() { - cd ${srcdir}/${pkgname}-${pkgver}/exe/$_version + cd ${srcdir}/${pkgname}-${pkgver}/exe/$_arch - install -Dm755 cp2k.ssmp ${pkgdir}/usr/bin/cp2k - install -Dm755 cp2k_shell.ssmp ${pkgdir}/usr/bin/cp2k-shell - install -Dm755 graph.ssmp ${pkgdir}/usr/bin/cp2k-graph + install -Dm755 cp2k.${_version} ${pkgdir}/usr/bin/cp2k + install -Dm755 cp2k_shell.${_version} ${pkgdir}/usr/bin/cp2k-shell + install -Dm755 graph.${_version} ${pkgdir}/usr/bin/cp2k-graph } diff --git a/basic.ssmp b/basic.psmp index 17463a824ca0..ccca95a4b4f6 100644 --- a/basic.ssmp +++ b/basic.psmp @@ -1,14 +1,14 @@ CC = gcc CXX = g++ CPP = -FC = gfortran -LD = gfortran -NVCC = nvcc +FC = mpifort +LD = mpifort # AR = ar -r # DFLAGS = -D__FFTW3 \ -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__MAX_CONTR=4 \ + -D__parallel -D__SCALAPACK \ -D__LIBXC # INCS = -I/usr/include @@ -22,8 +22,9 @@ FCFLAGS = $(DFLAGS) $(INCS) $(OPTFLAGS) -ffree-form -ffree-line-length-none # LDFLAGS = $(FCFLAGS) # -LIBS = -lblas -llapack \ +LIBS = -lscalapack -lblas -llapack \ -lfftw3 -lfftw3_threads \ /usr/lib/libderiv.a \ /usr/lib/libint.a \ + -lxcf03 -lxc \ -lstdc++ -lpthread -lm -ldl -lz diff --git a/basic_cuda.ssmp b/cuda.psmp index 5c02a9600983..8746c384c1c2 100644 --- a/basic_cuda.ssmp +++ b/cuda.psmp @@ -1,8 +1,8 @@ CC = gcc CXX = g++ CPP = -FC = gfortran -LD = gfortran +FC = mpifort +LD = mpifort NVCC = nvcc # GPUVER = K20X @@ -11,6 +11,7 @@ AR = ar -r # DFLAGS = -D__FFTW3 \ -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__MAX_CONTR=4 \ + -D__parallel -D__SCALAPACK \ -D__LIBXC \ -D__ACC -D__DBCSR_ACC -D__PW_CUDA # @@ -40,7 +41,7 @@ NVFLAGS = $(DFLAGS) -O3 -Xcompiler="-fopenmp" LDFLAGS = $(FCFLAGS) # LIBS = -L/opt/cuda/lib64 -lcudart -lcublas -lcufft -lrt -lnvrtc \ - -lblas -llapack \ + -lscalapack -lblas -llapack \ -lfftw3 -lfftw3_threads \ /usr/lib/libderiv.a \ /usr/lib/libint.a \ diff --git a/basic_cuda_plumed.ssmp b/cuda_plumed.psmp index ad24e65ee874..e111911e55a7 100644 --- a/basic_cuda_plumed.ssmp +++ b/cuda_plumed.psmp @@ -1,8 +1,8 @@ CC = gcc CXX = g++ CPP = -FC = gfortran -LD = gfortran +FC = mpifort +LD = mpifort NVCC = nvcc # GPUVER = K20X @@ -11,6 +11,7 @@ AR = ar -r # DFLAGS = -D__FFTW3 \ -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__MAX_CONTR=4 \ + -D__parallel -D__SCALAPACK \ -D__LIBXC \ -D__ACC -D__DBCSR_ACC -D__PW_CUDA \ -D__PLUMED2 @@ -41,7 +42,7 @@ NVFLAGS = $(DFLAGS) -O3 -Xcompiler="-fopenmp" LDFLAGS = $(FCFLAGS) # LIBS = -L/opt/cuda/lib64 -lcudart -lcublas -lcufft -lrt -lnvrtc \ - -lblas -llapack \ + -lscalapack -lblas -llapack \ -lfftw3 -lfftw3_threads \ /usr/lib/libderiv.a \ /usr/lib/libint.a \ diff --git a/basic_plumed.ssmp b/plumed.psmp index 7efe698ff2bd..5ddc6300a79d 100644 --- a/basic_plumed.ssmp +++ b/plumed.psmp @@ -1,14 +1,14 @@ CC = gcc CXX = g++ CPP = -FC = gfortran -LD = gfortran -NVCC = nvcc +FC = mpifort +LD = mpifort # AR = ar -r # DFLAGS = -D__FFTW3 \ -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__MAX_CONTR=4 \ + -D__parallel -D__SCALAPACK \ -D__LIBXC \ -D__PLUMED2 # @@ -23,10 +23,11 @@ FCFLAGS = $(DFLAGS) $(INCS) $(OPTFLAGS) -ffree-form -ffree-line-length-none # LDFLAGS = $(FCFLAGS) # -LIBS = -lblas -llapack \ +LIBS = -lscalapack -lblas -llapack \ -lfftw3 -lfftw3_threads \ /usr/lib/libderiv.a \ /usr/lib/libint.a \ + -lxcf03 -lxc \ -lplumed \ -lstdc++ -lpthread -lm -ldl -lz # |