Dear Mathieu, As Maxi already pointed out, step-33 is indeed not written to take advantage of any MPI capabilities. Perhaps somewhat unintuitively the call to
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, ::numbers::invalid_unsigned_int); in the main() function configures the multithreading environment (as it would the actual MPI environment if it were actually used). This is discussed in the documentation to that function. As confirmation that MPI is not used, take a look at the vector type used to compute the solution (in the linear solve step) and later to store it. These are all of type Vector<double>, which are not parallelised. To use MPI with Trilinos one needs to use the Trilinos::MPI::Vector as the vector type. If you look at the tutorials grouped by topic (https://dealii.org/9.0.0/doxygen/deal.II/Tutorial.html#topic <https://dealii.org/9.0.0/doxygen/deal.II/Tutorial.html#topic>) then you’ll see that steps 32,42, and 55 are those that best show how to introduce MPI parallelism into a code using Trilinos. I hope that this helps to clarify things a little bit. Best, Jean-Paul > On 31 Oct 2018, at 14:49, 'Maxi Miller' via deal.II User Group > <[email protected]> wrote: > > You have to rewrite a part of the code, such that it can benefit from MPI. I > would suggest using step-40 and step-55 as reference for that, but I also am > quite sure that the authors of the library can suggest something for that. > But in the current state of the example it does not benefit from MPI, as far > as I know. > > Am Mittwoch, 31. Oktober 2018 12:54:35 UTC+1 schrieb Mathieu Dutour: > I am trying to implement a shallow water equation solver in Deal-ii. > I took step-33 as basis and I have some questions with the > MPI-parallelization. > > Apparently using the MPI parallelization has no effect in step-33, only > on the solver. Only step-17 has a if (cell->subdomain_id() == > this_mpi_process) > in its loop. Is there a valid reason why step-33 is not done that way? > > In previous experience in Fortran, I could parallelize every operation with > MPI. > Is it possible in deal.ii > > -- > The deal.II project is located at http://www.dealii.org/ > <http://www.dealii.org/> > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > <https://groups.google.com/d/forum/dealii?hl=en> > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
