[Trilinos-Users] Compile very slowly

Bradley, Andrew Michael ambradl at sandia.gov
Wed May 27 12:16:43 EDT 2015


FYI, resolved.
________________________________________
From: Feng Xing <snakexf at gmail.com>
Sent: Wednesday, May 27, 2015 7:57 AM
To: Bradley, Andrew Michael
Subject: Re: [EXTERNAL] [Trilinos-Users] Compile very slowly

Hello Andrew,

Thank you very much, the compilation is much much faster.

Regards,

Feng
Postdoc Inria France


> On 26 May 2015, at 18:37, Bradley, Andrew Michael <ambradl at sandia.gov> wrote:
>
> Hi Feng,
>
> There may be other issues, but as a first step, I recommend configuring Trilinos with explicit template instantiation, like this:
>
> -D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
> -D Tpetra_INST_FLOAT=OFF \
> -D Tpetra_INST_INT_INT=ON \
> -D Tpetra_INST_DOUBLE=ON \
> -D Tpetra_INST_COMPLEX_FLOAT=OFF \
> -D Tpetra_INST_COMPLEX_DOUBLE=OFF \
> -D Tpetra_INST_INT_LONG=OFF \
> -D Tpetra_INST_INT_UNSIGNED=OFF \
> -D Tpetra_INST_INT_LONG_LONG=OFF \
>
> (Here I'm being probably unnecessarily explicit in setting types ON and OFF; the values I've chosen are in fact almost certainly the defaults.)
>
> This will isolate the long build time to the Trilinos build. Once the libraries are built, your code should build faster against Trilinos.
>
> Even then, I recommend a further isolation technique: place the core solver code (containing the Belos and MueLu headers) in its own source file, and put the rest of the application in other files. That way, rebuilding your application will not require recompiling the solver part except when you change the solver part.
>
> Cheers,
> Andrew
>
> ________________________________________
> From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of Feng Xing <snakexf at gmail.com>
> Sent: Monday, May 25, 2015 7:24 AM
> To: trilinos-users at trilinos.org
> Subject: [EXTERNAL] [Trilinos-Users] Compile very slowly
>
> Hello everyone,
>
> I tried to compile a smalll code for solving Ax=b with Tpetra, Belos and Meulu. There are only about 400 lines. But it takes more than 20 minutes to compiler in mac os 10.10, gcc 4.9.2, openmpi 1.7.5, trillions 12.0.1. I would like to ask if it is normal or something is not well written in my code.
>
> The structure is as following. Each member function do one work like create matrix (set matrix values, create vector, solve….).
>
> #include …..
>
> typedef Tpetra::Map<int, int> map_type;
> typedef Tpetra::CrsMatrix<double, int, int> mat_type;
> typedef …….
>
> using Teuchos::RCP;
> …..
>
> class SolveAxb{
>
>        RCP<const map_type> matMap;
>        RCP<mat_type> A;
>        RCP<vec_type> x;
>        RCP<vec_type> b;
>
> public:
> ……...
> }
>
> void SolveAxb::MatCreate(){
>        // allocate matrix
> }
>
> void SolveAxb::MatSetValue(){
>        // set values
> }
> ……
>
> Thank you very much.
>
> Feng Xing
> Postdoc in Inria, France
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at trilinos.org
> https://trilinos.org/mailman/listinfo/trilinos-users



More information about the Trilinos-Users mailing list