[Trilinos-Users] Compilation of Trilinos 10 on BlueGene/P
John R Cary
cary at colorado.edu
Wed Oct 27 08:47:33 MDT 2010
I thought I sent the patch for this yesterday. Below.
Also another fix that you may need.
To Trilinos folks - should one use 'using'? I can cause
problems. Also the patch to Tpetra_MatrixIO.cpp is my best
guess.
John Cary
numbersix.cary$ cat trilinos-10.6.0.patch
diff -ruN ./packages/epetra/src/Epetra_ConfigDefs.h
../trilinos-10.6.0-new/packages/epetra/src/Epetra_ConfigDefs.h
--- ./packages/epetra/src/Epetra_ConfigDefs.h 2010-09-29
17:37:34.000000000 -0500
+++ ../trilinos-10.6.0-new/packages/epetra/src/Epetra_ConfigDefs.h
2010-10-13 04:29:37.143652046 -0500
@@ -138,7 +138,7 @@
using std::fabs;
using std::atoi;
using std::atof;
-using std::abs;
+// using std::abs;
using std::pow;
using std::sqrt;
using std::asin;
diff -ruN ./packages/tpetra/inout/Tpetra_MatrixIO.cpp
../trilinos-10.6.0-new/packages/tpetra/inout/Tpetra_MatrixIO.cpp
--- ./packages/tpetra/inout/Tpetra_MatrixIO.cpp 2010-09-29
17:38:32.000000000 -0500
+++ ../trilinos-10.6.0-new/packages/tpetra/inout/Tpetra_MatrixIO.cpp
2010-10-13 04:37:52.170664433 -0500
@@ -210,15 +210,15 @@
char *linePtr = lineBuf;
for (int ind=0; ind < indsPerLine; ++ind) {
if (indicesRead == numNZ) break;
- int ind;
+ int iind;
// terminate the string at the end of the current ind block,
saving the character in that location
std::swap(NullSub,linePtr[indWidth]);
// read the ind
- std::sscanf(linePtr, "%d", &ind);
+ std::sscanf(linePtr, "%d", &iind);
// put the saved character back, and put the '\0' back into
NullSub for use again
std::swap(NullSub,linePtr[indWidth]);
linePtr += indWidth;
- rowInds[indicesRead++] = ind;
+ rowInds[indicesRead++] = iind;
}
}
TEST_FOR_EXCEPT(indicesRead != numNZ);
@@ -245,15 +245,15 @@
char *linePtr = lineBuf;
for (int val=0; val < valsPerLine; ++val) {
if (valsRead == totalNumVals) break;
- double val;
+ double dval;
// terminate the string at the end of the current val block,
saving the character in that location
std::swap(NullSub,linePtr[valWidth]);
// read the val
- std::sscanf(linePtr, "%le", &val);
+ std::sscanf(linePtr, "%le", &dval);
// put the saved character back, and put the '\0' back into
NullSub for use again
std::swap(NullSub,linePtr[valWidth]);
linePtr += valWidth;
- vals[valsRead++] = val;
+ vals[valsRead++] = dval;
}
}
TEST_FOR_EXCEPT(valsRead != totalNumVals);
On 10/27/10 7:39 AM, Radu Popescu wrote:
> Hello,
>
> I've made some progress with the BlueGene. I was trying to use a cmake
> toolchain file, for cross compilation, as per the instructions on the
> cmake wiki, but that just completely confused cmake.
>
> I've managed to bypass the cross compilation toolchain file by makeing
> symlinks to the mpi wrappers for the IBM compilers and making sure the
> location of these symlinks is the first location in the PATH env
> variable.
>
> During configuration, Trilinos picks up these compilers by default and
> configurations completes successfully. However, during compilation I
> am getting a new error:
> It seems that the std::abs(int) functions has multiple definitions,
> one in<cmath> and one in<cstdlib>. The exact error message is:
>
> "abs" is declared on line 141 of
> "/home/rpopescu/workspace/trilinos/trilinos-10.6.0-Source/packages/epetra/src/Epetra_ConfigDefs.h"
>
> I've tried passing the "-Wl,-allow-multiple-definition" flag, but it
> doesn't seem to work. Maybe I'm not doing it correctly. Also, is it
> normal
> that although the XL compilers are used, ld is still the tool called
> for linking.
>
> Regards,
> Radu
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
More information about the Trilinos-Users
mailing list