[Trilinos-Users] Returned mail: see transcript for details

Alicia M Klinvex aklinvex at purdue.edu
Wed Nov 5 10:27:14 MST 2014


Hello Nelson,

What you want is this constructor: http://trilinos.org/docs/r11.12/packages/tpetra/doc/html/classTpetra_1_1Map.html#aeb556362352e2ae62804601e36672a6c

Map( global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > & comm, LocalGlobal lg = GloballyDistributed, const Teuchos::RCP< Node > & node = defaultArgNode< Node >() )

Here's what this constructor expects:
* The number of rows of your matrix
* The index base (which is generally 0)
* The communicator (which we will come back to)
* Whether the matrix is locally replicated or globally distributed (which we will come back to)
* The node type, which defines the type of architecture you are using

You may be thinking at this point, "I have to provide a communicator?  But I don't want to use MPI!"  You can define a serial Teuchos communicator which never communicates, as in this example: http://trilinos.org/docs/r11.12/packages/tpetra/doc/html/lesson01_no_mpi_8cpp-example.html

For a sequential example, it doesn't matter whether you specify that the matrix is locally replicated or globally distributed.  We can come back to this when you're ready to use MPI.

Regarding finding all eigenvalues in an interval, you have several options:
* You can compute the number of eigenvalues in an interval using inertia computations (meaning sparse factorizations will be involved), then call any eigensolver you want.
* You can try Eric Polizzi's FEAST eigensolver (which requires an estimate of the number of eigenvalues in an interval).  You can download it here: http://www.feast-solver.org/  It can also be found in certain versions of the Intel Math Kernel Library.
* You can try SLEPC's Krylov Schur, which is supposed to support this feature.  Just as a warning, I've personally never gotten it to work successfully.

We are currently working on adding that functionality (computing all eigenvalues in an interval) to Anasazi.  Just out of curiosity, roughly how many eigenvalues are there in your interval of interest?  Also, how big is your matrix?

Best wishes,
Alicia



----- Original Message -----
From: maireni at cimne.upc.edu
To: "Alicia M Klinvex" <aklinvex at purdue.edu>
Sent: Wednesday, November 5, 2014 1:08:00 AM
Subject: Re: [Trilinos-Users] Returned mail: see transcript for details

Hi Alicia M Klinvex,

Thanks for reply.
In my case, as in research area, i compile Trilinos for
not running in MPI process, just in serial way. I know i can not 
exploits
all tools of Trilinos, but is just for research. It have really 
interesting tools.
When the code and the idea is working, migration to MPI is really well.

For the case of column map and row map i need your help.
At the moment, just a class matrix works fine in Ananazi is ok for me.
Epectra or Tpectra is ok. I am using now Tpectra and i see i can define 
a typedef
like this

typedef double scalar_type;
typedef Tpetra::CrsMatrix<scalar_type> TpetraCrsMatrix;

the other parameters is a default values, so i assumed with they
Anasazi works. My dude is in how to contruct the maps for serial code.

Another thing i would like to ask you is about the eigen-solver.
Anasazi can provide me the number of desired eigenvalues,
but is possible it give to me an interval of eigen-values
i.e [0, fecuency cuttof]?


I really appreciate your help.

Best wishes,

Nelson




El 2014-11-04 21:57, Alicia M Klinvex escribió:
> Hello Nelson,
> 
> My name is Alicia, and I am an Anasazi developer.  I'm glad you've
> decided to try Anasazi :-)
> 
> I assume what you're asking is how to take your three CSR arrays and
> turn them into a CrsMatrix that you can pass to an Anasazi
> eigensolver.  If you're using Tpetra, the constructor you're looking
> for is this:
> http://trilinos.org/docs/r11.10/packages/tpetra/doc/html/classTpetra_1_1CrsMatrix.html#a139a91ad9430f012bfb3bcb8fe413ae1
> (If you're using Epetra instead, or want to know the difference
> between Epetra and Tpetra, let me know.)
> 
> Note that this constructor will expect the row map and column map,
> which define how the data is distributed over the MPI processes.  If
> you don't understand how to create those maps, please let me know and
> I'll help you out.
> 
> Does that answer your question?
> 
> Best wishes,
> Alicia Klinvex
> 
> 
> 
> ----- Original Message -----
> From: maireni at cimne.upc.edu
> To: trilinos-users at software.sandia.gov
> Sent: Tuesday, November 4, 2014 3:41:49 AM
> Subject: Re: [Trilinos-Users] Returned mail: see transcript for details
> 
> 
> Dear Heidi Thornquist,
> 
>   Allow me introduce myself first. My name is Nelson Lafontaine,
>   i am a PhD student from UPC, Barcelona, Spain. Now i am Beijing China
>   working with the Psor Chen Pu in the Automatic Multilevel 
> Substructure
>   Methods (AMLS).
>   I see you are a Anasazi developer and i write to you because i am
>   interested in use
>   this library. My installation of Trilinos (trilinos-11.12.1) was
>   successfully,
>   even  i can run some test examples that you are define in Anasazi
> files.
> 
>   However, like you create your own class of matrices and vector,
>   my data i can provided to solve my eigen problem is in the form of
>   a Compressed Sparse Row (CSR). My question  is if exist a way to call
>   the eigen-solver defined in Anasazi just providing the data of
>   compressed
>   Sparse row format, or if is possible to create the matrices types
>   defined
>   in Anasazi just using the CRS format.
> 
>   Thanks in advance for your time.
> 
>   Nelson
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users


More information about the Trilinos-Users mailing list