[Openmp-dev] Global BSS symbol not initialized properly if built with -fopenmp-targets=nvptx64

Alexey Bataev via Openmp-dev openmp-dev at lists.llvm.org
Fri Aug 16 05:25:08 PDT 2019


Check if you meet minimal requirements fir LLVM https://llvm.org/docs/GettingStarted.html#requirements

Also, would be good to see the build log.

Best regards,
Alexey Bataev

16 авг. 2019 г., в 3:27, Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>> написал(а):

I'm trying to build the trunk which now requires C++14, but a build configured below keeps failing on POWER8:

cmake -DCMAKE_INSTALL_PREFIX=/tmp -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-std=c++14" -DLLVM_ENABLE_PROJECTS="openmp;clang" -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_60 -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=60 -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=TRUE -DLLVM_TARGETS_TO_BUILD="PowerPC;NVPTX" ../llvm

can someone point out what I am doing wrong?

On Fri, Aug 16, 2019 at 2:26 AM Alexey Bataev <a.bataev at outlook.com<mailto:a.bataev at outlook.com>> wrote:
Hi Itaru, the problem was fixed in trunk, you can try it.


-------------
Best regards,
Alexey Bataev

13.08.2019 4:49, Alexey Bataev пишет:
There is no such entry, just a patch to fix the problem.

Best regards,
Alexey Bataev

12 авг. 2019 г., в 21:40, Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>> написал(а):

Alexey,
Could you point us to the corresponding LLVM Bug entry?

On Wed, Aug 7, 2019 at 1:25 AM Alexey Bataev <a.bataev at outlook.com<mailto:a.bataev at outlook.com>> wrote:
Hi Itary, I identified the cause of the problem with your app. The compiler works correctly, but one of the tools, clang-offload-bundler, produces a lot of junk in the bundled object files and it breaks linking. I'm working on the fix.


-------------
Best regards,
Alexey Bataev

04.08.2019 22:25, Alexey Bataev via Openmp-dev пишет:
I did not agreed that this is the bug in clang, I'm still investigating the problem.

Best regards,
Alexey Bataev

4 авг. 2019 г., в 22:01, Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>> написал(а):

All,
Alexey agreed this is a bug of Clang and is working on a fix, as during the global initialization phase, the instance's pointer to the vtable is never set.

On Thu, Jul 25, 2019 at 1:47 PM Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>> wrote:
Hi,
I am revisiting this possible compiler bug in Clang 8.0.0.

In the source code I am developing, there's a global static variable, nest::sli_neuron::recordablesMap_ put in the BSS section and it is expected to be fully initialized by the time nest::sli_neuron::sli_neuron() gets called, however in a gdb session:

(gdb) p nest::sli_neuron::recordablesMap_
Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name':
$1 = {<std::map<Name, double (nest::sli_neuron::*)() const, std::less<Name>, std::allocator<std::pair<Name const, double (nest::sli_neuron::*)() const> > >> = std::map with 0 elements, _vptr$RecordablesMap = 0x0}

this doesn't happen when -fopenmp-targets is _not_ used, is it not trivial to come up a reproducer, thus I am sending a work-in-progress report hoping someone will shed some light on this.

Thanks,
Itaru.
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org<mailto:Openmp-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev



_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org<mailto:Openmp-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190816/66f5be20/attachment-0001.html>


More information about the Openmp-dev mailing list