Merge pull request #1565 from adamjstewart/features/fftw

Add latest version of fftw
This commit is contained in:
Todd Gamblin 2016-08-24 08:49:00 -07:00 committed by GitHub
commit 5cfa74801f
2 changed files with 18 additions and 10 deletions

View File

@ -22,8 +22,6 @@
# License along with this program; if not, write to the Free Software # License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
@ -33,12 +31,12 @@ class Fftw(Package):
size, and of both real and complex data (as well as of even/odd size, and of both real and complex data (as well as of even/odd
data, i.e. the discrete cosine/sine transforms or DCT/DST). We data, i.e. the discrete cosine/sine transforms or DCT/DST). We
believe that FFTW, which is free software, should become the FFT believe that FFTW, which is free software, should become the FFT
library of choice for most applications. library of choice for most applications."""
"""
homepage = "http://www.fftw.org" homepage = "http://www.fftw.org"
url = "http://www.fftw.org/fftw-3.3.4.tar.gz" url = "http://www.fftw.org/fftw-3.3.4.tar.gz"
version('3.3.5', '6cc08a3b9c7ee06fdd5b9eb02e06f569')
version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3') version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3')
variant( variant(
@ -60,10 +58,13 @@ class Fftw(Package):
# targets are supported # targets are supported
def install(self, spec, prefix): def install(self, spec, prefix):
options = ['--prefix=%s' % prefix, options = [
'--enable-shared', '--prefix={0}'.format(prefix),
'--enable-threads'] '--enable-shared',
# Add support for OpenMP '--enable-threads'
]
# Add support for OpenMP
if '+openmp' in spec: if '+openmp' in spec:
# Note: Apple's Clang does not support OpenMP. # Note: Apple's Clang does not support OpenMP.
if spec.satisfies('%clang'): if spec.satisfies('%clang'):
@ -78,17 +79,25 @@ def install(self, spec, prefix):
configure(*options) configure(*options)
make() make()
if self.run_tests:
make("check")
make("install") make("install")
if '+float' in spec: if '+float' in spec:
configure('--enable-float', *options) configure('--enable-float', *options)
make() make()
if self.run_tests:
make("check")
make("install") make("install")
if '+long_double' in spec: if '+long_double' in spec:
configure('--enable-long-double', *options) configure('--enable-long-double', *options)
make() make()
if self.run_tests:
make("check")
make("install") make("install")
if '+quad' in spec: if '+quad' in spec:
configure('--enable-quad-precision', *options) configure('--enable-quad-precision', *options)
make() make()
if self.run_tests:
make("check")
make("install") make("install")

View File

@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software # License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
@ -57,7 +56,7 @@ class Gromacs(Package):
depends_on('plumed+mpi', when='+plumed+mpi') depends_on('plumed+mpi', when='+plumed+mpi')
depends_on('plumed~mpi', when='+plumed~mpi') depends_on('plumed~mpi', when='+plumed~mpi')
depends_on('fftw') depends_on('fftw')
depends_on('cmake', type='build') depends_on('cmake@2.8.8:', type='build')
# TODO : add GPU support # TODO : add GPU support