[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Building issue with the pgi and the cray compiler from version
From: |
Jacob Weismann Poulsen |
Subject: |
[Bug-gsl] Building issue with the pgi and the cray compiler from version 1.12 and onwards |
Date: |
Mon, 03 May 2010 16:08:47 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Hello Guys
First of all, thanks for your efforts on GSL. The other day I was asked
to help building
GSL on our cray-XT5 system and it was straightforward for 3 (gnu, intel and
pathscale) out of 5 compilers (pgi and cray) that I tried. All builds
were done like:
CC=cc CXX=CC ./configure --disable-shared --enable-static
Now, for the PGI and the Cray compiler, there was a problem with multiple
definitions of the many inlined functions, e.g.
gsl_rng_uniform, gsl_rng_get, gsl_rng_pos,...
address@hidden:~/gsl-1.14-cce/gsl-1.14> nm ./.libs/libgsl.a|grep
'gsl_rng_uniform$'|wc -l
22
address@hidden:~/gsl-1.14-cce/gsl-1.14>
I noticed that the inlining stuff emerged when you went from version 1.11 to
1.12, cf. diff gsl-1.11/configure.ac ~/gsl_issues/pgi/gsl-1.12/configure.ac
below.
Moreover, I found that gsl-1.11 build fine for all 5 compilers whereas
1.12 and 1.14
failed for PGI and CRAY (I assume that 1.13 would fail too, but I
haven't tried it).
One can force the build of 1.12 and 1.14 by doing say
make "LINK=\$(LIBTOOL) --tag=CC \$(AM_LIBTOOLFLAGS) \$(LIBTOOLFLAGS)
--mode=link \$(CCLD) -Xlinker "-Wl,--allow-multiple-definition"
\$(AM_CFLAGS) \$(CFLAGS) \$(AM_LDFLAGS) \$(LDFLAGS) -o \$@"
but some of the checks (not all) that one can do with
make "LINK=\$(LIBTOOL) --tag=CC \$(AM_LIBTOOLFLAGS) \$(LIBTOOLFLAGS)
--mode=link \$(CCLD) -Xlinker "-Wl,--allow-multiple-definition"
\$(AM_CFLAGS) \$(CFLAGS) \$(AM_LDFLAGS) \$(LDFLAGS) -o \$@" check
fails. Thus, this doesn't seem to be the way to go. I tried to google
this but
wasn't able to find a work-around. I found
http://lists.gnu.org/archive/html/bug-gsl/2009-08/msg00001.html
which seems to address the same issue. The work-around mentioned in the
install
file and mentioned in the reply to the thread above doesn't work. I tried:
C=cc CXX=CC CFLAGS="-DGSL_C99_INLINE" CXXFLAGS="-DGSL_C99_INLINE"
./configure --disable-shared --enable-static
make
for both compilers and the situation was the same as without the
preprocessor flags.
I can try to dig further into this but before doing so, I would
appreciate any comments
that you may have on this. Thanks a lot in advance,
Cheers, Jacob
PS! compiler versions
address@hidden:~/gsl_issues/CCE/gsl-1.12> cc -V
/opt/cray/xt-asyncpe/3.8/bin/cc: INFO: native target is being used
Cray C++ : Version 7.2.2 Mon May 03, 2010 14:02:48
address@hidden:~/gsl_issues/CCE/gsl-1.12>
address@hidden:~/gsl_issues/pgi/gsl-1.14> cc -V
/opt/cray/xt-asyncpe/3.8/bin/cc: INFO: native target is being used
pgcc 10.3-0 64-bit target on x86-64 Linux -tp k8-64e
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
/usr/lib64/crt1.o: In function `_start':
init.c:(.text+0x20): undefined reference to `main'
address@hidden:~/gsl_issues/pgi/gsl-1.14>
PPS! address@hidden:~/gsl_issues/pgi> diff gsl-1.11/configure.ac
~/gsl_issues/pgi/gsl-1.12/configure.ac
3c3
< AC_INIT([gsl],[1.11])
---
> AC_INIT([gsl],[1.12])
25a26
> dnl gsl-1.12 libgsl 13:0:13 libgslcblas 0:0:0
46c47
< GSL_CURRENT=12
---
> GSL_CURRENT=13
48c49
< GSL_AGE=12
---
> GSL_AGE=13
99c100
< AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
---
> AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline,
107a109,121
> else
> AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline,
> [ac_cv_c_c99inline=no
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef __GNUC_STDC_INLINE__
> inline double foo(double x);
> inline double foo(double x) { return x + 1.0 ; };
> #endif]],
> [[ foo(1.0) ]])],[ac_cv_c_c99inline="yes"],[])
> ])
>
> if test "$ac_cv_c_c99inline" != no ; then
> AC_DEFINE(HAVE_INLINE,[],[Define if you have inline])
> fi
314,315c328,334
< ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0);
]])],[ac_cv_c_fpu_sse="yes"])
< ])
---
> ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0);
> ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <stdlib.h>
> #define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m"
(*&cw_sse))
> ]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0);
> ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"])
> ])])
>
address@hidden:~/gsl_issues/pgi>
--
Jacob Weismann Poulsen <address@hidden>
Fingerprint: 9315 DC43 D2E4 4F70 3AA8 F8F0 9DA0 B765 F5C8 7D26
- [Bug-gsl] Building issue with the pgi and the cray compiler from version 1.12 and onwards,
Jacob Weismann Poulsen <=