dealii: disable tpetra when +cuda; check for '' in cuda_arch (#7958)
* dealii: disable tpetra when +cuda; check for '' in cuda_arch * trilinos: fix Kokkos CUDA * Revert "trilinos: fix Kokkos CUDA" This reverts commit 6aae894bc7d49c9e736c06f65b81b8c219443920. * update according to @aprokop comments * minor * fix flake8
This commit is contained in:
		 Denis Davydov
					Denis Davydov
				
			
				
					committed by
					
						 Adam J. Stewart
						Adam J. Stewart
					
				
			
			
				
	
			
			
			 Adam J. Stewart
						Adam J. Stewart
					
				
			
						parent
						
							206e61bafd
						
					
				
				
					commit
					28bebe13a8
				
			| @@ -146,8 +146,12 @@ class Dealii(CMakePackage, CudaPackage): | ||||
|     depends_on('slepc@:3.6.3',     when='@:8.4.1+slepc+petsc+mpi') | ||||
|     depends_on('slepc~arpack',     when='+slepc+petsc+mpi+int64') | ||||
|     depends_on('sundials~pthread', when='@9.0:+sundials') | ||||
|     depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos',       when='+trilinos+mpi~int64') | ||||
|     depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre', when='+trilinos+mpi+int64') | ||||
|     depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos',       when='+trilinos+mpi~int64~cuda') | ||||
|     depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre', when='+trilinos+mpi+int64~cuda') | ||||
|     # FIXME: temporary disable Tpetra when using CUDA due to | ||||
|     # namespace "Kokkos::Impl" has no member "cuda_abort" | ||||
|     depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2',       when='+trilinos+mpi~int64+cuda') | ||||
|     depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', when='+trilinos+mpi+int64+cuda') | ||||
|  | ||||
|     # check that the combination of variants makes sense | ||||
|     conflicts('^openblas+ilp64', when='@:8.5.1') | ||||
| @@ -252,15 +256,15 @@ def cmake_args(self): | ||||
|             if not spec.satisfies('^cuda@9:'): | ||||
|                 options.append('-DDEAL_II_WITH_CXX14=OFF') | ||||
|             cuda_arch = spec.variants['cuda_arch'].value | ||||
|             if cuda_arch is not None: | ||||
|             if cuda_arch is not None and cuda_arch[0] is not '': | ||||
|                 if len(cuda_arch) > 1: | ||||
|                     raise InstallError( | ||||
|                         'deal.II only supports compilation for a single GPU!' | ||||
|                     ) | ||||
|                 flags = '-arch=sm_{0}'.format(cuda_arch[0]) | ||||
|                 # FIXME: there are some compiler errors in dealii | ||||
|                 # with flags below. Stick with -arch=sm_xy for now. | ||||
|                 # flags = ' '.join(self.cuda_flags(cuda_arch)) | ||||
|                 # with: flags = ' '.join(self.cuda_flags(cuda_arch)) | ||||
|                 # Stick with -arch=sm_xy for now. | ||||
|                 options.append( | ||||
|                     '-DDEAL_II_CUDA_FLAGS={0}'.format(flags) | ||||
|                 ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user