<div dir="ltr">Hi,<div>This simple C++ program:</div><div><br></div><div>#include <iostream><br><br>class Abstract {<br>public:<br>        virtual int f() = 0;<br>};<br>class Derived : public Abstract {<br>        public:<br>        int f() { return 1; };<br>};<br><br>int main() {<br>        Abstract *p[10];<br>        for (int i=0;i<10;i++) {<br>            p[i] = new Derived;<br>        }<br>        int sum=0;<br>#pragma omp target parallel for map(p[:10]) reduction(+: sum)<br>        for (int i=0;i<10;i++) {<br>                sum += p[i]->f();<br>        }<br>        std::cout << "sum " << sum << std::endl;<br>}<br></div><div><br></div><div>can be built with the offloading flags of Clang and runs fine on host, but on</div><div>the device it crashes at runtime leaving the error message:</div><div><br></div><div>==60659== NVPROF is profiling process 60659, command: ./a.out<br>Libomptarget fatal error 1: failure of target construct while offloading is mandatory<br>==60659== Profiling application: ./a.out<br>==60659== Warning: 5 records have invalid timestamps due to insufficient device buffer space. You can configure the buffer space using the option --device-buffer-size.<br>==60659== Warning: 4 records have invalid timestamps due to insufficient semaphore pool size. You can configure the pool size using the option --profiling-semaphore-pool-size.<br>==60659== Profiling result:<br>No kernels were profiled.<br></div><div><br></div><div>Does this just indicate the limitation of the current trunk Clang implementation?</div><div><br></div></div>