Added qsmmp

This commit is contained in:
arcan1s 2013-09-14 23:24:47 +04:00
parent 03628c371c
commit 7937ce690b
7 changed files with 492 additions and 0 deletions

41
discover/PKGBUILD Normal file
View File

@ -0,0 +1,41 @@
# Maintainer: Evgeniy "arcanis" Alekseev <esalexeev@gmail.com>
pkgname=discover
pkgver=1554
pkgrel=1
pkgdesc="Contains a library and front-end program for retrieving information about a system's hardware."
arch=('i686' 'x86_64')
url="http://componentizedlinux.org/discover/"
license=('GPL')
depends=('curl' 'expat' 'check')
makedepends=('cmake' 'subversion')
_svntrunk="svn://anonscm.debian.org/svn/pkg-${pkgname}/${pkgname}/trunk/"
_svnmod=discover
build()
{
msg "Connecting to SVN server..."
if [ -d "${_svnmod}/.svn" ]; then
(cd ${_svnmod} && svn up -r ${pkgver})
else
svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
fi
msg "SVN checkout done or server timeout"
msg "Starting build..."
cd ${srcdir}/${pkgname}
./buildtools/setup
./configure --prefix=/usr --enable-static=no
# remove building docs
sed -i "s|buildtools doctools portability etc doc scripts|\
buildtools doctools portability etc scripts|g" Makefile
make
}
package()
{
msg "done"
cd ${srcdir}/${pkgname}
make DESTDIR=${pkgdir} install
}

51
qmmp-qsmmp-git/PKGBUILD Normal file
View File

@ -0,0 +1,51 @@
# Contributor: core <angrycore@gmail.com>
# Maintainer Evgeniy "arcanis" Alekseev <esalexeev@gmail.com>
pkgname=qmmp-qsmmp-git
_pkgname=qmmp-qsmmp
pkgver=20130914
pkgrel=2
pkgdesc="Amarok-like interface for qmmp. Git version."
arch=('i686' 'x86_64')
url="http://gitorious.org/qsmmp"
license=('GPL2')
depends=('qmmp' 'libqxt')
makedepends=('git')
install=${_pkgname}.install
source=(${_pkgname}.desktop)
md5sums=('c22490f772c753f2ed6e611317b8d8d4')
_gitroot="git://gitorious.org/qsmmp/qsmmp.git"
_gitname="qsmmp"
build()
{
cd ${srcdir}
msg "Connecting to GIT server..."
if [[ -d ${_gitname} ]]; then
cd ${_gitname} && git pull origin
msg "The local files are updated"
else
git clone ${_gitroot} ${_gitname}
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
rm -rf ${srcdir}/${_gitname}-build
cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build
msg "Checkout to qmmp-9999"
git checkout origin/qmmp-9999
msg "Fix bug with building"
git reset --hard 3a477c0
qmake-qt4 PREFIX=/usr -Wnone
make || return 1
}
package()
{
cd ${srcdir}/${_gitname}-build
make INSTALL_ROOT=${pkgdir} install || return 1
install -D -m644 ${srcdir}/${_pkgname}.desktop $pkgdir/usr/share/applications/${_pkgname}.desktop || return 1
}

View File

@ -0,0 +1,27 @@
[Desktop Entry]
X-Desktop-File-Install-Version=0.11
Name=Qmmp-qsmmp
Comment=Qt4-based Multimedia Player
Comment[ru]=Медиа-проигрыватель на базе Qt4
Comment[uk]=Медіа-програвач на базі Qt4
Comment[cs]=Přehrávač hudby založený na Qt
Comment[tr]=Qt4 tabanlı Çokluortam Oynatıcı
Comment[de]=Qt4-basierter Audio-Player
Comment[zh_CN]=Qt4
Comment[zh_TW]=Qt4
GenericName=Audio player
GenericName[cs]=Přehrávač hudby
GenericName[de]=Audio-Player
GenericName[ru]=Аудио-проигрыватель
GenericName[uk]=Медіа-програвач
GenericName[tr]=Ses Oynatıcı
GenericName[zh_CN]=
GenericName[zh_TW]=
Exec=qmmp-qsmmp %F
Icon=qmmp
Terminal=false
Type=Application
Categories=AudioVideo;Player;Audio;Qt;
MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-ms-wma;audio/x-musepack;application/ogg;audio/x-vorbis+ogg;audio/x-scpls;audio/x-mpegurl;audio/x-it;audio/x-mod;audio/x-ape;application/x-cue;inode/directory;
X-KDE-StartupNotify=false

