mpiAllReduce(uReduce[], uG[], mpiCommWorld, mpiSUM)

Dear all,

There is problem in line 3 in the following MPI code:

  1. fespace VhG(ThG, P2); //global mesh ThG
  2. VhG uG=0, uReduce=0;
  3. uReduce = u //u is a local variable defined on local mesh Th on one specific MPI processor
  4. mpiAllReduce(uReduce[], uG[], mpiCommWorld, mpiSUM)

The problem is when I do uReduce = u in line 3, the values are extrapolated automatically, which is NOT zero on ThG-Th, so that line 4 generates wrong values in uG using mpiSUM.

Is there a better method to centralise/combine results form different MPI processors?


Please go through the tutorial before asking all these questions Pierre Jolivet introduction to parallel FreeFEM part 1 - YouTube Pierre Jolivet introduction to parallel FreeFEM part 2 - YouTube

It is explained thoroughly how to do mesh adaptation, gather a solution, so on and so forth (basically all your questions from the last couple of days…).

Yes, I have not yet successfully implemented my parallel FSI code. Will have a look at the vedio. Thank you.

Great videos, my problem has now been solved. Thank you very much!