<div dir="ltr">I have attached to this email.<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 5, 2018 at 8:10 PM Jonas Hahnfeld <<a href="mailto:hahnjo@hahnjo.de">hahnjo@hahnjo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sure, because Clang only outputs LLVM IR and ptxas is not invoked ;) but <br>
what does the output file look like?<br>
If you didn't remove the -o flag, there will now be text in <br>
arraydatum.cc.o which is what I'm looking for: That's the internal <br>
representation during compilation and easier to read than PTX code.<br>
<br>
Sorry, I'm obviously doing a very bad job in explaining how to find the <br>
problem :-(<br>
<br>
On 2018-09-05 13:05, Itaru Kitayama wrote:<br>
> It finishes silently if `-S -emit-llvm' is also supplied to the<br>
> driver.<br>
> <br>
> On Wed, Sep 5, 2018 at 7:31 PM Jonas Hahnfeld <<a href="mailto:hahnjo@hahnjo.de" target="_blank">hahnjo@hahnjo.de</a>><br>
> wrote:<br>
> <br>
>> I meant when it tries to compile arraydatum.cc, sorry:<br>
>>> [  3%] Building CXX object<br>
>> sli/CMakeFiles/sli_lib.dir/arraydatum.cc.o<br>
>>> cd /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/sli &&<br>
>>> /gpfs/work/pcp0/pcp0151/opt/llvm+clang-upstream/bin/clang++<br>
>>> -Dsli_lib_EXPORTS -I/bgsys/drivers/ppcfloor/comm/gcc/include<br>
>>> -I/gpfs/software/opt/gsl/2.4/include<br>
>>> -I/gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/libnestutil<br>
>>> -I/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/libnestutil<br>
>>> -std=c++11 -O2 -Wall -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda<br>
>>> --cuda-path=/gpfs/software/opt/cuda/9.2.88  -fPIC   -o<br>
>>> CMakeFiles/sli_lib.dir/arraydatum.cc.o -c<br>
>>> /gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/sli/arraydatum.cc<br>
>> <br>
>> You can copy this command and add some flags to see where this<br>
>> function<br>
>> is called.<br>
>> <br>
>> On 2018-09-05 12:12, Itaru Kitayama wrote:<br>
>>> CMake compiler check fails:<br>
>>> <br>
>>> Determining if files mach-o/dyld.h exist failed with the following<br>
>>> output:<br>
>>> Change Dir:<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp<br>
>>> <br>
>>> Run Build Command:"/usr/bin/gmake" "cmTC_1486a/fast"<br>
>>> /usr/bin/gmake -f CMakeFiles/cmTC_1486a.dir/build.make<br>
>>> CMakeFiles/cmTC_1486a.dir/build<br>
>>> gmake[1]: Entering directory<br>
>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMak<br>
>>> eTmp'<br>
>>> Building C object CMakeFiles/cmTC_1486a.dir/CheckIncludeFiles.c.o<br>
>>> /gpfs/work/pcp0/pcp0151/opt/llvm+clang-upstream/bin/clang<br>
>> -o<br>
>>> CMakeFiles/cmTC_1486a.dir/C<br>
>>> heckIncludeFiles.c.o -c<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp/C<br>
>>> heckIncludeFiles.c<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10:<br>
>>> fatal error: 'mach-o/dyld.h' file not found<br>
>>> #include <mach-o/dyld.h><br>
>>> ^~~~~~~~~~~~~~~<br>
>>> 1 error generated.<br>
>>> gmake[1]: *** [CMakeFiles/cmTC_1486a.dir/CheckIncludeFiles.c.o]<br>
>> Error<br>
>>> 1<br>
>>> gmake[1]: Leaving directory<br>
>>> <br>
>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMake<br>
>>> Tmp'<br>
>>> gmake: *** [cmTC_1486a/fast] Error 2<br>
>>> <br>
>>> Source:<br>
>>> /* */<br>
>>> #include <mach-o/dyld.h><br>
>>> <br>
>>> int main(void){return 0;}<br>
>>> <br>
>>> Determining if files mach/mach.h exist failed with the following<br>
>>> output:<br>
>>> Change Dir:<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp<br>
>>> <br>
>>> Run Build Command:"/usr/bin/gmake" "cmTC_a088b/fast"<br>
>>> /usr/bin/gmake -f CMakeFiles/cmTC_a088b.dir/build.make<br>
>>> CMakeFiles/cmTC_a088b.dir/build<br>
>>> gmake[1]: Entering directory<br>
>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMak<br>
>>> eTmp'<br>
>>> Building C object CMakeFiles/cmTC_a088b.dir/CheckIncludeFiles.c.o<br>
>>> /gpfs/work/pcp0/pcp0151/opt/llvm+clang-upstream/bin/clang<br>
>> -o<br>
>>> CMakeFiles/cmTC_a088b.dir/C<br>
>>> heckIncludeFiles.c.o -c<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp/C<br>
>>> heckIncludeFiles.c<br>
>>> <br>
>> <br>
> /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10:<br>
>>> fatal error: 'mach/mach.h' file not found<br>
>>> #include <mach/mach.h><br>
>>> ^~~~~~~~~~~~~<br>
>>> 1 error generated.<br>
>>> gmake[1]: *** [CMakeFiles/cmTC_a088b.dir/CheckIncludeFiles.c.o]<br>
>> Error<br>
>>> 1<br>
>>> gmake[1]: Leaving directory<br>
>>> <br>
>> <br>
> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/CMakeFiles/CMakeTmp'<br>
>>> <br>
>>> On Wed, Sep 5, 2018 at 7:01 PM Jonas Hahnfeld <<a href="mailto:hahnjo@hahnjo.de" target="_blank">hahnjo@hahnjo.de</a>><br>
>>> wrote:<br>
>>> <br>
>>>> I can't reproduce the problem on x86, at least on this file on<br>
>>>> branch<br>
>>>> master and for-upstream. Maybe it's specific to Power?<br>
>>>> <br>
>>>> Can you have a look where this function is called? Extending the<br>
>>>> compile<br>
>>>> command for that specific file by "-S -emit-llvm" and posting the<br>
>>>> result<br>
>>>> would be helpful.<br>
>>>> <br>
>>>> Jonas<br>
>>>> <br>
>>>> On 2018-09-05 11:20, Itaru Kitayama wrote:<br>
>>>>> Jonas,<br>
>>>>> No problem. It is at:<br>
>>>>> <br>
>>>>> <a href="https://github.com/ikitayama/nest-simulator" rel="noreferrer" target="_blank">https://github.com/ikitayama/nest-simulator</a><br>
>>>>> <br>
>>>>> ... and especially this file<br>
>>>>> <br>
>>>>> <br>
>>>> <br>
>>> <br>
>> <br>
> <a href="https://github.com/ikitayama/nest-simulator/blob/master/sli/arraydatum.cc" rel="noreferrer" target="_blank">https://github.com/ikitayama/nest-simulator/blob/master/sli/arraydatum.cc</a><br>
>>>>> <br>
>>>>> is the first one on which llvm/clang-8.0.0 stops in a build<br>
>>>> process.<br>
>>>>> <br>
>>>>> On Wed, Sep 5, 2018 at 3:56 PM Jonas Hahnfeld <<a href="mailto:hahnjo@hahnjo.de" target="_blank">hahnjo@hahnjo.de</a>><br>
>>>>> wrote:<br>
>>>>> <br>
>>>>>> Mabye you are using some thread-local storage? Can you share<br>
>> the<br>
>>>>>> code,<br>
>>>>>> everything else will be guesses at best...<br>
>>>>>> <br>
>>>>>> Jonas<br>
>>>>>> <br>
>>>>>> On 2018-09-05 06:15, Itaru Kitayama via Openmp-dev wrote:<br>
>>>>>>> Hi Alexey,<br>
>>>>>>> If the function is not explicitly used in the code-base in<br>
>>>>>> question,<br>
>>>>>>> how do I<br>
>>>>>>> find which function/module requires it?<br>
>>>>>>> <br>
>>>>>>> On Tue, Sep 4, 2018 at 11:15 PM Alexey Bataev<br>
>>>>>> <<a href="mailto:a.bataev@outlook.com" target="_blank">a.bataev@outlook.com</a>><br>
>>>>>>> wrote:<br>
>>>>>>> <br>
>>>>>>>> It means that this function is used somewhere in the code<br>
>> that<br>
>>>> is<br>
>>>>>>>> offloaded to the GPU. I don't think this is correct, this<br>
>>>>>> function<br>
>>>>>>>> is pthreads-specific and I don't think that NVidia GPUs<br>
>> support<br>
>>>>>>>> pthreads.<br>
>>>>>>>> <br>
>>>>>>>> -------------<br>
>>>>>>>> Best regards,<br>
>>>>>>>> Alexey Bataev<br>
>>>>>>>> <br>
>>>>>>>> 02.09.2018 3:51, Itaru Kitayama via Openmp-dev пишет:<br>
>>>>>>>> <br>
>>>>>>>>> <br>
>>>>>>>> <br>
>>>>>>>>> Hi,<br>
>>>>>>>>> I am trying to build an application that can do OpenMP<br>
>>>>>> offloading<br>
>>>>>>>>> on a POWER8 + P100 system using the latest LLVM/Clang<br>
>>>> toolchain<br>
>>>>>>>>> (openmp<br>
>>>>>>>>> is too the latest).<br>
>>>>>>>>> <br>
>>>>>>>>> The build error is:<br>
>>>>>>>>> <br>
>>>>>>>>> [  3%] Building CXX object<br>
>>>>>>>>> sli/CMakeFiles/sli_lib.dir/arraydatum.cc.o<br>
>>>>>>>>> cd /gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/sli &&<br>
>>>>>>>>> /gpfs/work/pcp0/pcp0151/opt/llvm+clang-upstream/bin/clang++<br>
>>>>>>>>> -Dsli_lib_EXPORTS -I/bgsys/drivers/ppcfloor/comm/gcc/include<br>
>>>>>>>>> -I/gpfs/software/opt/gsl/2.4/include<br>
>>>>>>>>> <br>
>> -I/gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/libnestutil<br>
>>>>>>>>> <br>
>>>> -I/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream/libnestutil<br>
>>>>>>>>> -std=c++11 -O2 -Wall -fopenmp<br>
>>>>>> -fopenmp-targets=nvptx64-nvidia-cuda<br>
>>>>>>>>> --cuda-path=/gpfs/software/opt/cuda/9.2.88  -fPIC   -o<br>
>>>>>>>>> CMakeFiles/sli_lib.dir/arraydatum.cc.o -c<br>
>>>>>>>>> <br>
>>>>>> <br>
>>>> <br>
>> /gpfs/homeb/pcp0/pcp0151/projects/nest-simulator/sli/arraydatum.cc<br>
>>>>>>>>> <br>
>>>>>>>>> ptxas fatal   : Cannot take address of function<br>
>>>>>>>>> '__pthread_key_create'<br>
>>>>>>>>> clang-8: error: ptxas command failed with exit code 255 (use<br>
>>>> -v<br>
>>>>>> to<br>
>>>>>>>>> see invocation)<br>
>>>>>>>>> make[2]: *** [sli/CMakeFiles/sli_lib.dir/arraydatum.cc.o]<br>
>>>> Error<br>
>>>>>>>>> 255<br>
>>>>>>>>> make[2]: Leaving directory<br>
>>>>>>>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream'<br>
>>>>>>>>> make[1]: *** [sli/CMakeFiles/sli_lib.dir/all] Error 2<br>
>>>>>>>>> make[1]: Leaving directory<br>
>>>>>>>>> `/gpfs/work/pcp0/pcp0151/build/nest-clang-upstream'<br>
>>>>>>>>> make: *** [all] Error 2<br>
>>>>>>>>> <br>
>>>>>>>>> The CUDA toolkit is 9.2.88, is it possible the error is<br>
>> fixed<br>
>>>> in<br>
>>>>>>>>> the<br>
>>>>>>>>> latest toolkit?<br>
>>>>>>>>> <br>
>>>>>>>>> Thanks,<br>
>>>>>>>>> Itaru.<br>
>>>>>>>> <br>
>>>>>>>>> _______________________________________________<br>
>>>>>>>>> Openmp-dev mailing list<br>
>>>>>>>>> <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
>>>>>>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
>>>>>>> _______________________________________________<br>
>>>>>>> Openmp-dev mailing list<br>
>>>>>>> <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
>>>>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote></div></div>