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:                 [email protected]
                            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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/9498ebff-f086-bad9-d3a9-4db630b4e7ff%40colostate.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to