i was just wondering what the best way would be to let the processors of an Elmer parallel run communicate with each other.
Think of a very time comsuming user function that would calculate the source term in my nodes.
Now in parallel there are many nodes which belong to two or more partitions.
Is there a way to tell Elmer that just the owner processor
should calculate the source term and that the other processes should get the value from the owner afterwards.
i know how to find out the owner
Code: Select all
i =NODEINDEX
if(ParEnv % PEs>1) then
IF( Mesh % ParallelInfo % NeighbourList(NodeIndexes(i)) % Neighbours(1) == ParEnv % MyPE ) THEN !I AM THE OWNER
DO CALCULATION
ELSE IF THEN
REMEMBER(k)=i !THIS is to remember the postponed nodes
k=k+1
CYCLE
END IF
end if
Code: Select all
loop over processors
if i send
everybody listens
if i not send
i listen
end loop
Thanks
Franz