On 1/9/25 04:56, Davit Gyulamiryan wrote:
>
> and the problem is that no process takes ownership over /cell_outer/, i.e. the
> body of the first /if /statement is never executed. The second loop works fine.
This makes no sense. If the 'if' in the first loop is never entered, how do
you know that the second loop actually works? What happens if inside the 'if'
there is only a print statement that shows where you are?
> For context: I have source strength (e.g. a charge) at each support point of
> the FE, and I want to calculate the field induced by these sources at each of
> the support points. My approach: first loop iterates over the cells to obtain
> the coordinates of the support points - the process that owns the cell
> broadcasts the coordinates to all the other processes, second loop calculates
> the field strength at these support points by integrating over the entire domain.
This can not work as you describe. Broadcasts are collective operations. You
cannot just send on one process and hope that the others magically receive the
data. The others need to *know* that the first process sent them data and
expect it.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/