From ff7230c0cf0f53eda3e6b2440c08687667bb8f30 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Wed, 9 Mar 2022 10:47:55 -0800 Subject: [PATCH] lbann: allow unsupported compiler (#29417) --- var/spack/repos/builtin/packages/aluminum/package.py | 4 ++++ var/spack/repos/builtin/packages/dihydrogen/package.py | 4 ++++ var/spack/repos/builtin/packages/hydrogen/package.py | 6 ++++++ var/spack/repos/builtin/packages/lbann/package.py | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py index 894c8bca38..1fb57efac9 100644 --- a/var/spack/repos/builtin/packages/aluminum/package.py +++ b/var/spack/repos/builtin/packages/aluminum/package.py @@ -81,6 +81,10 @@ def cmake_args(self): arch_str = ";".join(archs) args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str) + if (spec.satisfies('%cce') and + spec.satisfies('^cuda+allow-unsupported-compilers')): + args.append('-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler') + if spec.satisfies('@0.5:'): args.extend([ '-DALUMINUM_ENABLE_HOST_TRANSFER:BOOL=%s' % ('+ht' in spec), diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py index 63f4ad4509..20bfb05b4f 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -167,6 +167,10 @@ def cmake_args(self): arch_str = ";".join(archs) args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str) + if (spec.satisfies('%cce') and + spec.satisfies('^cuda+allow-unsupported-compilers')): + args.append('-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler') + if '+cuda' in spec or '+distconv' in spec: args.append('-DcuDNN_DIR={0}'.format( spec['cudnn'].prefix)) diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 552f7f4b51..9dd14c001d 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -69,6 +69,8 @@ class Hydrogen(CMakePackage, CudaPackage, ROCmPackage): depends_on('cmake@3.21.0:', type='build', when='@1.5.2:') depends_on('cmake@3.17.0:', type='build', when='@:1.5.1') + depends_on('cmake@3.22.0:', type='build', when='%cce') + depends_on('mpi') depends_on('hwloc@1.11:') depends_on('hwloc +cuda +nvml', when='+cuda') @@ -176,6 +178,10 @@ def cmake_args(self): arch_str = ";".join(archs) args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str) + if (spec.satisfies('%cce') and + spec.satisfies('^cuda+allow-unsupported-compilers')): + args.append('-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler') + if '+rocm' in spec: args.extend([ '-DCMAKE_CXX_FLAGS=-std=c++17', diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 17002d679d..4d6db5b682 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -325,6 +325,10 @@ def cmake_args(self): arch_str = ";".join(archs) args.append('-DCMAKE_CUDA_ARCHITECTURES=%s' % arch_str) + if (spec.satisfies('%cce') and + spec.satisfies('^cuda+allow-unsupported-compilers')): + args.append('-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler') + if spec.satisfies('@:0.90') or spec.satisfies('@0.95:'): args.append( '-DHydrogen_DIR={0}/CMake/hydrogen'.format(