Merge pull request #414 from epfl-scitas/issues/trilinos_385
fix : trilinos and dependencies
This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| from spack import * | from spack import * | ||||||
|  |  | ||||||
|  |  | ||||||
| class Netcdf(Package): | class Netcdf(Package): | ||||||
|     """NetCDF is a set of software libraries and self-describing, machine-independent |     """NetCDF is a set of software libraries and self-describing, machine-independent | ||||||
|     data formats that support the creation, access, and sharing of array-oriented |     data formats that support the creation, access, and sharing of array-oriented | ||||||
| @@ -11,13 +12,15 @@ class Netcdf(Package): | |||||||
|     version('4.4.0', 'f01cb26a0126dd9a6224e76472d25f6c') |     version('4.4.0', 'f01cb26a0126dd9a6224e76472d25f6c') | ||||||
|     version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') |     version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') | ||||||
|  |  | ||||||
|  |     variant('mpi', default=True, description='Enables MPI parallelism') | ||||||
|     variant('fortran', default=False, description="Download and install NetCDF-Fortran") |     variant('fortran', default=False, description="Download and install NetCDF-Fortran") | ||||||
|     variant('hdf4',    default=False, description="Enable HDF4 support") |     variant('hdf4',    default=False, description="Enable HDF4 support") | ||||||
|  |  | ||||||
|     # Dependencies: |     # Dependencies: | ||||||
|     depends_on("curl")  # required for DAP support |     depends_on("curl")  # required for DAP support | ||||||
|     depends_on("hdf", when='+hdf4') |     depends_on("hdf", when='+hdf4') | ||||||
|     depends_on("hdf5")  # required for NetCDF-4 support |     depends_on("hdf5+mpi~cxx", when='+mpi')  # required for NetCDF-4 support | ||||||
|  |     depends_on("hdf5~mpi", when='~mpi')  # required for NetCDF-4 support | ||||||
|     depends_on("zlib")  # required for NetCDF-4 support |     depends_on("zlib")  # required for NetCDF-4 support | ||||||
|  |  | ||||||
|     def install(self, spec, prefix): |     def install(self, spec, prefix): | ||||||
| @@ -41,6 +44,9 @@ def install(self, spec, prefix): | |||||||
|             "--enable-dap" |             "--enable-dap" | ||||||
|         ] |         ] | ||||||
|  |  | ||||||
|  |         if '+mpi' in spec: | ||||||
|  |             config_args.append('--enable-parallel4') | ||||||
|  |  | ||||||
|         CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix) |         CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix) | ||||||
|         LDFLAGS.append( "-L%s/lib"     % spec['hdf5'].prefix) |         LDFLAGS.append( "-L%s/lib"     % spec['hdf5'].prefix) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,6 +10,7 @@ class Openssl(Package): | |||||||
|     url      = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" |     url      = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" | ||||||
|  |  | ||||||
|     version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') |     version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') | ||||||
|  |     version('1.0.1r', '1abd905e079542ccae948af37e393d28') | ||||||
|     version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') |     version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') | ||||||
|     version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') |     version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') | ||||||
|     version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') |     version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') | ||||||
|   | |||||||
| @@ -10,40 +10,44 @@ class Trilinos(Package): | |||||||
|     homepage = "https://trilinos.org/" |     homepage = "https://trilinos.org/" | ||||||
|     url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" |     url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" | ||||||
|  |  | ||||||
|  |     version('12.4.2', '7c830f7f0f68b8ad324690603baf404e') | ||||||
|     version('12.2.1', '6161926ea247863c690e927687f83be9') |     version('12.2.1', '6161926ea247863c690e927687f83be9') | ||||||
|     version('12.0.1', 'bd99741d047471e127b8296b2ec08017') |     version('12.0.1', 'bd99741d047471e127b8296b2ec08017') | ||||||
|     version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426') |     version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426') | ||||||
|     version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') |     version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') | ||||||
|     version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') |     version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') | ||||||
|  |  | ||||||
|     variant('mpi', default=True, description='Add a dependency on MPI and enables MPI dependent packages') |     variant('shared', default=True, description='Enables the build of shared libraries') | ||||||
|  |     variant('debug', default=False, description='Builds a debug version of the libraries') | ||||||
|  |  | ||||||
|     # Everything should be compiled with -fpic |     # Everything should be compiled with -fpic | ||||||
|     depends_on('blas') |     depends_on('blas') | ||||||
|     depends_on('lapack') |     depends_on('lapack') | ||||||
|     depends_on('boost') |     depends_on('boost') | ||||||
|     depends_on('netcdf') |  | ||||||
|     depends_on('matio') |     depends_on('matio') | ||||||
|     depends_on('glm') |     depends_on('glm') | ||||||
|     depends_on('swig') |     depends_on('swig') | ||||||
|     depends_on('mpi', when='+mpi') |  | ||||||
|  |     # MPI related dependencies | ||||||
|  |     depends_on('mpi') | ||||||
|  |     depends_on('netcdf+mpi') | ||||||
|  |  | ||||||
|  |     depends_on('python') #  Needs py-numpy activated | ||||||
|  |  | ||||||
|     def install(self, spec, prefix): |     def install(self, spec, prefix): | ||||||
|  |         options = [] | ||||||
|  |         options.extend(std_cmake_args) | ||||||
|  |  | ||||||
|         options = [ |         options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', | ||||||
|             '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', |  | ||||||
|                         '-DTrilinos_ENABLE_TESTS:BOOL=OFF', |                         '-DTrilinos_ENABLE_TESTS:BOOL=OFF', | ||||||
|                         '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', |                         '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', | ||||||
|             '-DBUILD_SHARED_LIBS:BOOL=ON', |                         '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), | ||||||
|  |                         '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), | ||||||
|  |                         '-DTPL_ENABLE_MPI:STRING=ON', | ||||||
|                         '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, |                         '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, | ||||||
|                         '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix |                         '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix | ||||||
|         ] |                         ]) | ||||||
|         if '+mpi' in spec: |  | ||||||
|             mpi_options = ['-DTPL_ENABLE_MPI:BOOL=ON'] |  | ||||||
|             options.extend(mpi_options) |  | ||||||
|  |  | ||||||
|         # -DCMAKE_INSTALL_PREFIX and all the likes... |  | ||||||
|         options.extend(std_cmake_args) |  | ||||||
|         with working_dir('spack-build', create=True): |         with working_dir('spack-build', create=True): | ||||||
|             cmake('..', *options) |             cmake('..', *options) | ||||||
|             make() |             make() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Todd Gamblin
					Todd Gamblin