Compilation with Portland compiler
Hi guys,
anyone knows how the set the compiler explicitly from gcc to pgcc? I tried -DCMAKE_
CMake Warning:
Manually-
CMAKE_
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
|
#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:/
>
> Hi guys,
>
> anyone knows how the set the compiler explicitly from gcc to pgcc? I tried -DCMAKE_
>
> 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:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
Revision history for this message
|
#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/
$export CXX=/opt/
$ cmake -DINSTALL_
-- 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/
-- Check for working C compiler: /opt/pgi/
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/pgi/
-- Check for working CXX compiler: /opt/pgi/
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonLibs: /usr/lib64/
-- Found PythonInterp: /usr/bin/python (found version "2.6.6")
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_
-- Performing Test OpenMP_
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_
-- Performing Test OpenMP_
-- 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-
-- Looking for XOpenDisplay in /usr/lib64/
-- Looking for XOpenDisplay in /usr/lib64/
-- 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/
-- Found OpenGL: /usr/lib64/libGL.so
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GL2PS: /usr/lib64/
-- Found CGAL: /usr/include/CGAL, /usr/lib64/
-- Found NumPy: version "1.4.1" /usr/lib64/
-- 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/
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Found BZip2: /usr/lib64/
-- Looking for BZ2_bzCompressInit in /usr/lib64/
-- Looking for BZ2_bzCompressInit in /usr/lib64/
-- 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/
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - found
-- Found GTS
-- GMP libs: /usr/lib64/
-- Found GMP: /usr/include
-- GMP libs: /usr/lib64/
-- 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/
-- Suffix is set to -2014-01-
-- LIBRARY_OUTPUT_PATH is set to lib64
-- runtimePREFIX is set to /home/kt748/
-- 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/
-- =======
-- 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/
$ 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/
[ 1%] Building CXX object CMakeFiles/
Building CXX object py/CMakeFiles/
[ 2%] Building CXX object py/CMakeFiles/
[ 2%] Building C object py/CMakeFiles/
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [py/CMakeFiles/
make[1]: *** [py/CMakeFiles/
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/
make[1]: *** [CMakeFiles/
make[2]: *** [py/CMakeFiles/
make[1]: *** [py/CMakeFiles/
[ 3%] [ 3%] [ 4%] Building C object py/CMakeFiles/
Building C object py/CMakeFiles/
Building C object py/CMakeFiles/
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [py/CMakeFiles/
make[1]: *** [py/CMakeFiles/
[ 5%] Building C object py/CMakeFiles/
[ 5%] Building C object py/CMakeFiles/
[ 6%] Building C object py/CMakeFiles/
[ 6%] [ 7%] Building C object py/CMakeFiles/
Building C object py/CMakeFiles/
[ 7%] Building C object py/CMakeFiles/
[ 8%] Building CXX object CMakeFiles/
[ 8%] Building CXX object CMakeFiles/
[ 9%] Building CXX object CMakeFiles/
[ 9%] Building CXX object CMakeFiles/
pgc++-Error-Unknown switch: -frounding-math
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/
make[2]: *** Waiting for unfinished jobs....
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/
pgc++-Error-Unknown switch: -frounding-math
make[2]: *** [CMakeFiles/
make[2]: *** [CMakeFiles/
make[1]: *** [CMakeFiles/
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
|
#3 |
Hi Anton,
it seems that the problem is with CGAL:
trunk/cMake/
SET(CGAL_
So I did:
$cmake -DINSTALL_
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
|
#4 |
Hi Klaus,
2014-03-03 2:11 GMT+01:00 Klaus Thoeni <email address hidden>:
> $cmake -DINSTALL_
> git/master_
> -DCMAKE_
> -DCMAKE_
>
> 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
|
#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_
I added as well -DENABLE_
...
-- =======
-- 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/
return __builtin_
^
detected during:
Stuck again..
Thanks,
Klaus
Revision history for this message
|
#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://
Anton
2014-03-03 8:06 GMT+01:00 Klaus Thoeni <<email address hidden>
>:
> Question #244322 on Yade changed:
> https:/
>
> 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_
> git/master_
> -DENABLE_
> -DCMAKE_
> -DCMAKE_
> -DCMAKE_
>
> I added as well -DENABLE_
> 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/
> line 519: error:
> identifier "__builtin_isinf" is undefined
> return __builtin_
> ^
> detected during:
> instantiation of
>
> "__gnu_
> e, int>::__type std::isinf(_Tp) [with _Tp=double]" at
> line 385 of
>
> "/usr/include/
> "
> instantiation of "bool boost::
> boost::
> at
> line 451 of
>
> "/usr/include/
> "
> instantiation of "bool boost::
> at
> line 769 of "/usr/include/
> instantiation of "bool boost::
> CharT
> *&, const T &) [with CharT=char, T=double]" at line
> 1183
> of "/usr/include/
> instantiation of "bool
> boost::
> Traits,
> RequiresStringb
> CharT=char, Traits=
> RequiresStringb
> "/usr/include/
> instantiation of "bool
> boost::
> Traits,
> RequiresStringb
> CharT=char, Traits=
> RequiresStringb
> "/usr/include/
> instantiation of "Target
> boost::
> Source>
> Target=std::string, Source=Real]" at line 1924 of
> "/usr/include/
> instantiation of "Target
> boost::
> Source &) [with Target=std::string, Source=Real]" at
> line 46 of
>
> "/home/
> 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:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#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/
Building CXX object CMakeFiles/
[ 1%] Building C object py/CMakeFiles/
"/usr/include/
#define _GNU_SOURCE 1
^
[ 2%] Building C object py/CMakeFiles/
"/usr/include/
#define _GNU_SOURCE 1
^
[ 3%] Building CXX object CMakeFiles/
[ 3%] Building C object py/CMakeFiles/
party/pygts-
[ 4%] Building C object py/CMakeFiles/
party/pygts-
[ 5%] Building C object py/CMakeFiles/
party/pygts-
[ 5%] Building C object py/CMakeFiles/
party/pygts-
[ 6%] Building C object py/CMakeFiles/
party/pygts-
1 error detected in the compilation of "/home/kt748/YADE-
git/master_
make[2]: *** [py/CMakeFiles/
Error 2
make[1]: *** [py/CMakeFiles/
make[1]: *** Waiting for unfinished jobs....
[ 6%] Building C object py/CMakeFiles/
party/pygts-
[ 7%] Building CXX object CMakeFiles/
[ 7%] Building CXX object CMakeFiles/
[ 8%] Building C object py/CMakeFiles/
party/pygts-
"/usr/include/
#define _GNU_SOURCE 1
^
"/usr/include/
#define _GNU_SOURCE 1
^
[ 9%] Building C object py/CMakeFiles/
party/pygts-
Linking C shared library lib64/_gts.so
IPA inhibited: no main routine
[ 9%] Built target _gts
[ 10%] Building CXX object CMakeFiles/
"/usr/include/
#define _GNU_SOURCE 1
^
"/home/
error:
invalid redeclaration of type name "Interaction" (declared at line
14 of "/home/
class Interaction: public Serializable{
^
"/home/
error:
function "CreateSharedIn
REGISTER_
^
"/home/
error:
function "CreateInteraction" has already been defined
REGISTER_
^
"/home/
error:
function "CreatePureCust
REGISTER_
^
"/home/
error:
variable "registeredInte
REGISTER_
^
1 error detected in the compilation of "/home/kt748/YADE-
git/master_
make[2]: *** [CMakeFiles/
make[2]: *** Waiting for unfinished jobs....
1 error detected in the compilation of "/home/kt748/YADE-
git/master_
make[2]: *** [CMakeFiles/
make[1]: *** [CMakeFiles/
1 error detected in the compilation of "/home/kt748/YADE-
git/master_
make[2]: *** [CMakeFiles/
6 errors detected in the compilation of "/home/kt748/YADE-
git/master_
make[2]: *** [CMakeFiles/
make[1]: *** [CMakeFiles/
make: *** [all] Error 2
Revision history for this message
|
#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:/
>
> 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/
> Building CXX object CMakeFiles/
> [ 1%] Building C object
> py/CMakeFiles/
> "/usr/include/
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 2%] Building C object
> py/CMakeFiles/
> "/usr/include/
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 3%] Building CXX object CMakeFiles/
> [ 3%] Building C object py/CMakeFiles/
> party/pygts-
> [ 4%] Building C object py/CMakeFiles/
> party/pygts-
> [ 5%] Building C object py/CMakeFiles/
> party/pygts-
> [ 5%] Building C object py/CMakeFiles/
> party/pygts-
> [ 6%] Building C object py/CMakeFiles/
> party/pygts-
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_
> make[2]: *** [py/CMakeFiles/
> Error 2
> make[1]: *** [py/CMakeFiles/
> make[1]: *** Waiting for unfinished jobs....
> [ 6%] Building C object py/CMakeFiles/
> party/pygts-
> [ 7%] Building CXX object CMakeFiles/
> [ 7%] Building CXX object CMakeFiles/
> [ 8%] Building C object py/CMakeFiles/
> party/pygts-0.3.1in Yade/surface.c.o
> "/usr/include/
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> "/usr/include/
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> [ 9%] Building C object py/CMakeFiles/
> party/pygts-
> Linking C shared library lib64/_gts.so
> IPA inhibited: no main routine
> [ 9%] Built target _gts
> [ 10%] Building CXX object CMakeFiles/
> "/usr/include/
> predefined; attempted redefinition ignored
> #define _GNU_SOURCE 1
> ^
>
> "/home/
> error:
> invalid redeclaration of type name "Interaction" (declared at
> line
> 14 of
> "/home/
> class Interaction: public Serializable{
> ^
>
> "/home/
> error:
> function "CreateSharedIn
> REGISTER_
> ^
>
> "/home/
> error:
> function "CreateInteraction" has already been defined
> REGISTER_
> ^
>
> "/home/
> error:
> function "CreatePureCust
> REGISTER_
> ^
>
> "/home/
> error:
> variable "registeredInte
> REGISTER_
> ^
>
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_
> make[2]: *** [CMakeFiles/
> make[2]: *** Waiting for unfinished jobs....
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_
> make[2]: *** [CMakeFiles/
> make[1]: *** [CMakeFiles/
> 1 error detected in the compilation of "/home/kt748/YADE-
> git/master_
> make[2]: *** [CMakeFiles/
> 6 errors detected in the compilation of "/home/kt748/YADE-
> git/master_
> make[2]: *** [CMakeFiles/
> make[1]: *** [CMakeFiles/
> 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:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Can you help with this problem?
Provide an answer of your own, or ask Klaus Thoeni for more information if necessary.