Compilation with Portland compiler

Asked by Klaus Thoeni

Hi guys,

anyone knows how the set the compiler explicitly from gcc to pgcc? I tried -DCMAKE_CC_COMPILER=pgcc but I get:

CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CC_COMPILER

Any idea?

Klaus

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi Klaus,

please, try to set corresponding environmental variables
like described on installation page for clang compiler. Should
work.

Anton

2014-02-21 3:36 GMT+01:00 Klaus Thoeni <email address hidden>:
> New question #244322 on Yade:
> https://answers.launchpad.net/yade/+question/244322
>
> Hi guys,
>
> anyone knows how the set the compiler explicitly from gcc to pgcc? I tried -DCMAKE_CC_COMPILER=pgcc but I get:
>
> CMake Warning:
> Manually-specified variables were not used by the project:
>
> CMAKE_CC_COMPILER
>
> Any idea?
>
> Klaus
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#2

Hi Anton,

please can you have a look at the output below [1]? CMake is working with one minor (pgcc-Error-Unknown switch: -dumpversion) error. However, compilation fails. I am guessing because of some flags which are not recognised by pgc++. Any idea?

Thanks,
Klaus

[1]
$export CC=/opt/pgi/linux86-64/13.3/bin/pgcc
$export CXX=/opt/pgi/linux86-64/13.3/bin/pgc++
$ cmake -DINSTALL_PREFIX=~/YADE-git/master_AMD/install ~/YADE-git/master_AMD/trunk -DENABLE_GUI=OFF -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgcc -DCMAKE_CXX_FLAGS='-tp=bulldozer-64'
-- The C compiler identification is PGI 13.3.0
-- The CXX compiler identification is PGI 13.3.0
-- Check for working C compiler: /opt/pgi/linux86-64/13.3/bin/pgcc
-- Check for working C compiler: /opt/pgi/linux86-64/13.3/bin/pgcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/pgi/linux86-64/13.3/bin/pgc++
-- Check for working CXX compiler: /opt/pgi/linux86-64/13.3/bin/pgc++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found version "2.7.4")
-- Found PythonInterp: /usr/bin/python (found version "2.6.6")
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -mp
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.6.2")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- Version is set to 2014-01-25.git-22c2441
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GL2PS: /usr/lib64/libgl2ps.so
-- Found CGAL: /usr/include/CGAL, /usr/lib64/libCGAL.so
-- Found NumPy: version "1.4.1" /usr/lib64/python2.6/site-packages/numpy/core/include
-- Found Loki: /usr/include
pgcc-Error-Unknown switch: -dumpversion
-- Boost version: 1.48.0
-- Found the following Boost libraries:
-- python
-- thread
-- date_time
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- Boost_VERSION: 104800
-- Boost_LIB_VERSION: 1_48
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib64/libboost_python-mt.so/usr/lib64/libboost_thread-mt.so/usr/lib64/libboost_date_time-mt.so/usr/lib64/libboost_filesystem-mt.so/usr/lib64/libboost_iostreams-mt.so/usr/lib64/libboost_regex-mt.so/usr/lib64/libboost_serialization-mt.so/usr/lib64/libboost_system-mt.so
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.5")
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Found Eigen3
-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib64/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - found
-- Found GTS
-- GMP libs: /usr/lib64/libgmp.so /usr/lib64/libgmpxx.so
-- Found GMP: /usr/include
-- GMP libs: /usr/lib64/libgmp.so /usr/lib64/libgmpxx.so
-- Found CGAL
-- Could NOT find Cholmod (missing: CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY)
-- Could NOT find OpenBlas (missing: OPENBLAS_LIBRARY)
-- Could NOT find Metis (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Missing dependency for LINSOLV, disabled
-- Found GL2PS
Yade will be installed to /home/kt748/YADE-git/master_AMD/install
-- Suffix is set to -2014-01-25.git-22c2441
-- LIBRARY_OUTPUT_PATH is set to lib64
-- runtimePREFIX is set to /home/kt748/YADE-git/master_AMD/install
-- Could NOT find gts (missing: PY_gts)
-- Use embedded version of gts. Please, consider installing the corresponding package
-- Could NOT find minieigen (missing: PY_minieigen)
-- Use embedded version of minieigen. Please, consider installing the corresponding package
-- Found Tkinter: /usr/lib64/python2.6/lib-tk/Tkinter.pyc
-- ===========================================================
-- Yade configured with following features: Eigen3 VTK OpenMP GTS CGAL PFVflow GL2PS
-- Disabled features: GUI LinSolv
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kt748/YADE-git/master_AMD/build

$ make -j6
Scanning dependencies of target miniEigen
Scanning dependencies of target _gts
Scanning dependencies of target _polyhedra_utils
Scanning dependencies of target WeightedAverage2d
Scanning dependencies of target _packObb
Scanning dependencies of target yade
[ 0%] [ 1%] Building CXX object py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o
[ 1%] Building CXX object CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o
Building CXX object py/CMakeFiles/_packObb.dir/pack/_packObb.cpp.o
[ 2%] Building CXX object py/CMakeFiles/_polyhedra_utils.dir/_polyhedra_utils.cpp.o
[ 2%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/edge.c.o
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o] Error 1
make[1]: *** [py/CMakeFiles/WeightedAverage2d.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o] Error 1
make[1]: *** [CMakeFiles/miniEigen.dir/all] Error 2
make[2]: *** [py/CMakeFiles/_packObb.dir/pack/_packObb.cpp.o] Error 1
make[1]: *** [py/CMakeFiles/_packObb.dir/all] Error 2
[ 3%] [ 3%] [ 4%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/face.c.o
Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/object.c.o
Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/cleanup.c.o
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [py/CMakeFiles/_polyhedra_utils.dir/_polyhedra_utils.cpp.o] Error 1
make[1]: *** [py/CMakeFiles/_polyhedra_utils.dir/all] Error 2
[ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/vertex.c.o
[ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/triangle.c.o
[ 6%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/point.c.o
[ 6%] [ 7%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/pygts.c.o
Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/surface.c.o
[ 7%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/segment.c.o
[ 8%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o
[ 8%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o
[ 9%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o
[ 9%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/yade.dir/core/ThreadRunner.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/yade.dir/core/State.cpp.o] Error 1
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/yade.dir/core/Interaction.cpp.o] Error 1
make[2]: *** [CMakeFiles/yade.dir/core/Material.cpp.o] Error 1
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
Linking C shared library lib64/_gts.so
IPA inhibited: no main routine
[ 9%] Built target _gts
make: *** [all] Error 2

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#3

Hi Anton,

it seems that the problem is with CGAL:

trunk/cMake/FINDCGAL.cmake

SET(CGAL_DEFINITIONS -frounding-math)

So I did:

$cmake -DINSTALL_PREFIX=~/YADE-git/master_AMD/install ~/YADE-git/master_AMD/trunk -DENABLE_GUI=OFF -DENABLE_CGAL=OFF -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgcc -DCMAKE_CXX_FLAGS='-tp=bulldozer-64'

It tells me that CGAL is not enabled:
-- ===========================================================
-- Yade configured with following features: Eigen3 VTK OpenMP GTS CGAL PFVflow GL2PS
-- Disabled features: GUI LinSolv
-- Optimized build
-- ===========================================================

Shouldn't it be in the Disabled feature list?

Nevertheless, when compiling it looks good. The only warning I got is:

c++: unrecognized option '-tp=bulldozer-64'

I will try to run some tests.

Cheers
Klaus

Revision history for this message
Anton Gladky (gladky-anton) said :
#4

Hi Klaus,

2014-03-03 2:11 GMT+01:00 Klaus Thoeni <email address hidden>:
> $cmake -DINSTALL_PREFIX=~/YADE-git/master_AMD/install ~/YADE-
> git/master_AMD/trunk -DENABLE_GUI=OFF -DENABLE_CGAL=OFF
> -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgcc
> -DCMAKE_CXX_FLAGS='-tp=bulldozer-64'
>
> It tells me that CGAL is not enabled:
> -- ===========================================================
> -- Yade configured with following features: Eigen3 VTK OpenMP GTS CGAL PFVflow GL2PS
> -- Disabled features: GUI LinSolv
> -- Optimized build
> -- ===========================================================

> Shouldn't it be in the Disabled feature list?

It should. I do not know, why it is not. Need to check.

> Nevertheless, when compiling it looks good. The only warning I got is:
>
> c++: unrecognized option '-tp=bulldozer-64'

Hmm, why do you put this line in your cmake-step?

> I will try to run some tests.

Please, let us know, how it works.

Anton

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#5

Hi Anton,

it was still using c++ and not pgc++ and -tp=bulldozer-64 was passed to c++. I changed the cmake as follows:

cmake -DINSTALL_PREFIX=~/YADE-git/master_AMD/install ~/YADE-git/master_AMD/trunk -DENABLE_GUI=OFF -DENABLE_CGAL=OFF -DENABLE_PFVFLOW=OFF -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgcc -DCMAKE_CXX_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgc++ -DCMAKE_CXX_FLAGS='-tp=bulldozer-64'

I added as well -DENABLE_PFVFLOW=OFF and CGAL is now deactivated. The output shows that CGAl is deactivated but it doesn't show that PFVFLOW is deactivated:
...
-- ===========================================================
-- Yade configured with following features: Eigen3 VTK OpenMP GTS GL2PS
-- Disabled features: GUI CGAL LinSolv
-- Optimized build
-- ===========================================================
...

Well, the cmake works and pgcc and pgc++ are now used during compilation but copilation fails. There are plenty of warnings and one of the errors I get is:

"/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath", line 519: error:
          identifier "__builtin_isinf" is undefined
        return __builtin_isinf(__type(__f));
               ^
          detected during:
            instantiation of
                      "__gnu_cxx::__enable_if<std::__is_arithmetic<_Tp>::__valu
                      e, int>::__type std::isinf(_Tp) [with _Tp=double]" at
                      line 385 of
                      "/usr/include/boost/math/special_functions/fpclassify.hpp
                      "
            instantiation of "bool boost::math::detail::isinf_impl(T, const
                      boost::math::detail::native_tag &) [with T=double]" at
                      line 451 of
                      "/usr/include/boost/math/special_functions/fpclassify.hpp
                      "
            instantiation of "bool boost::math::isinf(T) [with T=double]" at
                      line 769 of "/usr/include/boost/lexical_cast.hpp"
            instantiation of "bool boost::detail::put_inf_nan(CharT *, CharT
                      *&, const T &) [with CharT=char, T=double]" at line 1183
                      of "/usr/include/boost/lexical_cast.hpp"
            instantiation of "bool
                      boost::detail::lexical_stream_limited_src<CharT, Traits,
                      RequiresStringbuffer>::shl_double(double, T *) [with
                      CharT=char, Traits=std::char_traits<char>,
                      RequiresStringbuffer=false, T=char]" at line 1299 of
                      "/usr/include/boost/lexical_cast.hpp"
            instantiation of "bool
                      boost::detail::lexical_stream_limited_src<CharT, Traits,
                      RequiresStringbuffer>::operator<<(double) [with
                      CharT=char, Traits=std::char_traits<char>,
                      RequiresStringbuffer=false]" at line 1757 of
                      "/usr/include/boost/lexical_cast.hpp"
            instantiation of "Target
                      boost::detail::lexical_cast_do_cast<Target,
                      Source>::lexical_cast_impl(const Source &) [with
                      Target=std::string, Source=Real]" at line 1924 of
                      "/usr/include/boost/lexical_cast.hpp"
            instantiation of "Target boost::lexical_cast<Target,Source>(const
                      Source &) [with Target=std::string, Source=Real]" at
                      line 46 of
                      "/home/kt748/YADE-git/master_AMD/trunk/py/mathWrap/miniEi
                      gen.cpp"

Stuck again..

Thanks,
Klaus

Revision history for this message
Anton Gladky (gladky-anton) said :
#6

Well, difficult to say. It can be even weak support/bug in this
compiler, which does not work with boost. Can you compile
boost itself with pgcc?

I have found something similar here [1] with Intel-compiler. And
suggested workaround to use additional flags -gcc-name=gcc-4.2
-gxx-name=g++-4.2. You can try.

What is the reason of using this compiler? Did you try with clang?

[1] http://software.intel.com/en-us/forums/topic/297833

Anton

2014-03-03 8:06 GMT+01:00 Klaus Thoeni <<email address hidden>
>:

> Question #244322 on Yade changed:
> https://answers.launchpad.net/yade/+question/244322
>
> Status: Answered => Open
>
> Klaus Thoeni is still having a problem:
> Hi Anton,
>
> it was still using c++ and not pgc++ and -tp=bulldozer-64 was passed to
> c++. I changed the cmake as follows:
>
> cmake -DINSTALL_PREFIX=~/YADE-git/master_AMD/install ~/YADE-
> git/master_AMD/trunk -DENABLE_GUI=OFF -DENABLE_CGAL=OFF
> -DENABLE_PFVFLOW=OFF
> -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgcc
> -DCMAKE_CXX_COMPILER=/opt/pgi/linux86-64/13.3/bin/pgc++
> -DCMAKE_CXX_FLAGS='-tp=bulldozer-64'
>
> I added as well -DENABLE_PFVFLOW=OFF and CGAL is now deactivated. The
> output shows that CGAl is deactivated but it doesn't show that PFVFLOW is
> deactivated:
> ...
> -- ===========================================================
> -- Yade configured with following features: Eigen3 VTK OpenMP GTS GL2PS
> -- Disabled features: GUI CGAL LinSolv
> -- Optimized build
> -- ===========================================================
> ...
>
> Well, the cmake works and pgcc and pgc++ are now used during compilation
> but copilation fails. There are plenty of warnings and one of the errors
> I get is:
>
> "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath",
> line 519: error:
> identifier "__builtin_isinf" is undefined
> return __builtin_isinf(__type(__f));
> ^
> detected during:
> instantiation of
>
> "__gnu_cxx::__enable_if<std::__is_arithmetic<_Tp>::__valu
> e, int>::__type std::isinf(_Tp) [with _Tp=double]" at
> line 385 of
>
> "/usr/include/boost/math/special_functions/fpclassify.hpp
> "
> instantiation of "bool boost::math::detail::isinf_impl(T, const
> boost::math::detail::native_tag &) [with T=double]"
> at
> line 451 of
>
> "/usr/include/boost/math/special_functions/fpclassify.hpp
> "
> instantiation of "bool boost::math::isinf(T) [with T=double]"
> at
> line 769 of "/usr/include/boost/lexical_cast.hpp"
> instantiation of "bool boost::detail::put_inf_nan(CharT *,
> CharT
> *&, const T &) [with CharT=char, T=double]" at line
> 1183
> of "/usr/include/boost/lexical_cast.hpp"
> instantiation of "bool
> boost::detail::lexical_stream_limited_src<CharT,
> Traits,
> RequiresStringbuffer>::shl_double(double, T *) [with
> CharT=char, Traits=std::char_traits<char>,
> RequiresStringbuffer=false, T=char]" at line 1299 of
> "/usr/include/boost/lexical_cast.hpp"
> instantiation of "bool
> boost::detail::lexical_stream_limited_src<CharT,
> Traits,
> RequiresStringbuffer>::operator<<(double) [with
> CharT=char, Traits=std::char_traits<char>,
> RequiresStringbuffer=false]" at line 1757 of
> "/usr/include/boost/lexical_cast.hpp"
> instantiation of "Target
> boost::detail::lexical_cast_do_cast<Target,
> Source>::lexical_cast_impl(const Source &) [with
> Target=std::string, Source=Real]" at line 1924 of
> "/usr/include/boost/lexical_cast.hpp"
> instantiation of "Target
> boost::lexical_cast<Target,Source>(const
> Source &) [with Target=std::string, Source=Real]" at
> line 46 of
>
> "/home/kt748/YADE-git/master_AMD/trunk/py/mathWrap/miniEi
> gen.cpp"
>
> Stuck again..
>
> Thanks,
> Klaus
>
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#7

Hi Anton,

there was a bug in the compiler and our IT guy updated the compiler. However, it is still not looking good [1].

We want to compile yade with pgcc because it has Opteron optimisation and our grid is full of AMD Opterons. We would expect that if compiled with pgcc it would run as fast as on the Intel machine.

However, it seems to be a pain in the ass.

Thanks,
Klaus

[1]
[kt748@rcglogin build]$ make -j4
Scanning dependencies of target miniEigen
Scanning dependencies of target WeightedAverage2d
Scanning dependencies of target _gts
Scanning dependencies of target yade
[ 0%] [ 1%] Building CXX object
py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o
Building CXX object CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o
[ 1%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/edge.c.o
"/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
          predefined; attempted redefinition ignored
  #define _GNU_SOURCE 1
          ^

[ 2%] Building C object py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/face.c.o
"/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
          predefined; attempted redefinition ignored
  #define _GNU_SOURCE 1
          ^

[ 3%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o
[ 3%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/object.c.o
[ 4%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/cleanup.c.o
[ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/vertex.c.o
[ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/triangle.c.o
[ 6%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/point.c.o
1 error detected in the compilation of "/home/kt748/YADE-
git/master_AMD/trunk/py/WeightedAverage2d.cpp".
make[2]: *** [py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o]
Error 2
make[1]: *** [py/CMakeFiles/WeightedAverage2d.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 6%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/pygts.c.o
[ 7%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o
[ 7%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o
[ 8%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/surface.c.o
"/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
          predefined; attempted redefinition ignored
  #define _GNU_SOURCE 1
          ^

"/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
          predefined; attempted redefinition ignored
  #define _GNU_SOURCE 1
          ^

[ 9%] Building C object py/CMakeFiles/_gts.dir/3rd-
party/pygts-0.3.1/segment.c.o
Linking C shared library lib64/_gts.so
IPA inhibited: no main routine
[ 9%] Built target _gts
[ 10%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o
"/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
          predefined; attempted redefinition ignored
  #define _GNU_SOURCE 1
          ^

"/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 14:
error:
          invalid redeclaration of type name "Interaction" (declared at line
          14 of "/home/kt748/YADE-git/master_AMD/trunk/core/Interaction.hpp")
  class Interaction: public Serializable{
        ^

"/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
error:
          function "CreateSharedInteraction" has already been defined
  REGISTER_SERIALIZABLE(Interaction);
  ^

"/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
error:
          function "CreateInteraction" has already been defined
  REGISTER_SERIALIZABLE(Interaction);
  ^

"/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
error:
          function "CreatePureCustomInteraction" has already been defined
  REGISTER_SERIALIZABLE(Interaction);
  ^

"/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
error:
          variable "registeredInteraction" has already been defined
  REGISTER_SERIALIZABLE(Interaction);
  ^

1 error detected in the compilation of "/home/kt748/YADE-
git/master_AMD/trunk/core/State.cpp".
make[2]: *** [CMakeFiles/yade.dir/core/State.cpp.o] Error 2
make[2]: *** Waiting for unfinished jobs....
1 error detected in the compilation of "/home/kt748/YADE-
git/master_AMD/trunk/py/mathWrap/miniEigen.cpp".
make[2]: *** [CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o] Error 2
make[1]: *** [CMakeFiles/miniEigen.dir/all] Error 2
1 error detected in the compilation of "/home/kt748/YADE-
git/master_AMD/trunk/core/Material.cpp".
make[2]: *** [CMakeFiles/yade.dir/core/Material.cpp.o] Error 2
6 errors detected in the compilation of "/home/kt748/YADE-
git/master_AMD/trunk/core/Interaction.cpp".
make[2]: *** [CMakeFiles/yade.dir/core/Interaction.cpp.o] Error 2
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
make: *** [all] Error 2

Revision history for this message
Anton Gladky (gladky-anton) said :
#8

My suggestions:

1. Try to disable all features and compile "clear" yade.
2. It seems, this compiler does not support "pragma once" directives.
So you need to replace all "pragmas" by '#ifndef and #endif'.

All is possible, but it can take a time

Cheers

Anton

2014-03-04 9:11 GMT+01:00 Klaus Thoeni <<email address hidden>
>:

> Question #244322 on Yade changed:
> https://answers.launchpad.net/yade/+question/244322
>
> Status: Answered => Open
>
> Klaus Thoeni is still having a problem:
> Hi Anton,
>
> there was a bug in the compiler and our IT guy updated the compiler.
> However, it is still not looking good [1].
>
> We want to compile yade with pgcc because it has Opteron optimisation
> and our grid is full of AMD Opterons. We would expect that if compiled
> with pgcc it would run as fast as on the Intel machine.
>
> However, it seems to be a pain in the ass.
>
> Thanks,
> Klaus
>
> [1]
> [kt748@rcglogin build]$ make -j4
> Scanning dependencies of target miniEigen
> Scanning dependencies of target WeightedAverage2d
> Scanning dependencies of target _gts
> Scanning dependencies of target yade
> [ 0%] [ 1%] Building CXX object
> py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o
> Building CXX object CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o
> [ 1%] Building C object
> py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/edge.c.o
> "/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 2%] Building C object
> py/CMakeFiles/_gts.dir/3rd-party/pygts-0.3.1/face.c.o
> "/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 3%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o
> [ 3%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/object.c.o
> [ 4%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/cleanup.c.o
> [ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/vertex.c.o
> [ 5%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/triangle.c.o
> [ 6%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/point.c.o
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_AMD/trunk/py/WeightedAverage2d.cpp".
> make[2]: *** [py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o]
> Error 2
> make[1]: *** [py/CMakeFiles/WeightedAverage2d.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
> [ 6%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/pygts.c.o
> [ 7%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o
> [ 7%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o
> [ 8%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1in Yade/surface.c.o
> "/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> "/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 9%] Building C object py/CMakeFiles/_gts.dir/3rd-
> party/pygts-0.3.1/segment.c.o
> Linking C shared library lib64/_gts.so
> IPA inhibited: no main routine
> [ 9%] Built target _gts
> [ 10%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o
> "/usr/include/python2.7/pyconfig-64.h", line 1160: error: "_GNU_SOURCE" is
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> "/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 14:
> error:
> invalid redeclaration of type name "Interaction" (declared at
> line
> 14 of
> "/home/kt748/YADE-git/master_AMD/trunk/core/Interaction.hpp")
> class Interaction: public Serializable{
> ^
>
> "/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
> error:
> function "CreateSharedInteraction" has already been defined
> REGISTER_SERIALIZABLE(Interaction);
> ^
>
> "/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
> error:
> function "CreateInteraction" has already been defined
> REGISTER_SERIALIZABLE(Interaction);
> ^
>
> "/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
> error:
> function "CreatePureCustomInteraction" has already been defined
> REGISTER_SERIALIZABLE(Interaction);
> ^
>
> "/home/kt748/YADE-git/master_AMD/build/yade/core/Interaction.hpp", line 68:
> error:
> variable "registeredInteraction" has already been defined
> REGISTER_SERIALIZABLE(Interaction);
> ^
>
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_AMD/trunk/core/State.cpp".
> make[2]: *** [CMakeFiles/yade.dir/core/State.cpp.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_AMD/trunk/py/mathWrap/miniEigen.cpp".
> make[2]: *** [CMakeFiles/miniEigen.dir/py/mathWrap/miniEigen.cpp.o] Error 2
> make[1]: *** [CMakeFiles/miniEigen.dir/all] Error 2
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_AMD/trunk/core/Material.cpp".
> make[2]: *** [CMakeFiles/yade.dir/core/Material.cpp.o] Error 2
> 6 errors detected in the compilation of "/home/kt748/YADE-
> git/master_AMD/trunk/core/Interaction.cpp".
> make[2]: *** [CMakeFiles/yade.dir/core/Interaction.cpp.o] Error 2
> make[1]: *** [CMakeFiles/yade.dir/all] Error 2
> make: *** [all] Error 2
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Klaus Thoeni for more information if necessary.

To post a message you must log in.