LLNL / SAMRAI

Structured Adaptive Mesh Refinement Application Infrastructure - a scalable C++ framework for block-structured AMR application development
https://computing.llnl.gov/projects/samrai
Other
224 stars 80 forks source link

NVCC / ENABLE_CUDA=ON invalid use of -pthread #179

Closed PhilipDeegan closed 6 months ago

PhilipDeegan commented 3 years ago

there seems to be an extra "-pthread" after "-XCompiler -pthread"

eg

cd /path/to/llnl/samrai/master/samrai/build/source/SAMRAI/tbox && /usr/local/cuda/bin/nvcc  -ccbin=/usr/bin/c++ -DCAMP_HAVE_CUDA -I/path/to/llnl/samrai/master/samrai/build/include -I/usr/include/hdf5/openmpi -I/path/to/llnl/samrai/master/samrai/source -isystem=/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem=/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem=/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem=/usr/lib/x86_64-linux-gnu/openmpi/include -isystem=/usr/lib/x86_64-linux-gnu/openmpi/lib -isystem=/path/to/llnl/umpire/master/include -isystem=/usr/local/cuda/include -isystem=/path/to/llnl/raja/master/include -arch sm_61 --expt-extended-lambda --expt-relaxed-constexpr -Xcompiler=-fPIC -Xcompiler=-pthread -pthread -std=c++11 -x cu -c /path/to/llnl/samrai/master/samrai/source/SAMRAI/tbox/Schedule.C -o CMakeFiles/SAMRAI_tbox.dir/Schedule.C.o

some example files which fail

tbox/Schecule.C
xfer/BoxGeometryVariableFillPattern.C
xfer/CoarsenAlgorithm.C
xfer/CoarsenClasses.C

cmake configure looks like

cmake ..                                                       \
  -DSAMRAI_ENABLE_EXAMPLES=OFF                                 \
  -DENABLE_EXAMPLES=OFF                                        \
  -DENABLE_TESTS=OFF                                           \
  -DENABLE_OPENMP=OFF -DENABLE_SAMRAI_TESTS=OFF                \
  -DENABLE_CUDA=ON                                             \
  -DCMAKE_CUDA_ARCHITECTURES=61                                \
  -DCMAKE_INSTALL_PREFIX=$CWD                                  \
  -DENABLE_RAJA=ON -DENABLE_UMPIRE=ON                          \
  -Dumpire_DIR=/path/to/llnl/umpire/master/share/umpire/cmake \
  -DRAJA_DIR=/path/to/llnl/raja/master/share/raja/cmake
PhilipDeegan commented 3 years ago

I've tried this but it doesn't seem to work either

PhilipDeegan commented 3 years ago

to get around this I built SAMRAI with CLANG (-x cuda)

PhilipDeegan commented 6 months ago

will reopen if it still the case