[Trilinos-Users] Question about inserting a row not owned by a processor.
M. Scot Breitenfeld
brtnfld at uiuc.edu
Tue Jun 15 10:52:03 MDT 2010
Greetings,
I'll try to explain a simplified version of my situation the best that I
can. Lets say I have a line discretized as follows:
Proc 0 | Proc 1
o------o------o---|---o-----o-----o
1 2 3 4 5 6 (global number)
where o are nodes (there are no elements for this method) and there is
only 1 d.o.f at each node
For Processor 0 I register: as my global node list: 1, 2, 3, 4
as the row list: 1, 2, 3, 4
as my owned node list: 1, 2, 3
Proc 0
o------o------o---|---o
1 2 3 4 (global number)
1 2 3 4 (rows in global list)
For Processor 1 I register: as my global node list: 4, 5, 6, 3
as the row list: 4, 5, 6, 3
as my owned node list: 4, 5, 6
Proc 1
o---|---o------o------o
3 4 5 6 (global number)
3 4 5 6 (rows in global list)
Now up to this point it works fine in parallel. But for my method I have
something like this:
row 1: (T12-T21)*V2+(T13-T31)*V3+(T14-T41)*V4
row 2: (T21-T12)*V2+(T23-T32)*V3+(T24-T42)*V4
row 3: (T31-T13)*V2+(T34-T43)*V3
row 4: (T41-T14)*V2+(T45-T54)*V3+(T34-T43)*V4
....
T12, for example, means node 1 is influenced by node 2; meaning
processor 0 will calculate T12, T13, T14 which is fine. But T14 also
needs to be subtracted from row 4. The problem is row 4 (node 4) is not
owned by processor 0, it's on processor 1. When I use InsertGlobalValues
to insert the values in row 4 on processor 0 it will return an error. Do
I have to write mpi code to pass the T14 matrix to processor one to
insert into row 4, or is there a routine that I can use instead, or
maybe I'm missing something.
Thanks,
Scot
More information about the Trilinos-Users
mailing list