View File

@ -0,0 +1,11 @@
post_install() {
which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install $1
}

View File

@ -0,0 +1,55 @@
# Maintainer: Evgeniy "arcanis" Alekseev <esalexeev@gmail.com>
pkgname=quantum-espresso-gpu-svn
pkgver=216
pkgrel=1
pkgdesc="Quantum ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. Version with GPU acceleration"
arch=('any')
url="http://qe-forge.org/gf/project/q-e-gpu/"
license=('GPLv2')
makedepends=('gcc-fortran' 'blas' 'lapack' 'fftw' 'cuda')
depends=('quantum-espresso')
source=(http://qe-forge.org/gf/download/frsrelease/142/452/QE-5.0.2_GPU-r${pkgver}.patch)
md5sums=('fc74bc210db6c2d88fd8a5f444aab447')
_qetrunk="http://qeforge.qe-forge.org/svn/q-e/trunk/espresso"
_qemod=espresso
_qerev=10452
_svntrunk="http://qeforge.qe-forge.org/svn/q-e-gpu/trunk/GPU"
_svnmod=GPU
build()
{
msg "Connecting to QE SVN server..."
if [ -d "${_qetrunk}/.svn" ]; then
(cd ${_qemod} && svn up -r ${_qerev})
else
svn co ${_qetrunk} -r ${_qerev} ${_qemod} --username=anonymous --password=""
fi
msg "Connecting to QE-GPU SVN server..."
if [ -d "${srcdir}/${_qemod}/${_svnmod}/.svn" ]; then
(cd ${srcdir}/${_qemod}/${_svnmod} && svn up -r ${pkgver})
else
svn co ${_svntrunk} -r ${pkgver} ${srcdir}/${_qemod}/${_svnmod} --username=anonymous --password=""
fi
# build qe
cd ${srcdir}/${_qemod}/
./configure
make all
# build qe-gpu
cd ${srcdir}/${_qemod}/${_svnmod}/
./configure --enable-cuda --with-gpu-arch=35 --with-cuda-dir=/opt/cuda \
--enable-magma --enable-parallel
cd ${srcdir}/${_qemod}/
sed -i "s/python/python2/g" Makefile.gpu
make -f Makefile.gpu all-gpu
}
package()
{
msg "done"
}

View File

@ -0,0 +1,42 @@
# Maintainer: Evgeniy "arcanis" Alekseev <esalexeev@gmail.com>
pkgname=quantum-espresso-gpu
pkgver=216
_qever=5.0.2
pkgrel=1
pkgdesc="Quantum ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. Version with GPU acceleration"
arch=('any')
url="http://qe-forge.org/gf/project/q-e-gpu/"
license=('GPLv2')
makedepends=('gcc-fortran' 'blas' 'lapack' 'fftw' 'cuda')
depends=('quantum-espresso')
source=(http://qe-forge.org/gf/download/frsrelease/135/453/QE-GPU-r${pkgver}.tar.gz
http://qe-forge.org/gf/download/frsrelease/116/403/espresso-${_qever}.tar.gz
http://qe-forge.org/gf/download/frsrelease/142/452/QE-5.0.2_GPU-r${pkgver}.patch)
md5sums=('8fdff7841ed54c6ff1a5f501d2b0ca8f'
'd8b0d7ac3ddbfe0a656ec1501a2a4688'
'fc74bc210db6c2d88fd8a5f444aab447')
build()
{
cd ${srcdir}/espresso-${_qever}
./configure
make all
if [ -d ${srcdir}/espresso-${_qever}/GPU ]; then
rm -rf ${srcdir}/espresso-${_qever}/GPU
fi
mv ${srcdir}/GPU ${srcdir}/espresso-${_qever}/GPU
cd ${srcdir}/espresso-${_qever}/GPU
./configure --enable-cuda --with-gpu-arch=35 --with-cuda-dir=/opt/cuda \
--enable-magma --enable-parallel
cd ${srcdir}/espresso-${_qever}/
sed -i "s/python/python2/g" Makefile.gpu
make -f Makefile.gpu all-gpu
}
package()
{
msg "done"
}

View File

@ -0,0 +1,265 @@
diff -uNr espresso-5.0.2/Modules/mp.f90 espresso-5.0.2-GPU/Modules/mp.f90
--- espresso-5.0.2/Modules/mp.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/Modules/mp.f90 2013-05-31 14:24:52.054367809 +0100
@@ -159,6 +159,10 @@
IF (ierr/=0) CALL mp_stop( 8006 )
# endif
+#if defined(__CUDA) || defined(__PHIGEMM )
+ CALL InitCudaEnv()
+#endif
+
RETURN
END SUBROUTINE mp_start
!
@@ -172,6 +176,10 @@
ierr = 0
taskid = 0
+#if defined(__CUDA) || defined(__PHIGEMM )
+ CALL CloseCudaEnv()
+#endif
+
#if defined __HPM
! terminate the IBM Harware performance monitor
diff -uNr espresso-5.0.2/PW/src/addusdens.f90 espresso-5.0.2-GPU/PW/src/addusdens.f90
--- espresso-5.0.2/PW/src/addusdens.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/addusdens.f90 2013-05-31 14:30:03.720305082 +0100
@@ -1,5 +1,5 @@
!
-! Copyright (C) 2001-2006 Quantum ESPRESSO group
+! Copyright (C) 2001-2013 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
@@ -24,7 +24,11 @@
IF ( tqr ) THEN
CALL addusdens_r(rho,.true.)
ELSE
+#if defined(__CUDA) && !defined(__DISABLE_CUDA_ADDUSDENS)
+ CALL addusdens_g_gpu(rho)
+#else
CALL addusdens_g(rho)
+#endif
END IF
!
RETURN
diff -uNr espresso-5.0.2/PW/src/cdiaghg.f90 espresso-5.0.2-GPU/PW/src/cdiaghg.f90
--- espresso-5.0.2/PW/src/cdiaghg.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/cdiaghg.f90 2013-05-31 14:29:38.584367860 +0100
@@ -1,5 +1,5 @@
!
-! Copyright (C) 2001-2006 Quantum ESPRESSO group
+! Copyright (C) 2001-2013 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
@@ -17,6 +17,33 @@
! ... Hv=eSv, with H hermitean matrix, S overlap matrix.
! ... On output both matrix are unchanged
!
+ USE kinds, ONLY : DP
+ !
+ IMPLICIT NONE
+ !
+ INTEGER, INTENT(IN) :: n, m, ldh
+ COMPLEX(DP), INTENT(INOUT) :: h(ldh,n), s(ldh,n)
+ REAL(DP), INTENT(OUT) :: e(n)
+ COMPLEX(DP), INTENT(OUT) :: v(ldh,m)
+ !
+#if defined(__CUDA) && defined(__MAGMA)
+ CALL cdiaghg_gpu( n, m, h, s, ldh, e, v )
+#else
+ CALL cdiaghg_compute( n, m, h, s, ldh, e, v )
+#endif
+ !
+ RETURN
+ !
+END SUBROUTINE cdiaghg
+
+!----------------------------------------------------------------------------
+SUBROUTINE cdiaghg_compute( n, m, h, s, ldh, e, v )
+ !----------------------------------------------------------------------------
+ !
+ ! ... calculates eigenvalues and eigenvectors of the generalized problem
+ ! ... Hv=eSv, with H hermitean matrix, S overlap matrix.
+ ! ... On output both matrix are unchanged
+ !
! ... LAPACK version - uses both ZHEGV and ZHEGVX
!
USE kinds, ONLY : DP
@@ -187,7 +214,7 @@
!
RETURN
!
-END SUBROUTINE cdiaghg
+END SUBROUTINE cdiaghg_compute
!
!----------------------------------------------------------------------------
SUBROUTINE pcdiaghg( n, h, s, ldh, e, v, desc )
diff -uNr espresso-5.0.2/PW/src/newd.f90 espresso-5.0.2-GPU/PW/src/newd.f90
--- espresso-5.0.2/PW/src/newd.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/newd.f90 2013-05-31 14:28:51.751391724 +0100
@@ -1,5 +1,5 @@
!
-! Copyright (C) 2001-2010 Quantum ESPRESSO group
+! Copyright (C) 2001-2013 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
@@ -10,12 +10,41 @@
CONTAINS
!---------------------------------------
+
SUBROUTINE newq(vr,deeq,skip_vltot)
!
! This routine computes the integral of the perturbed potential with
! the Q function
!
USE kinds, ONLY : DP
+ USE fft_base, ONLY : dfftp
+ USE ions_base, ONLY : nat
+ USE lsda_mod, ONLY : nspin
+ USE uspp_param, ONLY : nhm
+ !
+ IMPLICIT NONE
+ !
+ ! Input: potential , output: contribution to integral
+ REAL(kind=dp), intent(in) :: vr(dfftp%nnr,nspin)
+ REAL(kind=dp), intent(inout) :: deeq( nhm, nhm, nat, nspin )
+ LOGICAL, intent(in) :: skip_vltot
+ !
+#if defined(__CUDA) && !defined(__DISABLE_CUDA_NEWD)
+ CALL newq_compute_gpu(vr,deeq,skip_vltot)
+#else
+ CALL newq_compute(vr,deeq,skip_vltot)
+#endif
+ !
+ RETURN
+
+END SUBROUTINE newq
+
+SUBROUTINE newq_compute(vr,deeq,skip_vltot)
+ !
+ ! This routine computes the integral of the perturbed potential with
+ ! the Q function
+ !
+ USE kinds, ONLY : DP
USE ions_base, ONLY : nat, ntyp => nsp, ityp
USE cell_base, ONLY : omega
USE fft_base, ONLY : dfftp
@@ -176,7 +205,7 @@
!
DEALLOCATE( aux, qgm, qmod, ylmk0 )
!
-END SUBROUTINE newq
+END SUBROUTINE newq_compute
!---------------------------------------
SUBROUTINE newd()
USE uspp, ONLY : deeq
diff -uNr espresso-5.0.2/PW/src/pwscf.f90 espresso-5.0.2-GPU/PW/src/pwscf.f90
--- espresso-5.0.2/PW/src/pwscf.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/pwscf.f90 2013-05-31 14:25:31.013375854 +0100
@@ -36,13 +36,13 @@
!
CHARACTER(len=256) :: dirname
!
-#ifdef __MPI
- !
+
CALL mp_startup ( )
! reset IO nodes
! (do this to make each "image head node" an ionode)
! Has to be used ONLY to run nimage copies of pwscf
!
+#ifdef __MPI
IF ( nimage > 1 ) CALL io_image_start( )
#endif
CALL environment_start ( 'PWSCF' )
diff -uNr espresso-5.0.2/PW/src/rdiaghg.f90 espresso-5.0.2-GPU/PW/src/rdiaghg.f90
--- espresso-5.0.2/PW/src/rdiaghg.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/rdiaghg.f90 2013-05-31 14:27:59.078331418 +0100
@@ -1,5 +1,5 @@
!
-! Copyright (C) 2003-2006 Quantum ESPRESSO group
+! Copyright (C) 2003-2013 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
@@ -14,6 +14,33 @@
! ... Hv=eSv, with H symmetric matrix, S overlap matrix.
! ... On output both matrix are unchanged
!
+ USE kinds, ONLY : DP
+ !
+ IMPLICIT NONE
+ !
+ INTEGER, INTENT(IN) :: n, m, ldh
+ REAL(DP), INTENT(INOUT) :: h(ldh,n), s(ldh,n)
+ REAL(DP), INTENT(OUT) :: e(n)
+ REAL(DP), INTENT(OUT) :: v(ldh,m)
+ !
+#if defined(__CUDA) && defined(__MAGMA)
+ CALL rdiaghg_gpu( n, m, h, s, ldh, e, v )
+#else
+ CALL rdiaghg_compute( n, m, h, s, ldh, e, v )
+#endif
+ !
+ RETURN
+ !
+END SUBROUTINE rdiaghg
+
+!----------------------------------------------------------------------------
+SUBROUTINE rdiaghg_compute( n, m, h, s, ldh, e, v )
+ !----------------------------------------------------------------------------
+ !
+ ! ... calculates eigenvalues and eigenvectors of the generalized problem
+ ! ... Hv=eSv, with H symmetric matrix, S overlap matrix.
+ ! ... On output both matrix are unchanged
+ !
! ... LAPACK version - uses both DSYGV and DSYGVX
!
USE kinds, ONLY : DP
@@ -169,7 +196,7 @@
!
RETURN
!
-END SUBROUTINE rdiaghg
+END SUBROUTINE rdiaghg_compute
!
!----------------------------------------------------------------------------
SUBROUTINE prdiaghg( n, h, s, ldh, e, v, desc )
diff -uNr espresso-5.0.2/PW/src/vloc_psi.f90 espresso-5.0.2-GPU/PW/src/vloc_psi.f90
--- espresso-5.0.2/PW/src/vloc_psi.f90 2013-05-31 14:19:32.000000000 +0100
+++ espresso-5.0.2-GPU/PW/src/vloc_psi.f90 2013-05-31 14:27:27.759367967 +0100
@@ -1,5 +1,5 @@
!
-! Copyright (C) 2003-2009 PWSCF group
+! Copyright (C) 2003-2013 PWSCF group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
@@ -37,6 +37,10 @@
COMPLEX(DP), ALLOCATABLE :: tg_psic(:)
INTEGER :: v_siz, idx, ioff
!
+#if (defined(__CUDA) && !defined(__DISABLE_CUDA_VLOCPSI) && !defined(__PARA)) || (defined(__CUDA) && !defined(__DISABLE_CUDA_VLOCPSI) && defined(__PARA) && defined(__USE_3D_FFT))
+ CALL vloc_psi_gamma_gpu ( lda, n, m, psi, v, hpsi )
+ RETURN
+#endif
!
incr = 2
!
@@ -222,6 +226,10 @@
COMPLEX(DP), ALLOCATABLE :: tg_psic(:)
INTEGER :: v_siz, idx, ioff
!
+#if (defined(__CUDA) && !defined(__DISABLE_CUDA_VLOCPSI) && !defined(__PARA)) || (defined(__CUDA) && !defined(__DISABLE_CUDA_VLOCPSI) && defined(__PARA) && defined(__USE_3D_FFT))
+ CALL vloc_psi_k_gpu ( lda, n, m, psi, v, hpsi )
+ RETURN
+#endif
!
! The following is dirty trick to prevent usage of task groups if
! the number of bands is smaller than the number of task groups