Thanks Wolfgang, Unfortunately I cannot use MPI. It should be strictly a host-only code with no networking at all, so I am using threads. I could use fully blown processes, of course, but it's an overkill.
Cheers, Franco On Monday, June 17, 2019 at 6:30:14 PM UTC+2, Wolfgang Bangerth wrote: > > On 6/17/19 6:10 AM, Franco Milicchio wrote: > > > > we're about to implement an eigenvalue problem that needs multiple > solutions. > > In particular, we're going to compute min & max eigenvalues of several > > matrices, so we were going to spawn some threads and solve some in > parallel. > > > > The problem is that, as far as I see, there are wrappers in deal.II for > SLEPc, > > so PETSc, but we cannot use MPI in our system. PETSc works only with > MPI, and > > I cannot start multiple threads, or at least that is what I understand > (see > > https://www.mcs.anl.gov/petsc/miscellaneous/petscthreads.html). > > I think that is only partially true. What is *not* safe is to let PETSc > access > the same data structures from multiple threads. That includes an MPI > communicator. > > But if you are willing to duplicate the matrix and use different (cloned) > MPI > communicators for the copies of the matrix, then I suspect that you can > use > PETSc on multiple threads as long as every thread accesses only one of the > matrices and a unique MPI communicator. > > That said, if you're already using MPI, why not just put one MPI process > on > each processor core? In that case, you don't need multithreading. > > Best > W. > > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > <javascript:> > www: http://www.math.colostate.edu/~bangerth/ > > -- 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 dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b8a6ddc2-4799-4520-a106-9503ee381286%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.