[Llvm-bgq-discuss] Compiling apps on Cetus with clang

Mark Abraham mark.j.abraham at gmail.com
Fri Oct 10 14:27:35 CDT 2014


Hi,

I used
https://github.com/gromacs/gromacs/blob/release-5-0/src/gromacs/gmxlib/network.c#L205
in Gromacs, without apparent ill effect

Mark

On Fri, Oct 10, 2014 at 9:13 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Hi,
>
> Unfortunately, this is a known problem (and is already part of a
> Clang-compatibility PMR with IBM).
>
> 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.
>
> I should really create a proper system-wide work-around for this, but I've
> not yet.
>
>  -Hal
>
> ----- Original Message -----
> > From: "Sebastien Boisvert" <boisvert at anl.gov>
> > To: llvm-bgq-discuss at lists.alcf.anl.gov
> > Sent: Friday, October 10, 2014 2:09:35 PM
> > Subject: [Llvm-bgq-discuss] Compiling apps on Cetus with clang
> >
> >
> >
> > I have set +mpiwrapper-bgclang in my ~/.soft
> >
> > Then I ran 'resoft'.
> >
> > My build script is:
> >
> > [boisvert at cetuslac1 biosal]$ cat
> > scripts/IBM_Blue_Gene_Q/build-spate-clang.sh
> > #!/bin/bash
> >
> > # on Cetus:
> > # 1. edit ~/.soft
> > # 2. run 'resoft'
> >
> > CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "
> > CFLAGS="$CFLAGS -I/soft/libraries/alcf/current/xl/ZLIB/include"
> > LDFLAGS="-L/soft/libraries/alcf/current/xl/ZLIB/lib -lm -lz"
> >
> > make clean
> > make -j 8 CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
> >     applications/spate_metagenome_assembler/spate
> >
> >
> > I am getting this error:
> >
> >
> >
> >
> >
> > Clang 3.6.0
> > "clang version 3.6.0 (trunk)"
> > CFLAGS="-I. -g -O3 -DTHORIUM_DEBUG "
> >
> > /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk/process_impl.h:132:10:
> > error: static declaration of 'Kernel_GetJobID' follows non-static
> > declaration
> >
> >
> > Obviously, I am not the author of process_impl.h.
> >
> > The line 132 is:
> >
> > __INLINE__
> > uint64_t Kernel_GetJobID()
> > {
> >    return CNK_SPI_SYSCALL_0(GETJOBID);
> > }
> >
> >
> > The file /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/process.h
> > contains the prototype:
> >
> > /*! \brief Returns the JobID of the currently active job
> >  *
> >  * \return job identifier
> >  */
> > uint64_t Kernel_GetJobID();
> >
> >
> > I am not sure what is the problem. I suppose that it should also be
> > __INLINE__  (whatever this is) in process.h.
> >
> >
> > I digged a little and __INLINE__ is defined in
> > /bgsys/drivers/V1R2M2/ppc64/hwi/include/common/compiler_support.h at
> > line 28:
> >
> > #ifndef __INLINE__
> > #ifdef __llvm__
> > #define __INLINE__ static inline
> > #else
> > #define __INLINE__ extern inline __attribute__((always_inline))
> > #endif
> > #endif
> >
> >
> > So basically this is broken because a function can not be not static
> > (in process.h) and static (process_impl.h) at the same time.
> >
> > The obvious workaround here is to fix the broken compiler_support.h.
> >
> >
> >
> > Is there a (easy) of solving this (without having to re-root the
> > whole V1R2M2 tree !) ?
> >
> > _______________________________________________
> > llvm-bgq-discuss mailing list
> > llvm-bgq-discuss at lists.alcf.anl.gov
> > https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> >
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20141010/223552ca/attachment-0001.html>


More information about the llvm-bgq-discuss mailing list