LLNL / CHAI

Copy-hiding array abstraction to automatically migrate data between memory spaces
BSD 3-Clause "New" or "Revised" License
106 stars 22 forks source link

Build configuration with RAJA plugin enabled fails to add BLT stub #233

Closed jhdavis8 closed 4 months ago

jhdavis8 commented 1 year ago

When trying to build CHAI with the RAJA plugin enabled, I get the following CMake error:

CMake Error at blt/cmake/BLTMacros.cmake:550 (add_library):
  add_library cannot create target "blt_stub" because another target with the
  same name already exists.  The existing target is an interface library
  created in source directory
  "/home/jhdavis/repos/perf-port/BabelStream/CHAI/src/tpl/umpire".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  src/tpl/raja/cmake/SetupPackages.cmake:123 (blt_import_library)
  src/tpl/raja/CMakeLists.txt:118 (include)

The following steps reproduce the error:

git clone git@github.com:LLNL/CHAI.git
cd CHAI
git submodule update --init --recursive
mkdir build && cd build
cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.6 -DENABLE_CUDA=ON -DENABLE_TESTS=Off -DENABLE_BENCHMARKS=Off -DCHAI_ENABLE_RAJA_PLUGIN=ON -DCMAKE_CUDA_ARCHITECTURES=86 ../

It seems like this might be related to this issue as well. I'm using CMake 3.22.1 and CUDA 11.6, and I'm cloning from the develop branch.

davidbeckingsale commented 1 year ago

This will be fixed in the upcoming release (and develop) - for now, you can add the change to Umpire shown here https://github.com/LLNL/Umpire/commit/91ffd6fc85c63df4babd11b2253b863606ed651b to the umpire submodule.

adayton1 commented 4 months ago

This should be fixed now.