[Openmp-dev] Offloading build fails

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Sun Nov 3 00:29:33 PDT 2019


Building my app with trunk Clang with appropriate offloading flags fails:

[ 32%] Building CXX object
nestkernel/CMakeFiles/nestkernel.dir/archiving_node.cpp.o
In file included from
/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/archiving_node.cpp:30:
In file included from
/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/archiving_node.h:40:
/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/nest_time.h:127:10:
error: call to 'abs' is ambiguous
  return std::abs( n );
         ^~~~~~~~
/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/nest_time.h:312:15:
note: in instantiation of function template specialization
'nest::time_abs<long>' requested here
    : tics( ( time_abs( t.t ) < LIM_MAX.steps )
              ^
/usr/include/stdlib.h:770:12: note: candidate function
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
           ^
/p/scratch/cpcp0/pcp0151/opt/clang/201911030759/lib/clang/10.0.0/include/__clang_cuda_cmath.h:56:24:
note: candidate function
__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); }
                       ^
/p/scratch/cpcp0/pcp0151/opt/clang/201911030759/lib/clang/10.0.0/include/__clang_cuda_cmath.h:57:25:
note: candidate function
__DEVICE__ const double abs(const double __x) { return ::fabs((double)__x);
}
                        ^
1 error generated.
make[2]: *** [nestkernel/CMakeFiles/nestkernel.dir/archiving_node.cpp.o]
Error 1
make[1]: *** [nestkernel/CMakeFiles/nestkernel.dir/all] Error 2
make: *** [all] Error 2

please note that without those offloading flags build as expected succeeds.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20191103/9a9a70fa/attachment.html>


More information about the Openmp-dev mailing list