[Trilinos-Users] XLC compilation in Mare Nostrum

juanpere at ac.upc.edu juanpere at ac.upc.edu
Fri Feb 25 16:40:52 MST 2011


Hello,

First, I want to remark that if this is not the correct place to
present my problem do not fear to tell me where I must to place it.
Pitifully, this mail might be a bit long, I think.

I'm migrating an application that uses Trilinos libraries into Mare
Nostrum (a supercomputer located in Barcelona, Spain). Fortunately,
with GCC there was not any big problem to worry about and Trilinos
was successfully installed in the machine.

However, I want to improve the performance in time of the 
application. Before take a try with Trilinos, we took BLAS library
and compiled it with XLC (the IBM compiler). This action got an
speed-up of about 1.3x (30% less time execution).

So, we proved to compile Trilinos also with XLC because the speed-up
could be really something.

We noted that CMake is only prepared for GCC but XLC has 2 masks that
"emules" GCC called gxlc and gxlc++ (instead of gcc and g++). These
masks changes GCC flags into the correct XLC flags, and we configured
this in the CMakeLists.txt file.

The problem begins just here.

XLC has a bug in certain casting situations. In Trilinos case, we
found this bug in file
trilinos-10.2.1-Source/packages/epetra/src/Epetra_C_wrappers.cpp

IBM says the solution is, basically, "change your code"
(http://www-01.ibm.com/support/docview.wss?uid=swg1LI71159). I
changed the code and do manual casting (using memcopy) into temporal
variables because they are pointers. My question is: is this correct?

Next problem is this:
"/trilinos-10.2.1-Source/packages/tpetra/inout/Tpetra_MatrixIO.cpp",
line 214.15: 1540-0403 (S) "ind" is already defined

... and also...

"/home/bsc15/bsc15245/ trilinos-10.2.1-Source/packages
/tpetra/inout/Tpetra_MatrixIO.cpp", line 249.18: 1540-0400 (S) "val"
has a conflicting declaration

This is really a good error because XLC is being more strict than
GCC. As a solution, I changed the variables names inside of loops
that were repeated. Same question again: is this correct?

The third important problem is:
"/opt/ibmcmp/vacpp/10.1/include/stdlib.h", line 22.14: 1540-0400 (S)
"abs(int)" has a conflicting declaration.
"/home/bsc15/bsc15245/trilinos-10.2.1-Source/packages/epetra/src/Epetra_ConfigDefs.h",
line 129.1: 1540-0424 (I) "abs" is declared on line 129 of
"/home/bsc15/bsc15245/trilinos-10.2.1-Source/packages/epetra/src/Epetra_ConfigDefs.h"

This is also because XLC is more strict. I commented Trilinos line in
order of Trilinos takes standard library, so: this should be correct?

And here the problem I cannot solve by myself:
"/home/bsc15/bsc15245/trilinos-10.2.1-Source/packages/thyra/src/interfaces/operator_vector/fundamental/Thyra_VectorSpaceBase_decl.hpp",
line 545.37: 1540-0416 (S) "createMember" cannot be declared because
its name has already been used.
"/home/bsc15/bsc15245/trilinos-10.2.1-Source/packages/thyra/src/interfaces/operator_vector/fundamental/Thyra_VectorSpaceBase_decl.hpp",
line 468.3: 1540-0426 (I) The name "createMember" is used on line 468
of
"/home/bsc15/bsc15245/trilinos-10.2.1-Source/packages/thyra/src/interfaces/operator_vector/fundamental/Thyra_VectorSpaceBase_decl.hpp"

I googled a little bit and found IBM detection of the problem and
possible solution
(http://www-01.ibm.com/support/docview.wss?uid=swg1IY15197), but I
fear I don't know what I am supposed to change. It seems that GCC
changes automatically the names, but XLC wants the code without any
duplicate name because it is stricter. Could be possible to ask for
your help?

I hope this mail won't cause any big inconvenience to you.

Sincerely,
Edgar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20110226/86b74ed2/attachment-0001.html 


More information about the Trilinos-Users mailing list