[Trilinos-Users] Errors while compiling Thyra_IfpackPreconditionerFactory.cpp

Bartlett, Roscoe A. bartlettra at ornl.gov
Thu Sep 6 15:47:27 MDT 2012


Rao,

I am at a loose.  I would have to be able to reproduce the problem myself and run the compiler, editor, etc. to track the problem down using lots of experiments.

Trilinos Users or Developers,

Anyone else ever see a problem like this?

-Ross

> -----Original Message-----
> From: Rao Garimella [mailto:rao at lanl.gov]
> Sent: Thursday, September 06, 2012 3:22 PM
> To: Bartlett, Roscoe A.
> Cc: trilinos-users at software.sandia.gov; Kurtis Nusbaum
> Subject: RE: [Trilinos-Users] Errors while compiling
> Thyra_IfpackPreconditionerFactory.cpp
> 
> Ross
> 
> I tried it with gcc 4.6.3 and still get the error. I tried modifying
> that statement in a bunch of different ways (including what you
> suggested) and still get the same error until I resorted to commenting
> out the test for exception. Then it goes on to the next error
> 
> In file included
> from /home/scratch/rao/trilinos-10.12.2-
> Source/packages/teuchos/src/Teuchos_PerformanceMonitorBase.hpp:54:0,
> 
> from /home/scratch/rao/trilinos-10.12.2-
> Source/packages/teuchos/src/Teuchos_TimeMonitor.hpp:67,
> 
> from /home/scratch/rao/trilinos-10.12.2-
> Source/packages/stratimikos/adapters/ifpack/src/Thyra_IfpackPrecondition
> erFactory.cpp:38:
> /home/scratch/rao/trilinos-10.12.2-
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> hpp:216:3: error: ‘ValidStringsList’ does not name a type
> 
> and so on.
> 
> I am using gcc 4.6.3 and openmpi-1.4.4 based on gcc 4.6.3 on an Ubuntu
> system.
> 
> Perhaps there is nothing wrong in the files themselves but something
> wrong in how the upper level routine at the Ifpack level or its
> compilation is set up.
> 
> Rao
> 
> --
> -------------------------------------------------------------------
> Rao V Garimella                  Tel: (505) 665-2928
> T-5, MS B284                   '\   '\        FAX: (505) 665-5757
> Los Alamos National Lab      ( )-( )   Email: rao at lanl.gov
> Los Alamos, NM 87545                      Web:
> http://math.lanl.gov/~rao
> --------------------------------------------------------------------
> 
> 
> 
> On Wed, 2012-09-05 at 15:18 -0400, Bartlett, Roscoe A. wrote:
> > Rao,
> >
> > Very strange error message.  This is occurring in a macro invocation so it is
> hard to see exactly what this is.  It is hard to guess what the problem might
> be.
> >
> > Do you have another version of GCC that you can try?  Do you have access
> to GCC 4.6.1?
> >
> > It would be hard to debug unless we can reproduce the error ourselves.
> >
> > Could you try the following?
> >
> > In the file Teuchos_TwoDArray.hpp, starting at line 333, could you please
> replace add a semi-colon at the end of:
> >
> >
> >   TEUCHOS_TEST_FOR_EXCEPTION(array.size() != (typename
> Array<T>::size_type)(numRows*numCols),
> >     InvalidArrayStringRepresentation,
> >     "Error: You've specified an TwoDArray as having the dimensions of "
> >     << numRows << "x" << numCols << ". This means you should have " <<
> >     (numRows*numCols) << " entries specified in your array. However you "
> >     "only specified " << array.size() << " entries."
> >   )
> >
> >
> > I think this might be an invalid statement otherwise.  There does seem to
> be unit tests for this code but I am not sure how it compiled.
> >
> > If that is not it, you might try replacing the above statement with:
> >
> >
> >
> >   const typename Array<T>::size_type totalSize = numRows*numCols;
> >   TEUCHOS_TEST_FOR_EXCEPTION(array.size() !=totalSize,
> >     InvalidArrayStringRepresentation,
> >     "Error: You've specified an TwoDArray as having the dimensions of "
> >     << numRows << "x" << numCols << ". This means you should have " <<
> >     totalSize << " entries specified in your array. However you "
> >     "only specified " << array.size() << " entries."
> >   );
> >
> >
> > I think the above is preferable (because we should not be using C-style
> casts in C++ code or duplicating the same calculation).
> >
> >
> > Either way, please let us know so we can commit the fix.
> >
> > Thanks,
> >
> > -Ross
> >
> >
> > > -----Original Message-----
> > > From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-
> > > bounces at software.sandia.gov] On Behalf Of Rao Garimella
> > > Sent: Wednesday, September 05, 2012 1:19 PM
> > > To: trilinos-users at software.sandia.gov
> > > Subject: Re: [Trilinos-Users] Errors while compiling
> > > Thyra_IfpackPreconditionerFactory.cpp
> > >
> > > Sorry, but I listed the wrong configure script. The configure script I
> > > am using is
> > >
> > > ARCH=`uname -m`
> > > OS=`uname -s`
> > > ARCHOS=${ARCH}_${OS}
> > > TRILINOS_PATH=/home/scratch/rao/trilinos-10.12.2-Source
> > > rm -f CMakeCache.txt
> > >
> > > cmake \
> > > -D CMAKE_BUILD_TYPE:STRING=Release \
> > > -D CMAKE_INSTALL_PREFIX:PATH=$HOME/packages/$ARCHOS/trilinos-
> > > 10.12.2 \
> > > -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=ON \
> > > -D Trilinos_ENABLE_STK:BOOL=ON \
> > > -D TPL_Boost_INCLUDE_DIRS:FILEPATH=
> > > $HOME/packages/$ARCHOS/ascem-tpl/include/ \
> > > -D Trilions_ENABLE_TESTS:BOOL=ON \
> > > -D TPL_ENABLE_MPI:BOOL=ON \
> > > ${EXTRA_ARGS} \
> > > ${TRILINOS_PATH}
> > >
> > >
> > >
> > > --
> > > -------------------------------------------------------------------
> > > Rao V Garimella                  Tel: (505) 665-2928
> > > T-5, MS B284                   '\   '\        FAX: (505) 665-5757
> > > Los Alamos National Lab      ( )-( )   Email: rao at lanl.gov
> > > Los Alamos, NM 87545                      Web:
> > > http://math.lanl.gov/~rao
> > > --------------------------------------------------------------------
> > >
> > >
> > >
> > > On Wed, 2012-09-05 at 11:11 -0600, Rao Garimella wrote:
> > > > Hello
> > > >
> > > > I looked through some of my older messages and did not see this
> > > > reported, so here goes...
> > > >
> > > > I am trying to compile Trilinos 10.12.2 with gcc-4.5.2 on an Ubuntu
> > > > platform. I use the following configure script:
> > > >
> > > > --------------------------------------------------------
> > > > ARCH=`uname -m`
> > > > OS=`uname -s`
> > > > ARCHOS=${ARCH}_${OS}
> > > > TRILINOS_PATH=$HOME/packages/trilinos-10.12.2-Source
> > > > EXTRA_ARGS=$@
> > > > FORTRAN_LIBRARIES="-L/usr/lib64 -lgfortran -lgfortranbegin"
> > > >
> > > > rm -f CMakeCache.txt
> > > > cmake \
> > > > -D CMAKE_BUILD_TYPE:STRING=DEBUG \
> > > > -D CMAKE_Fortran_COMPILER:FILEPATH=/usr/bin/gfortran \
> > > > -D
> CMAKE_INSTALL_PREFIX:PATH=$HOME/packages/$ARCHOS/trilinos-
> > > 10.12.2 \
> > > > -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=ON \
> > > > -D Trilinos_ENABLE_STK:BOOL=ON \
> > > > -D Trilions_ENABLE_TESTS:BOOL=ON \
> > > > -D TPL_ENABLE_MPI:BOOL=ON \
> > > > -D TPL_Boost_INCLUDE_DIRS:FILEPATH=
> > > > $HOME/packages/$ARCHOS/ascem-tpl/include/ \
> > > >  ${EXTRA_ARGS} \
> > > >  ${TRILINOS_PATH}
> > > > --------------------------------------------------------
> > > >
> > > > I get the following compile errors:
> > > >
> > > >
> > > > [ 51%] Built target ifpack2
> > > > [ 51%] Building CXX object
> > > >
> > >
> packages/stratimikos/adapters/ifpack/src/CMakeFiles/stratimikosifpack.dir/
> > > Thyra_IfpackPreconditionerFactory.cpp.o
> > > > In file included
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:49:0,
> > > >
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_PerformanceMonitorBase.hpp:54,
> > > >
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TimeMonitor.hpp:67,
> > > >
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/stratimikos/adapters/ifpack/src/Thyra_IfpackPrecondition
> > > erFactory.cpp:38:
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TwoDArray.hpp: In static
> member
> > > function ‘static Teuchos::TwoDArray<T>
> > > Teuchos::TwoDArray<T>::fromString(const std::string&)’:
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TwoDArray.hpp:334:37: error:
> > > expected primary-expression before ‘,’ token
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TwoDArray.hpp:336:8: error:
> invalid
> > > operands of types ‘const char [66]’ and ‘size_t’ to binary ‘operator<<’
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TwoDArray.hpp:342:3: error:
> > > expected ‘;’ before ‘TwoDArray’
> > > > nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TwoDArray.hpp:343:3: error:
> > > ‘toReturn’ was not declared in this scope
> > > > In file included
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_PerformanceMonitorBase.hpp:54:0,
> > > >
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > > Source/packages/teuchos/src/Teuchos_TimeMonitor.hpp:67,
> > > >
> > > > from /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/stratimikos/adapters/ifpack/src/Thyra_IfpackPrecondition
> > > erFactory.cpp:38:
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp: At global scope:
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:216:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:255:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:272:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:273:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:684:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:1215:3: error: ‘ValidStringsList’ does not name a type
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp: In member function ‘void
> > > Teuchos::EnhancedNumberValidator<T>::validate(const
> > > Teuchos::ParameterEntry&, const std::string&, const std::string&) const’:
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:1283:37: error: expected primary-expression before ‘,’ token
> > > > /nh/u/rao/packages/trilinos-10.12.2-
> > >
> Source/packages/teuchos/src/Teuchos_StandardParameterEntryValidators.
> > > hpp:1285:5: error: no match for ‘operator<<’ in ‘"Aww shoot! Sorry bud,
> but
> > > it looks like the \"" << paramName’
> > > >
> > > >
> > > > and so on.....
> > > >
> > > >
> > > > Has anyone encountered this? Any ideas on what I may be doing
> wrong?
> > > >
> > > > Thanks
> > > > Rao
> > > >
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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