Reworking of lapack_shared_libs and similar properties (#1682)

* Turned <provider>_libs into an iterable

Modifications :
- added class LibraryList + unit tests
- added convenience functions `find_libraries` and `dedupe`
- modifed non Intel blas/lapack providers
- modified packages using blas_shared_libs and similar functions

* atlas : added pthread variant

* intel packages : added lapack_libs and blas_libs

* find_library_path : removed unused function

* PR review : fixed last issues

* LibraryList : added test on __add__ return type

* LibraryList : added __radd__ fixed unit tests

fix : failing unit tests due to missing `self`

* cp2k and dependecies : fixed blas-lapack related statements in package.py
This commit is contained in:
Massimiliano Culpo
2016-09-21 21:27:59 +02:00
committed by Todd Gamblin
parent 6b6f868f2a
commit d848559f70
33 changed files with 526 additions and 244 deletions

View File

@@ -66,6 +66,9 @@ class Nwchem(Package):
patch('Gcc6_macs_optfix.patch', when='@6.6', level=0)
def install(self, spec, prefix):
scalapack = spec['scalapack'].scalapack_libs
lapack = spec['lapack'].lapack_libs
blas = spec['blas'].blas_libs
# see http://www.nwchem-sw.org/index.php/Compiling_NWChem
args = []
args.extend([
@@ -79,13 +82,11 @@ def install(self, spec, prefix):
'USE_PYTHONCONFIG=y',
'PYTHONVERSION=%s' % spec['python'].version.up_to(2),
'PYTHONHOME=%s' % spec['python'].prefix,
'BLASOPT=%s %s' % (
to_link_flags(spec['lapack'].lapack_shared_lib),
to_link_flags(spec['blas'].blas_shared_lib)),
'BLAS_LIB=%s' % to_link_flags(spec['blas'].blas_shared_lib),
'LAPACK_LIB=%s' % to_link_flags(spec['lapack'].lapack_shared_lib),
'BLASOPT=%s' % ((lapack + blas).ld_flags),
'BLAS_LIB=%s' % blas.ld_flags,
'LAPACK_LIB=%s' % lapack.ld_flags,
'USE_SCALAPACK=y',
'SCALAPACK=%s' % spec['scalapack'].fc_link,
'SCALAPACK=%s' % scalapack.ld_flags,
'NWCHEM_MODULES=all python',
'NWCHEM_LONG_PATHS=Y' # by default NWCHEM_TOP is 64 char max
])