[Trilinos-Users] Epetra_BlockMap

Heroux, Michael A maherou at sandia.gov
Wed Feb 10 09:57:31 MST 2010


Since Epetra_Map and Epetra_BlockMap objects are "read-only" once constructed, the copy constructors use a reference counting mechanism to reduce costs.  In other words, each Epetra_Map object points to an Epetra_MapData object using a reference counted pointer.  When a copy of a map is created the new map points to the same MapData object and the reference counter is increased by one.  As a result, the copy of the original map results in a minimal increase in memory.

The memory cost of the original map varies greatly with the type of constructor used.  The simplest constructor produces just a few integer data values per processor (e.g., min/max GID on the given processor and global min/max).  The more complicated constructors, where lists of global IDs are stored on each processor, result in a storage cost proportional to the number of elements in the map, which is roughly n/p if the map is evenly distributed across the machine (where n is the global length of the map and p  is the number of processors used).

Does this answer your question?


On 2/10/10 10:43 AM, "John Mitchell" <jamitch at sandia.gov> wrote:

What is the cost in memory/cpu time of using a copy
constructor/assignment operator with Epetra_Maps?

For example, if I have a function "createMap" that computes an
Epetra_BlockMap -- is that an ok use case?  My anecdotal experience is
that it seems to work fine but I wanted to checkin on that.

Epetra_BlockMap overlapMap = createMap(myArgs);

Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100210/7e6f35cb/attachment.html 

More information about the Trilinos-Users mailing list