LLNL / RAJA

RAJA Performance Portability Layer (C++)
BSD 3-Clause "New" or "Revised" License
450 stars 102 forks source link

NVC++ util/resource.hpp", line 112: error: namespace "camp::resources" has no member "Omp" #1143

Open jeffhammond opened 2 years ago

jeffhammond commented 2 years ago

I know NVC++ doesn't have the OpenMP 5.0 runtime features required for RAJA but I can work on workarounds, provided I can a build that breaks there and not on whatever this is. Thanks.

build error

$ git clean -dfx ; cmake .. -DCMAKE_C_COMPILER=nvc -DCMAKE_CXX_COMPILER=nvc++  -DENABLE_TARGET_OPENMP=1 -DCMAKE_CUDA_ARCHITECTURES=80 -DCUDA_ARCH=sm_80 && make
warning: failed to remove ./: Invalid argument
Removing ./cmake_install.cmake
Removing ./CMakeFiles
Removing ./tpl
Removing ./lib
Removing ./src
Removing ./bin
Removing ./CMakeCache.txt
Removing ./Makefile
Removing ./compile_commands.json
Removing ./blt
-- The CXX compiler identification is NVHPC 21.9.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BLT Version: 0.4.1
-- CMake Version: 3.21.1
-- CMake Executable: /usr/local/bin/cmake
CMake Deprecation Warning at blt/SetupBLT.cmake:73 (cmake_policy):
  The OLD behavior for policy CMP0076 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:31 (include)

-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Git Support is ON
-- Git Executable: /usr/bin/git
-- Git Version: 2.25.1
-- MPI Support is OFF
-- OpenMP Support is OFF
-- CUDA Support is OFF
-- HIP Support is OFF
-- HCC Support is OFF
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Sphinx support is ON
-- Failed to locate Sphinx executable (missing: SPHINX_EXECUTABLE) 
-- Valgrind support is ON
-- Failed to locate Valgrind executable (missing: VALGRIND_EXECUTABLE) 
-- AStyle support is ON
-- Failed to locate AStyle executable (missing: ASTYLE_EXECUTABLE) 
-- ClangFormat support is ON
-- Failed to locate ClangFormat executable (missing: CLANGFORMAT_EXECUTABLE) 
-- Uncrustify support is ON
-- Failed to locate Uncrustify executable (missing: UNCRUSTIFY_EXECUTABLE) 
-- Yapf support is ON
-- Failed to locate Yapf executable (missing: YAPF_EXECUTABLE) 
-- CMakeFormat support is ON
-- Failed to locate CMakeFormat executable (missing: CMAKEFORMAT_EXECUTABLE) 
-- Cppcheck support is ON
-- Failed to locate Cppcheck executable (missing: CPPCHECK_EXECUTABLE) 
-- ClangQuery support is ON
-- Failed to locate ClangQuery executable (missing: CLANGQUERY_EXECUTABLE) 
-- ClangTidy support is ON
-- Failed to locate ClangTidy executable (missing: CLANGTIDY_EXECUTABLE) 
-- C Compiler family not set!!!
-- Adding optional BLT definitions and compiler flags
-- Setting CMAKE_CXX_EXTENSIONS to Off
-- Enabling all compiler warnings on all targets.
-- Fortran support disabled.
-- CMAKE_C_FLAGS flags are:    -Wall -Wextra 
-- CMAKE_CXX_FLAGS flags are:    -Wall -Wextra 
-- CMAKE_EXE_LINKER_FLAGS flags are:  
-- The C compiler identification is NVHPC 21.9.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at tpl/RAJA/CMakeLists.txt:60 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'ENABLE_CLANG_CUDA'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Using RAJA CAMP submodule.
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for std::aligned_alloc
-- Looking for std::aligned_alloc - not found
-- Looking for _mm_malloc
-- Looking for _mm_malloc - not found
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CUDA_ARCH

-- Build files have been written to: /local/jehammond/RAJA/develop-perf/build
Scanning dependencies of target RAJA
[  0%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/AlignedRangeIndexSetBuilders.cpp.o
[  0%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/DepGraphNode.cpp.o
[  0%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/LockFreeIndexSetBuilders.cpp.o
[  0%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/MemUtils_CUDA.cpp.o
[  0%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/MemUtils_HIP.cpp.o
[  1%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/MemUtils_SYCL.cpp.o
[  1%] Building CXX object tpl/RAJA/CMakeFiles/RAJA.dir/src/PluginStrategy.cpp.o
[  1%] Linking CXX static library ../../lib/libRAJA.a
[  1%] Built target RAJA
Scanning dependencies of target raja-perf-omptarget.exe
[  2%] Building CXX object src/CMakeFiles/raja-perf-omptarget.exe.dir/RAJAPerfSuiteDriver.cpp.o
[  2%] Building CXX object src/CMakeFiles/raja-perf-omptarget.exe.dir/apps/AppsData.cpp.o
[  2%] Building CXX object src/CMakeFiles/raja-perf-omptarget.exe.dir/apps/DEL_DOT_VEC_2D.cpp.o
"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 112: error: namespace "camp::resources" has no member "Omp"
      using type = camp::resources::Omp;
                                    ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 117: error: namespace "camp::resources" has no member "Omp"
      using type = camp::resources::Omp;
                                    ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 122: error: namespace "camp::resources" has no member "Omp"
      using type = camp::resources::Omp;
                                    ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 127: error: namespace "camp::resources" has no member "Omp"
      using type = camp::resources::Omp;
                                    ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 132: error: namespace "camp::resources" has no member "Omp"
      using type = camp::resources::Omp;
                                    ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/util/resource.hpp", line 152: error: namespace "RAJA::resources" has no member "Omp"
      template <> struct is_resource<resources::Omp> : std::true_type {};
                                                ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/policy/MultiPolicy.hpp", line 136: warning: unknown attribute "deprecated"
  RAJA_DEPRECATE("In the next RAJA Release, MultiPolicy will be deprecated.")
  ^

"/local/jehammond/RAJA/develop-perf/tpl/RAJA/include/RAJA/policy/MultiPolicy.hpp", line 152: warning: unknown attribute "deprecated"
  RAJA_DEPRECATE("In the next RAJA Release, MultiPolicy will be deprecated.")
  ^

6 errors detected in the compilation of "/local/jehammond/RAJA/develop-perf/src/apps/DEL_DOT_VEC_2D.cpp".
make[2]: *** [src/CMakeFiles/raja-perf-omptarget.exe.dir/build.make:101: src/CMakeFiles/raja-perf-omptarget.exe.dir/apps/DEL_DOT_VEC_2D.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:383: src/CMakeFiles/raja-perf-omptarget.exe.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

version

jehammond@dgx-a100-math:/local/jehammond/RAJA/develop-perf/build$ git log
commit 265ad5b98c0ca5a7f0ba996f90220d0b232d1bac (HEAD -> develop, origin/develop, origin/HEAD)
Merge: 85d93e15 f299c1e9
Author: Rich Hornung <hornung1@llnl.gov>
Date:   Mon Oct 18 08:18:54 2021 -0700

    Merge pull request #192 from LLNL/task/kab163/setup-multiproject-ci

    Task/kab163/setup multiproject ci
rchen20 commented 2 years ago

Hi @jeffhammond, it looks like you have -DENABLE_TARGET_OPENMP=1 on, however somehow OpenMP support is off:

-- OpenMP Support is OFF

You probably just need to pass in -DENABLE_OPENMP=On.

jeffhammond commented 2 years ago

Thanks for noticing that. I am surprised that OpenMP target does not imply OpenMP but CMake always surprises me 😃