From b402edcda276249b73f364c589dab904627881dd Mon Sep 17 00:00:00 2001 From: Kristi Belcher Date: Wed, 25 May 2022 13:26:51 -0700 Subject: [PATCH 1/2] adding openmp_target specs to lassen jobs --- .gitlab/lassen-jobs.yml | 2 +- scripts/spack_packages/raja/package.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab/lassen-jobs.yml b/.gitlab/lassen-jobs.yml index 748bcb7f0e..66218bacae 100644 --- a/.gitlab/lassen-jobs.yml +++ b/.gitlab/lassen-jobs.yml @@ -21,7 +21,7 @@ clang_9_gcc_8: clang_11_0_0: variables: - SPEC: "+openmp %clang@11.0.0" + SPEC: "+openmp+openmp_target cxxflags=-std=c++14 %clang@11.0.0" extends: .build_and_test_on_lassen gcc_8_3_1: diff --git a/scripts/spack_packages/raja/package.py b/scripts/spack_packages/raja/package.py index c612fbbae7..38221ebe26 100644 --- a/scripts/spack_packages/raja/package.py +++ b/scripts/spack_packages/raja/package.py @@ -82,6 +82,7 @@ class Raja(CMakePackage, CudaPackage, ROCmPackage): version('0.4.0', tag='v0.4.0', submodules="True") variant('openmp', default=True, description='Build OpenMP backend') + variant('openmp_target', default=False, description='Build with OpenMP support') variant('shared', default=False, description='Build Shared Libs') variant('libcpp', default=False, description='Uses libc++ instead of libstdc++') variant('tests', default='basic', values=('none', 'basic', 'benchmarks'), @@ -105,7 +106,11 @@ class Raja(CMakePackage, CudaPackage, ROCmPackage): when='cuda_arch={0}'.format(sm_)) conflicts('+openmp', when='+rocm') - + conflicts('~openmp', when='+openmp_target', msg='OpenMP target requires OpenMP') + # Is this true? ############ + conflicts('+cuda', when='+rocm') + conflicts('+rocm', when='+openmp_target', msg='Cant support both rocm and openmp device backends at once') + ############################ phases = ['hostconfig', 'cmake', 'build', 'install'] def _get_sys_type(self, spec): @@ -340,9 +345,15 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): # shared vs static libs cfg.write(cmake_cache_option("BUILD_SHARED_LIBS","+shared" in spec)) + cfg.write(cmake_cache_option("ENABLE_OPENMP","+openmp" in spec)) cfg.write(cmake_cache_option("RAJA_ENABLE_OPENMP","+openmp" in spec)) + cfg.write(cmake_cache_option("RAJA_ENABLE_TARGET_OPENMP","+openmp_target" in spec)) cfg.write(cmake_cache_option("RAJA_ENABLE_DESUL_ATOMICS","+desul" in spec)) + if "+openmp_target" in spec: + cfg.write(cmake_cache_string("OpenMP_CXX_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda")) + cfg.write(cmake_cache_option("ENABLE_CUDA", False)) + if "+desul" in spec: cfg.write(cmake_cache_string("BLT_CXX_STD","c++14")) if "+cuda" in spec: From 8c6822c87265e1daa45c37b17ebe0419e7044c86 Mon Sep 17 00:00:00 2001 From: Kristi Belcher Date: Wed, 25 May 2022 14:11:42 -0700 Subject: [PATCH 2/2] trying to solve disk quota issue --- scripts/gitlab/build_and_test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gitlab/build_and_test.sh b/scripts/gitlab/build_and_test.sh index 7141e6ac76..05552bc4a6 100755 --- a/scripts/gitlab/build_and_test.sh +++ b/scripts/gitlab/build_and_test.sh @@ -89,7 +89,9 @@ fi # Build Directory if [[ -z ${build_root} ]] then - build_root=$(pwd) + build_root="/dev/shm$(pwd)" +else + build_root="/dev/shm${build_root}" fi build_dir="${build_root}/build_${hostconfig//.cmake/}"