[Openmp-dev] ptxas fatal : Cannot take address of function '__pthread_key_create'

Jonas Hahnfeld via Openmp-dev openmp-dev at lists.llvm.org
Wed Sep 5 03:01:05 PDT 2018


I can't reproduce the problem on x86, at least on this file on branch 
master and for-upstream. Maybe it's specific to Power?

Can you have a look where this function is called? Extending the compile 
command for that specific file by "-S -emit-llvm" and posting the result 
would be helpful.

Jonas

On 2018-09-05 11:20, Itaru Kitayama wrote:
> Jonas,
> No problem. It is at:
> 
> https://github.com/ikitayama/nest-simulator
> 
> ... and especially this file
> 
> https://github.com/ikitayama/nest-simulator/blob/master/sli/arraydatum.cc
> 
> is the first one on which llvm/clang-8.0.0 stops in a build process.
> 
> On Wed, Sep 5, 2018 at 3:56 PM Jonas Hahnfeld <hahnjo at hahnjo.de>
> wrote:
> 
>> Mabye you are using some thread-local storage? Can you share the
>> code,
>> everything else will be guesses at best...
>> 
>> Jonas
>> 
>> On 2018-09-05 06:15, Itaru Kitayama via Openmp-dev wrote:
>>> Hi Alexey,
>>> If the function is not explicitly used in the code-base in
>> question,
>>> how do I
>>> find which function/module requires it?
>>> 
>>> On Tue, Sep 4, 2018 at 11:15 PM Alexey Bataev
>> <a.bataev at outlook.com>
>>> wrote:
>>> 
>>>> It means that this function is used somewhere in the code that is
>>>> offloaded to the GPU. I don't think this is correct, this
>> function
>>>> is pthreads-specific and I don't think that NVidia GPUs support
>>>> pthreads.
>>>> 
>>>> -------------
>>>> Best regards,
>>>> Alexey Bataev
>>>> 
>>>> 02.09.2018 3:51, Itaru Kitayama via Openmp-dev пишет:
>>>> 
>>>>> 
>>>> 
>>>>> Hi,
>>>>> I am trying to build an application that can do OpenMP
>> offloading
>>>>> on a POWER8 + P100 system using the latest LLVM/Clang toolchain
>>>>> (openmp
>>>>> is too the latest).
>>>>> 
>>>>> The build error is:
>>>>> 
>>>>> [  3%] Building CXX object
>>>>> sli/CMakeFiles/sli_lib.dir/arraydatum.cc.o
>>>>> cd /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/sli &&
>>>>> /gpfs/work/pcp0/pcp0151/opt/llvm+clang-upstream/bin/clang++
>>>>> -Dsli_lib_EXPORTS -I/bgsys/drivers/ppcfloor/comm/gcc/include
>>>>> -I/gpfs/software/opt/gsl/2.4/include
>>>>> -I/gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/libnestutil
>>>>> -I/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/libnestutil
>>>>> -std=c++11 -O2 -Wall -fopenmp
>> -fopenmp-targets=nvptx64-nvidia-cuda
>>>>> --cuda-path=/gpfs/software/opt/cuda/9.2.88  -fPIC   -o
>>>>> CMakeFiles/sli_lib.dir/arraydatum.cc.o -c
>>>>> 
>> /gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/sli/arraydatum.cc
>>>>> 
>>>>> ptxas fatal   : Cannot take address of function
>>>>> '__pthread_key_create'
>>>>> clang-8: error: ptxas command failed with exit code 255 (use -v
>> to
>>>>> see invocation)
>>>>> make[2]: *** [sli/CMakeFiles/sli_lib.dir/arraydatum.cc.o] Error
>>>>> 255
>>>>> make[2]: Leaving directory
>>>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream'
>>>>> make[1]: *** [sli/CMakeFiles/sli_lib.dir/all] Error 2
>>>>> make[1]: Leaving directory
>>>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream'
>>>>> make: *** [all] Error 2
>>>>> 
>>>>> The CUDA toolkit is 9.2.88, is it possible the error is fixed in
>>>>> the
>>>>> latest toolkit?
>>>>> 
>>>>> Thanks,
>>>>> Itaru.
>>>> 
>>>>> _______________________________________________
>>>>> Openmp-dev mailing list
>>>>> Openmp-dev at lists.llvm.org
>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>> _______________________________________________
>>> Openmp-dev mailing list
>>> Openmp-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list