dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #24671
Re: Buildbot Trilinos version?
On Wednesday October 5 2011 16:32:50 Garth N. Wells wrote:
> On 5 October 2011 18:36, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> > On Wednesday October 5 2011 10:20:33 Garth N. Wells wrote:
> >> On 5 Oct 2011, at 17:50, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> >> > On Wednesday October 5 2011 09:26:57 Johannes Ring wrote:
> >> >> On Wed, Oct 5, 2011 at 5:57 PM, Garth N. Wells <gnw20@xxxxxxxxx>
wrote:
> >> >>> What version of Trilinos do the buildbots use?
> >> >
> >> > The buildbot fails because of old version of Trilinos.
> >>
> >> I tried to test locally and it seemed to work, but I may have got the
> >> versions wrong (10.6 is problematic with gcc 4.6).
> >>
> >> > Garth you mentioned
> >> > that you should introduce a TRILINOS_VERSION define, so we could
> >> > separate the code for pre/post 10.8. Is that still the plan?
> >>
> >> I've added TRILINOS_VERSION to FindTrilinos. I have the
> >> -DTRILINOS_VERSION=xxx in one of my branches. I'll push it shortly.
> >>
> >> Where do the pre/post 10.8 checks need to go?
> >
> > Something like this in la_post.i:
> >
> > ######################################
> >
> > #IF TRILINOS_VERSION>=XXX
> > %runtime%{
> > #include <Teuchos_RCP.hpp>
> > %}
> > #endif
> >
> > ....
> >
> > // Not sure what format the version is in...
> > #IF TRILINOS_VERSION>=XXX
> > Teuchos::RCP<Epetra_FECrsMatrix> _mat ()
> > {
> > Epetra_FECrsMatrix* tmp = self->mat().get();
> > return Teuchos::RCP<Epetra_FECrsMatrix>(tmp, false);
> > }
> > #else
> > Epetra_FECrsMatrix* _mat ()
> > {
> > return self->mat().get();
> > }
> > #endif
> >
> > ....
> >
> > // Not sure what format the version is in...
> > #IF TRILINOS_VERSION>=XXX
> > Teuchos::RCP<Epetra_FEVector> _vec ()
> > {
> > Epetra_FEVector* tmp = self->vec().get();
> > return Teuchos::RCP<Epetra_FEVector>(tmp, false);
> > }
> > #else
> > Epetra_FEVector* _vec ()
> > {
> > return self->vec().get();
> > }
> > #endif
> >
> > I hope this was comprehensible.
>
> Comprehensible, but I can't get SWIG to work with the version defined
> in header files. The Trilinos version is defined in
>
> Trilinos_version.h
>
> by TRILINOS_MAJOR_MINOR_VERSION. Including Trilinos_version.h, I can't
> get SWIG to work with TRILINOS_MAJOR_MINOR_VERSION. Using
>
> #if TRILINOS_MAJOR_MINOR_VERSION >= 100800
> . . .
> #else
> . . .
> #enfif
>
> in la_post.i doesn't seem to work.
Strange. Previously we used:
#if SWIG_VERSION >= 0x020000
...
#enfif
to sort out shared pointer stuff. But as you can see the version is given as a
hex number (0x). Searching the SWIG documentation I cannot see that it is
explicitly mentioned that it has to be in hex notation. But then are not
examples showing the use we want. At least it is perfect valid C preprocessor
syntax.
A work around could be to cereate an OLD_TRINLINOS define, which can be
#IFDEFed for in the interface file.
Johan
> Garth
>
> > Johan
> >
> >> Garth
> >>
> >> > Johan
> >> >
> >> >> lucid-amd64: 10.6.2
> >> >> maverick-i386: 10.6.2
> >> >> mac-osx: n/a
> >> >> linux64-exp: 10.6.4
> >> >>
> >> >> Johannes
> >> >>
> >> >> _______________________________________________
> >> >> Mailing list: https://launchpad.net/~dolfin
> >> >> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> >> >> Unsubscribe : https://launchpad.net/~dolfin
> >> >> More help : https://help.launchpad.net/ListHelp
References