[petsc-users] PETSc-dev and OpenMP
Barry Smith
bsmith at mcs.anl.gov
Fri Sep 20 20:37:33 CDT 2013
You don't need any special code to use the OpenMP inside some of the PETSc routines. Just ./configure PETSc with
--with-openmp --with-mpi=0
then at runtime use -threadcomm_nthreads <n> where n is for example for when you run the code.
When you run with -log_summary it will print how many threads it is using.
You are free to use OpenMP in your code.
Barry
On Sep 20, 2013, at 5:01 PM, Danyang Su <danyang.su at gmail.com> wrote:
> Hi Barry,
>
> Thanks for following up. I just want some PETSc OpenMP example or user guide. Looking forward to your work on superlu_mt.
>
> Regards,
>
> Danyang
>
> On 20/09/2013 6:17 AM, Barry Smith wrote:
>> Sorry I did not respond sooner. I've been trying to interface PETSc to superlu_mt for a couple of days but haven't completed it yet. I'll let you know if I get it working.
>>
>> Barry
>>
>> On Sep 17, 2013, at 2:31 PM, Danyang Su <danyang.su at gmail.com> wrote:
>>
>>> Hi Barry,
>>>
>>> Thanks so much.
>>> Which solvers are current OpenMP parallel currently? Can I use the external package (e.g., SuperLU OpenMP version) with OpenMP through PETSc?
>>> Is there any document or examples available for the usage of PETSc with OpenMP?
>>>
>>> Thanks again,
>>>
>>> Danyang
>>>
>>> On 17/09/2013 11:21 AM, Barry Smith wrote:
>>>> You can utilize the "OpenMP version of PETSc" with your OpenMP program but not all the solvers are OpenMP parallel currently.
>>>>
>>>> Use petsc-dev and configure PETSc with ./configure --with-mpi=0 --with-openmp see http://www.mcs.anl.gov/petsc/developers/index.html
>>>>
>>>> Barry
>>>>
>>>>
>>>> On Sep 17, 2013, at 12:29 PM, Danyang Su <danyang.su at gmail.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I have a parallel Fortran project utilizing OpenMP parallelism. Before porting to PETSc utilizing MPICH, I want to know if it is possible to use PETSc solver with OpenMP. There is some information for petsc-dev openmp benchmarking as can be found here, http://lists.mcs.anl.gov/pipermail/petsc-dev/2012-March/007817.html. If this is possible, I would like to have a OpenMP version of PETSc solver first, otherwise, the project will be ported to PETSc utilizing MPI. Could anybody give me some advice on this?
>>>>>
>>>>> Thanks and regards,
>>>>>
>>>>> Danyang
>
More information about the petsc-users
mailing list