[Trilinos-Users] Teucho_RCP error

Eric Bavier ericbavier at gmail.com
Fri Oct 14 09:00:23 MDT 2011


It seems that the problem has to do with template parameter name
resolution.  The "Ordinal" template parameter in
Teuchos::DefaultComm<Ordinal> is being resolved in some cases to
Teuchos::Ordinal (typedef'd elsewhere as ptrdiff_t) rather than the type
which DefaultComm is instantiated with.

An easy fix: in Teuchos_DefaultComm.hpp change all "Ordinal" template
parameters to "OrdinalType" or something similar to prevent the clash with
Teuchos::Ordinal.

`~Eric Bavier


Date: Wed, 12 Oct 2011 17:31:50 -0400
> From: "Bartlett, Roscoe A." <bartlettra at ornl.gov>
> Subject: Re: [Trilinos-Users] Teuchos_RCP error
> To: "Natarajan CS" <csnataraj at gmail.com>,
>        "trilinos-users at software.sandia.gov"
>        <trilinos-users at software.sandia.gov>
> Message-ID:
>        <7D79831ADC03DE47A3626F74554229CF072529DD4D at EXCHMB.ornl.gov>
> Content-Type: text/plain; charset=us-ascii
>
> We need to remove the unnecessary template argument from Teuchos::Comm that
> can cause these type of incompatibilities.  However, doing so will break
> backward compatibility so it will have to be done across a major version
> number change from 10.X to 11.0.
>
> -Ross
>
>
> > -----Original Message-----
> > From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-
> > bounces at software.sandia.gov] On Behalf Of Natarajan CS
> > Sent: Wednesday, October 12, 2011 2:31 PM
> > To: trilinos-users at software.sandia.gov
> > Subject: [Trilinos-Users] Teuchos_RCP error
> >
> > Hello all,
> >       I am getting an error (below) while building Teuchos tests for
> 10.8.2
> > with MKL BLAS and LAPACK. I couldn't find a similar error in the mail
> > archive ( I haven't come across this error in my previous build of 10.2)
> and
> > I am a little wary of futzing around in the source. I was wondering if
> > someone might know the workaround.
> >
> > Thanks in advance,
> > C.S.N
> >
> > *****************************************ERROR************
> > *************************************
> > /hpc/soft/natac0/trilinos-10.8.2-
> > Source/packages/teuchos/src/Teuchos_RCP.hpp(288):
> > error: a value of type
> > "Teuchos::SerialComm<Teuchos::Ordinal={Teuchos_Ordinal={ptrdiff_t={long
> > }}}>
> > *" cannot be used to initialize an entity of type "const
> Teuchos::Comm<int>
> > *"
> >     : ptr_(r_ptr.get()), // will not compile if T is not base class of T2
> >            ^
> >           detected during:
> >             instantiation of "Teuchos::RCP<T>::RCP(const Teuchos::RCP<T2>
> &)
> > [with T=const Teuchos::Comm<int>,
> > T2=Teuchos::SerialComm<Teuchos::Ordinal={Teuchos_Ordinal={ptrdiff_t={lo
> > ng}}}>]"
> > at line 119 of
> > "/hpc/soft/natac0/trilinos-10.8.2-
> > Source/packages/teuchos/src/Teuchos_DefaultComm.hpp"
> >             implicit definition of "Teuchos::RCP<const
> Teuchos::Comm<int>>
> > Teuchos::DefaultComm<Ordinal>::defaultSerialComm_ [with Ordinal=int]" at
> > line 109 of
> > "/hpc/soft/natac0/trilinos-10.8.2-
> > Source/packages/teuchos/src/Teuchos_DefaultComm.hpp"
> >             instantiation of "Teuchos::RCP<const Teuchos::Comm<Ordinal>>
> > Teuchos::DefaultComm<Ordinal>::getDefaultSerialComm(const
> > Teuchos::RCP<const
> > Teuchos::Comm<Ordinal>> &) [with Ordinal=int]" at line 173 of
> > "/hpc/soft/natac0/trilinos-10.8.2-
> > Source/packages/teuchos/test/Time/TimeMonitor_UnitTests.cpp"
> >
> > compilation aborted for
> > /hpc/soft/natac0/trilinos-10.8.2-
> > Source/packages/teuchos/test/Time/TimeMonitor_UnitTests.cpp
> > (code 2)
> > make[2]: ***
> > [packages/teuchos/test/Time/CMakeFiles/Teuchos_TimeMonitor_UnitTests
> > .dir/TimeMonitor_UnitTests.cpp.o]
> > Error 2
> > make[2]: *** Waiting for unfinished jobs....
> > **********************************************************
> > **********************************************************
> > **********************************
> > ********************************************BUILD
> > OPTIONS***************************************************
> > **************
> > cmake \
> >   -D
> > CMAKE_AR:FILEPATH=/hpc/soft/intel/x86_64/ics-2011.0.013/composerxe-
> > 2011.4.191/bin/intel64/xiar\
> >   -D
> > CMAKE_LINKER:FILEPATH=/hpc/soft/intel/x86_64/ics-
> > 2011.0.013/composerxe-2011.4.191/bin/intel64/xild\
> >   -D CMAKE_CXX_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ics-
> > 2011.0.013/impi/
> > 4.0.2.003/intel64/bin/mpiicpc\ <http://4.0.2.003/intel64/bin/mpiicpc%5C>
> >   -D CMAKE_C_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ics-
> > 2011.0.013/impi/
> > 4.0.2.003/intel64/bin/mpiicc\ <http://4.0.2.003/intel64/bin/mpiicc%5C>
> >   -D
> > CMAKE_Fortran_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ics-
> > 2011.0.013/impi/
> > 4.0.2.003/intel64/bin/mpiifort\<http://4.0.2.003/intel64/bin/mpiifort%5C>
> >   -D CMAKE_INSTALL_PREFIX:PATH=/hpc/soft/natac0/tl_10_8_2 \
> >   -D Trilinos_ENABLE_Epetra:BOOL=ON\
> >   -D Trilinos_ENABLE_Stratimikos:BOOL=ON\
> >   -D Trilinos_ENABLE_Teuchos:BOOL=ON\
> >   -D Trilinos_ENABLE_AztecOO:BOOL=ON\
> >   -D Trilinos_ENABLE_Triutils:BOOL=ON\
> >   -D Trilinos_ENABLE_ML:BOOL=ON\
> >   -D Trilinos_ENABLE_ML_Metis:BOOL=ON\
> >   -D Trilinos_ENABLE_Galeri:BOOL=ON\
> >   -D Trilinos_ENABLE_Amesos:BOOL=ON\
> >   -D Trilinos_ENABLE_Didasko:BOOL=ON\
> >   -D Trilinos_ENABLE_Pamgen:BOOL=ON\
> >   -D Trilinos_ENABLE_FEI:BOOL=ON\
> >   -D Trilinos_ENABLE_Sacado:BOOL=ON\
> >   -D TPL_ENABLE_ParMETIS:BOOL=ON \
> >   -D ParMETIS_INCLUDE_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
> >   -D ParMETIS_LIBRARY_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
> >   -D TPL_ENABLE_METIS:BOOL=ON\
> >   -D METIS_INCLUDE_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1/METISLib\
> >   -D METIS_LIBRARY_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
> >   -D TPL_ENABLE_BLAS:BOOL=ON\
> >   -D
> > TPL_BLAS_LIBRARIES:STRING="-L$MKL_PATH;-lmkl_intel_lp64;-
> > lmkl_sequential;-lmkl_core;;-lpthread;"\
> >   -D TPL_ENABLE_LAPACK:BOOL=ON\
> >   -D
> > TPL_LAPACK_LIBRARIES:STRING="-L$MKL_PATH;-lmkl_intel_lp64;-
> > lmkl_sequential;-lmkl_core;-lpthread"\
> >   -D Trilinos_ENABLE_TESTS:BOOL=ON\
> >   -D DART_TESTING_TIMEOUT:STRING=600\
> >   -D TPL_ENABLE_MPI:BOOL=ON\
> >   -D MPI_BASE_DIR:PATH=/hpc/soft/intel/x86_64/default/impi/lib64\
> >   -D MPI_BIN_DIR:PATH=/hpc/soft/intel/x86_64/default/impi/bin64\
> >   -D CMAKE_CXX_FLAGS:STRING="-limf -O3 -DMPICH_IGNORE_CXX_SEEK"\
> >   -D MPI_USE_COMPILER_WRAPPERS:BOOL=OFF\
> >   $EXTRA_ARGS\
> >   ${TRILINOS_HOME}
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
> End of Trilinos-Users Digest, Vol 74, Issue 10
> **********************************************
>




-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20111014/939bfdd7/attachment.html 


More information about the Trilinos-Users mailing list