xref: /petsc/config/BuildSystem/config/packages/SuperLU.py (revision 2b8d69ca7ea5fe9190df62c1dce3bbd66fce84dd)
1import config.package
2import os
3
4class Configure(config.package.CMakePackage):
5  def __init__(self, framework):
6    config.package.CMakePackage.__init__(self, framework)
7    self.gitcommit        = 'master'
8    # using fork of Sherry's branch to work around bug in handling of BLAS, pull request made
9    self.download         = ['git://https://github.com/petsc/superlu']
10#    self.download         = ['git://https://github.com/xiaoyeli/superlu']
11#    self.download         = ['git://https://bitbucket.org/petsc/pkg-superlu.git',
12#                             'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/superlu_5.1.tar.gz']
13    self.functions        = ['set_default_options']
14    self.includes         = ['slu_ddefs.h']
15    self.liblist          = [['libsuperlu.a']]
16    # SuperLU has NO support for 64 bit integers, use SuperLU_Dist if you need that
17    self.requires32bitint = 1;  # 1 means that the package will not work with 64 bit integers
18    self.excludedDirs     = ['SuperLU_DIST','SuperLU_MT']
19    # SuperLU does not work with --download-fblaslapack with Compaqf90 compiler on windows.
20    # However it should work with intel ifort.
21    self.downloadonWindows= 1
22    self.hastests         = 1
23    self.hastestsdatafiles= 1
24    return
25
26  def setupDependencies(self, framework):
27    config.package.CMakePackage.setupDependencies(self, framework)
28    self.blasLapack = self.framework.require('config.packages.BlasLapack',self)
29    self.deps       = [self.blasLapack]
30    return
31
32  def formCMakeConfigureArgs(self):
33    args = config.package.CMakePackage.formCMakeConfigureArgs(self)
34    args.append('-DUSE_XSDK_DEFAULTS=YES')
35
36    args.append('-DTPL_BLAS_LIBRARIES="'+self.libraries.toString(self.blasLapack.dlib)+'"')
37
38    #  Tests are broken on Apple since they depend on a shared library that is not resolved against BLAS
39    args.append('-Denable_tests=0')
40    #  CMake in SuperLU should set this; but like many other packages it does not
41    args.append('-DCMAKE_INSTALL_NAME_DIR:STRING="'+os.path.join(self.installDir,self.libdir)+'"')
42    return args
43
44