<div dir="ltr">Hi,<div><br></div><div>I used <a href="https://github.com/gromacs/gromacs/blob/release-5-0/src/gromacs/gmxlib/network.c#L205">https://github.com/gromacs/gromacs/blob/release-5-0/src/gromacs/gmxlib/network.c#L205</a> in Gromacs, without apparent ill effect</div><div><br></div><div>Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 9:13 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Unfortunately, this is a known problem (and is already part of a Clang-compatibility PMR with IBM).<br>
<br>
The problem really is not what is in compiler_support.h, but the fact that the declaration in process.h is missing __INLINE__ (if you'll notice, all of the other declarations have them). What I've done previously is to create a local copy of process.h, add the __INLINE__ and then put that file in my include path ahead of the real one.<br>
<br>
I should really create a proper system-wide work-around for this, but I've not yet.<br>
<br>
 -Hal<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
> From: "Sebastien Boisvert" <<a href="mailto:boisvert@anl.gov">boisvert@anl.gov</a>><br>
> To: <a href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a><br>
> Sent: Friday, October 10, 2014 2:09:35 PM<br>
> Subject: [Llvm-bgq-discuss] Compiling apps on Cetus with clang<br>
><br>
><br>
><br>
> I have set +mpiwrapper-bgclang in my ~/.soft<br>
><br>
> Then I ran 'resoft'.<br>
><br>
> My build script is:<br>
><br>
> [boisvert@cetuslac1 biosal]$ cat<br>
> scripts/IBM_Blue_Gene_Q/build-spate-clang.sh<br>
> #!/bin/bash<br>
><br>
> # on Cetus:<br>
> # 1. edit ~/.soft<br>
> # 2. run 'resoft'<br>
><br>
> CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "<br>
> CFLAGS="$CFLAGS -I/soft/libraries/alcf/current/xl/ZLIB/include"<br>
> LDFLAGS="-L/soft/libraries/alcf/current/xl/ZLIB/lib -lm -lz"<br>
><br>
> make clean<br>
> make -j 8 CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \<br>
>     applications/spate_metagenome_assembler/spate<br>
><br>
><br>
> I am getting this error:<br>
><br>
><br>
><br>
><br>
><br>
> Clang 3.6.0<br>
> "clang version 3.6.0 (trunk)"<br>
> CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "<br>
><br>
> /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk/process_impl.h:132:10:<br>
> error: static declaration of 'Kernel_GetJobID' follows non-static<br>
> declaration<br>
><br>
><br>
> Obviously, I am not the author of process_impl.h.<br>
><br>
> The line 132 is:<br>
><br>
> __INLINE__<br>
> uint64_t Kernel_GetJobID()<br>
> {<br>
>    return CNK_SPI_SYSCALL_0(GETJOBID);<br>
> }<br>
><br>
><br>
> The file /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/process.h<br>
> contains the prototype:<br>
><br>
> /*! \brief Returns the JobID of the currently active job<br>
>  *<br>
>  * \return job identifier<br>
>  */<br>
> uint64_t Kernel_GetJobID();<br>
><br>
><br>
> I am not sure what is the problem. I suppose that it should also be<br>
> __INLINE__  (whatever this is) in process.h.<br>
><br>
><br>
> I digged a little and __INLINE__ is defined in<br>
> /bgsys/drivers/V1R2M2/ppc64/hwi/include/common/compiler_support.h at<br>
> line 28:<br>
><br>
> #ifndef __INLINE__<br>
> #ifdef __llvm__<br>
> #define __INLINE__ static inline<br>
> #else<br>
> #define __INLINE__ extern inline __attribute__((always_inline))<br>
> #endif<br>
> #endif<br>
><br>
><br>
> So basically this is broken because a function can not be not static<br>
> (in process.h) and static (process_impl.h) at the same time.<br>
><br>
> The obvious workaround here is to fix the broken compiler_support.h.<br>
><br>
><br>
><br>
> Is there a (easy) of solving this (without having to re-root the<br>
> whole V1R2M2 tree !) ?<br>
><br>
> _______________________________________________<br>
> llvm-bgq-discuss mailing list<br>
> <a href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a><br>
> <a href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss" target="_blank">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-bgq-discuss mailing list<br>
<a href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a><br>
<a href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss" target="_blank">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a><br>
</div></div></blockquote></div><br></div>