[petsc-users] Threading in petsc

Chao Yang yangchao at iscas.ac.cn
Wed Dec 30 23:26:03 CST 2009


Hi Barry,

Thanks a lot for shedding some lights on PETSc + OpenMP !
I will go into it when I think it's time.

Cheers,

------------------				 
Chao Yang
2009-12-31

-------------------------------------------------------------
From: Barry Smith
Date: 2009-12-31 06:25:05
To: yangchao; PETSc users list
CC: 
Subject: Re: [petsc-users] Threading in petsc


   Check out the manual pages for PetscOpenMPSpawn(),  
PetscOpenMPMerge(), PCOpenMPRun(), PetscOpenMPNew(), and their command  
line options. You can look at src/ksp/pc/impls/openmp/openmp.c to an  
example of how they are used. Note that it does NOT explicitly use  
OpenMP, it is a way for one to write OpenMP code that is used with  
PETSc.
There are non-trivial concepts in this code and it is not recommended  
for most PETSc users who just want to solve some PDE or do some  
similar computation; they have no reason to use this code. You are on  
your own to understand this code if you want to play with it.  
Suggestions on how to improve it are appreciated.



    Barry


On Dec 28, 2009, at 9:08 PM, yangchao at iscas.ac.cn wrote:

> Hi Barry,
>
> Any example of the code you mentioned? Or any hint on how to do  
> threading withing
> MPI process?
> Thanks in advance!
>
> Chao Yang
>
> On Dec 12, 2009, at 2:12 PM, Eugen Wintersberger wrote:
>
>> Hi there
>> I am entirely new to petsc. I would like to know if communication
>> between Jobs on a single node is done via threads or mpi.
>
>    The standard model is to have 1 MPI process per core so there is
> no need for or use of threads.
>
>     There is some code in place that allows one to have one MPI
> process per node and use threads within the node to compute the users
> nonlinear function.
>
>     Barry
>
>> Thanks in advance
>>      Eugen wintersberger
>
>



More information about the petsc-users mailing list