[Trilinos-Users] internal structure of epetra_crs

Riccardo Rossi rrossi at cimne.upc.edu
Wed Jun 25 04:49:34 MDT 2014


Dear Prof,

First of all thank you for taking the time to answer to us.

We were looking for some low level access method to do it fast.  We need to
get
full information about matrix strip that belongs to the current MPI process
including global column numbers.

What we are doing currently is call

ExtractMyRowView(row, bufsize, val, col)

to get pointers to internal column and value arrays with subsequent call to
GCID(col[i]) to get global column numbers.

We also need to get matrix rows in correct (with respect to global
numbering)
order, so we actually call

ExtractMyRowView(LRID(row + A.rowMap().MinMyGID()), ...)

to achieve this. The problem with this approach is that we assume that
global
matrix rows are distributed in consecutive chunks between processes and only
then are renumbered. This works in some cases, but breaks in others, so I
guess
the assumption is wrong. Could you please confirm that?

Another problem with this is that even if we manage to get the matrix this
way,
we also need to reorder local part of LHS and RHS to be consistent with the
matrix rows we got. Hence the question: is there a way to get column
numbers of
the local matrix strip (especially for columns that we don't own) that
would be
consistent with local row renumbering? That is, to get column numbers that
would be aligned with a properly sized distributed vector.


Thank you in advance
Riccardo











On Wed, Jun 25, 2014 at 6:32 AM, Heroux, Mike <MHeroux at csbsju.edu> wrote:

> Riccardo,
>
> There is no single answer to this question.  The exact details of the data
> structures will vary depending on details of usage.  There is a general
> meta structure that is always available, but it is not documented for the
> users (since we do not necessarily want hard coding to these specifics).
>  It is probably easiest to see what this structure is by looking at the
> GeneralMV method in the Epetra_CrsMatrix.cpp file.  This shows all of the
> possible situations, and could be used as a starting point for the kind of
> function you want.
>
> If you want something more general and sustainable, you could consider
> accessing matrix entries using the Epetra_RowMatrix interface.  This
> interface is what all Trilinos preconditioners use obtain access to matrix
> entries.  This is an official support interface and does not explicitly
> depend on how the matrix is stored.  It is generally the preferred approach
> for what you are doing.
>
> Mike
>
> From: Riccardo Rossi <rrossi at cimne.upc.edu<mailto:rrossi at cimne.upc.edu>>
> Date: Tuesday, June 24, 2014 8:41 AM
> To: "trilinos-users at software.sandia.gov<mailto:
> trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov
> <mailto:trilinos-users at software.sandia.gov>>
> Cc: Denis Demidov <ddemidov at ksu.ru<mailto:ddemidov at ksu.ru>>
> Subject: [Trilinos-Users] internal structure of epetra_crs
>
> Dear list,
>        we are trying to copy from epetra_crs to a custom data structure to
> try a new solver/preconditioner.
>
> We have a problem since we can not figure out the storage format used by
> the epetra_crs.
>
> can anyone point to a documentation describing the format for the storage
> of local/nonlocal terms in the matrix?
>
> thx in advance
> Riccardo
> --
>
> Riccardo Rossi
>
> PhD, Civil Engineer
>
>
> member of the Kratos Team: www.cimne.com/kratos<
> http://www.cimne.com/kratos>
>
> lecturer at Universitat Politècnica de Catalunya, BarcelonaTech (UPC)
>
> Research fellow at International Center for Numerical Methods in
> Engineering (CIMNE)
>
>
> C/ Gran Capità, s/n, Campus Nord UPC, Ed. C1, Despatx C9
>
> 08034 – Barcelona – Spain – www.cimne.com<http://www.cimne.com>  -
>
> T.(+34) 93 401 56 96 skype: rougered4
>
>
>
> [
> https://web.cimne.upc.edu/groups/publicacions/signatura/logo_cimne_negre.png
> ]<http://www.cimne.com/>
>
> [https://web.cimne.upc.edu/groups/publicacions/signatura/facebook-logo.png
> ]<https://www.facebook.com/cimne>[
> https://web.cimne.upc.edu/groups/publicacions/signatura/wordpress.png]<
> http://blog.cimne.com/>[
> https://web.cimne.upc.edu/groups/publicacions/signatura/vimeo.png]<
> http://vimeo.com/cimne>[
> https://web.cimne.upc.edu/groups/publicacions/signatura/you-tube1.png]<
> http://www.youtube.com/user/CIMNEvideos>[
> https://web.cimne.upc.edu/groups/publicacions/signatura/linkedin-logo.png
> ]<http://www.linkedin.com/company/cimne>[
> https://web.cimne.upc.edu/groups/publicacions/signatura/twitter.png]<
> https://twitter.com/cimne>
>
> Les dades personals contingudes en aquest missatge són tractades amb la
> finalitat de mantenir el contacte professional entre CIMNE i voste. Podra
> exercir els drets d'accés, rectificació, cancel·lació i oposició,
> dirigint-se a cimne at cimne.upc.edu<mailto:cimne at cimne.upc.edu>. La
> utilització de la seva adreça de correu electronic per part de CIMNE queda
> subjecte a les disposicions de la Llei 34/2002, de Serveis de la Societat
> de la Informació i el Comerç Electronic.
>
> [https://web.cimne.upc.edu/groups/publicacions/signatura/image002.png]
> Imprimiu aquest missatge, només si és estrictament necessari.
>
> <http://www.cimne.com/>
>



-- 


*Riccardo Rossi*

PhD, Civil Engineer


member of the Kratos Team: www.cimne.com/kratos

lecturer at Universitat Politècnica de Catalunya, BarcelonaTech (UPC)

Research fellow at International Center for Numerical Methods in
Engineering (CIMNE)


C/ Gran Capità, s/n, Campus Nord UPC, Ed. C1, Despatx C9

08034 – Barcelona – Spain – www.cimne.com  -

T.(+34) 93 401 56 96 skype: *rougered4*



 <http://www.cimne.com/>

 <https://www.facebook.com/cimne> <http://blog.cimne.com/>
<http://vimeo.com/cimne> <http://www.youtube.com/user/CIMNEvideos>
<http://www.linkedin.com/company/cimne> <https://twitter.com/cimne>

Les dades personals contingudes en aquest missatge són tractades amb la
finalitat de mantenir el contacte professional entre CIMNE i voste. Podra
exercir els drets d'accés, rectificació, cancel·lació i oposició,
dirigint-se a cimne at cimne.upc.edu. La utilització de la seva adreça de
correu electronic per part de CIMNE queda subjecte a les disposicions de la
Llei 34/2002, de Serveis de la Societat de la Informació i el Comerç
Electronic.

 Imprimiu aquest missatge, només si és estrictament necessari.
 <http://www.cimne.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20140625/aa077dd7/attachment.html>


More information about the Trilinos-Users mailing list