alpaka-group / cupla

C++ User interface for the Platform independent Library Alpaka :arrows_clockwise:
Other
37 stars 18 forks source link

error at build matmul example with cuda #62

Closed SimeonEhrig closed 7 years ago

SimeonEhrig commented 7 years ago

I tried to build the matmul example with the instruction in INSTALL.md (and an own project with a simple hello world main.cpp) and got follow error:

/home/simeon/libraries/cupla/alpaka/include/alpaka/vec/Vec.hpp(461): error: no instance of function template "alpaka::vec::Vec<TDim, TSize>::foldrAll [with TDim=cupla::AlpakaDim<1U>, TSize=cupla::MemSizeType]" matches the argument list
            argument types are: (lambda [](cupla::MemSizeType, cupla::MemSizeType)->cupla::MemSizeType)
          detected during:
            instantiation of "auto alpaka::vec::Vec<TDim, TSize>::prod() const->TSize [with TDim=cupla::AlpakaDim<1U>, TSize=cupla::MemSizeType]" 
/home/simeon/libraries/cupla/alpaka/include/alpaka/mem/buf/BufCpu.hpp(524): here
            instantiation of "auto alpaka::mem::buf::traits::Pin<alpaka::mem::buf::BufCpu<TElem, TDim, TSize>, void>::pin(alpaka::mem::buf::BufCpu<TElem, TDim, TSize> &)->void [with TElem=uint8_t, TDim=cupla::AlpakaDim<1U>, TSize=cupla::MemSizeType]" 
/home/simeon/libraries/cupla/alpaka/include/alpaka/mem/buf/Traits.hpp(223): here
            instantiation of "auto alpaka::mem::buf::pin(TBuf &)->void [with TBuf=alpaka::mem::buf::Buf<cupla::AccHost, uint8_t, cupla::AlpakaDim<1U>, cupla::MemSizeType>]" 
/home/simeon/libraries/cupla/src/memory.cpp(150): here

1 error detected in the compilation of "/tmp/tmpxft_00002cb3_00000000-7_memory.cpp1.ii".
CMake Error at matrixMul_generated_memory.cpp.o.cmake:266 (message):
  Error generating file
  /home/simeon/libraries/cupla/build_matmul_cuda/CMakeFiles/matrixMul.dir/__/__/__/src/./matrixMul_generated_memory.cpp.o

I used export CUPLA_ROOT=$HOME/libraries/cupla and cmake $CUPLA_ROOT/example/CUDASamples/matrixMul -DALPAKA_ACC_GPU_CUDA_ENABLE=ON && make -j4.

If I used -DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON instead -DALPAKA_ACC_GPU_CUDA_ENABLE=ON, the build was fine.

System: Ubuntu 16.04, gcc 5.4, Cuda 8

psychocoderHPC commented 7 years ago

I will check it on Monday.

psychocoderHPC commented 7 years ago

Could you please test if the update to the latest stable alpaka version solves the issue. I added a pull request #63 and will merge it to the dev as soon as the CI is finished.

Please run git submodule update after the rebase.

SimeonEhrig commented 7 years ago

Yes, it works with the example and in my project.

psychocoderHPC commented 7 years ago

issue is solved with #63