Hi.
My machine is under MacOS, but I used Docker and an image ubuntu 20.04.
Then apt-install : cmake, git, build-essential, libboost-all-dev.
This includes g++ 9.3.0 and boost 1.71.0 .
Cmake building and installation works fine.
(cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ..)
Since I did not add any backend, I assume the only available is openmp.
Then the build of the test suite is failing
(cmake --build . --parallel 2 --config Release).
The output is below.
I guess the problem is related to the "HSA" error at the beginning ?
cmake --build . --parallel 2 --config Release
Scanning dependencies of target CatchMain
[ 0%] Building CXX object test/catch_main/CMakeFiles/CatchMain.dir/src/CatchMain.cpp.o
[ 0%] Linking CXX static library libCatchMain.a
[ 0%] Built target CatchMain
Scanning dependencies of target common
[ 0%] Building CXX object test/common/CMakeFiles/common.dir/src/Dummy.cpp.o
[ 1%] Linking CXX static library libcommon.a
[ 1%] Built target common
Scanning dependencies of target axpy
Scanning dependencies of target headerCheck
[ 2%] Building CXX object test/integ/axpy/CMakeFiles/axpy.dir/src/axpy.cpp.o
[ 2%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuFibers.hpp.cpp.o
[ 3%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuOmp2Blocks.hpp.cpp.o
/work/alpaka/include/alpaka/kernel/TaskKernelCpuOmp4.hpp: In function 'alpaka::kernel::TaskKernelCpuOmp4<std::integral_constant<unsigned long, 1ul>, unsigned long, AxpyKernel, unsigned long const&, float const&, float*, float*>::operator()() const [clone ._omp_fn.0] [clone .hsa.0]':
cc1plus: error: could not emit HSAIL for the function [-Werror=hsa]
cc1plus: note: support for HSA does not implement exception handling
cc1plus: all warnings being treated as errors
make[2]: *** [test/integ/axpy/CMakeFiles/axpy.dir/build.make:63: test/integ/axpy/CMakeFiles/axpy.dir/src/axpy.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1607: test/integ/axpy/CMakeFiles/axpy.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 3%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuOmp2Threads.hpp.cpp.o
[ 3%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuOmp4.hpp.cpp.o
[ 4%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuSerial.hpp.cpp.o
[ 4%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuTbbBlocks.hpp.cpp.o
[ 4%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccCpuThreads.hpp.cpp.o
[ 5%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccDevProps.hpp.cpp.o
[ 5%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccGpuCudaRt.hpp.cpp.o
[ 5%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/acc/AccGpuHipRt.hpp.cpp.o
...
[ 77%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/workdiv/WorkDivUniformCudaHipBuiltIn.hpp.cpp.o
[ 77%] Building CXX object test/analysis/headerCheck/CMakeFiles/headerCheck.dir/src/main.cpp.o
[ 77%] Linking CXX executable headerCheck
[ 77%] Built target headerCheck
make: *** [Makefile:141: all] Error 2
Hello @chavid , thanks for your report.
Interesting. So there is a warning emitted while compiling the OpenMP 4.0 backend, and our cmake settings treat warnings as errors. I am not sure what causes the warning, perhaps @jkelling has an idea?
For now, could you try disabling this backend, by adding -DALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF to your cmake command line? (By default it tries to build for everything available, and this option will tell not to use OpenMP 4).
Also cc @psychocoderHPC .
@chavid
Do you also installed libomp-dev?
@chavid
Do you also installedlibomp-dev?
No. trying that.
I did not know, that gcc supports offloading to HSA (AMD GPUs).
In any case: The current OpenMP 4 backend does not support offloading. There is and if(0) in the target directive, which should keep the compiler from trying to actually offload it. No idea why your compiler is even trying to create HSAIL code, it should not do that.
If the compiler tries to generate GPU code, it is bound to fail, because the target region uses an std::function or a bind expression, which use function pointers or even throw (which appears to be what it is complaining about).
Disable OMP4, I would consider the backend not supported in the current state.
@chavid
Do you also installedlibomp-dev?No. trying that.
I was just wondering if the OpenMP backend is enabled because I know that libomp-dev is not installed by default in an Ubuntu Docker image.
Installing libomp-deb has solved the issue :)
I am now facing some gcc crash with KernelWithTemplateArgumentDeduction, presumably due to a run out of RAM or something alike. But that's another story. Will try to boost my docker settings.
Here we are clearly in the modern C++ world : endless compilation needing huge RAM ;)
Most helpful comment
Installing libomp-deb has solved the issue :)
I am now facing some gcc crash with KernelWithTemplateArgumentDeduction, presumably due to a run out of RAM or something alike. But that's another story. Will try to boost my docker settings.
Here we are clearly in the modern C++ world : endless compilation needing huge RAM ;)