Re: [petsc-users] how to check if cell is local owned in DMPlex

2018-03-02 Thread Danyang Su
Hi Matt, I use the latest Fortran style in PETSc 3.8. Enclosed are the PETSc configuration, code compiling log and the function that causes compiling error. The compiling error happens after I include petscsf.h in the following section. I didn't find petscsf.h in petsc/finclude/ folder so I u

Re: [petsc-users] how to check if cell is local owned in DMPlex

2018-03-02 Thread Matthew Knepley
On Fri, Mar 2, 2018 at 3:00 PM, Danyang Su wrote: > On 18-03-02 10:58 AM, Matthew Knepley wrote: > > On Fri, Mar 2, 2018 at 1:41 PM, Danyang Su wrote: > >> >> On 18-02-19 03:30 PM, Matthew Knepley wrote: >> >> On Mon, Feb 19, 2018 at 3:11 PM, Danyang Su wrote: >> >>> Hi Matt, >>> >>> Would you

Re: [petsc-users] how to check if cell is local owned in DMPlex

2018-03-02 Thread Danyang Su
On 18-03-02 10:58 AM, Matthew Knepley wrote: On Fri, Mar 2, 2018 at 1:41 PM, Danyang Su > wrote: On 18-02-19 03:30 PM, Matthew Knepley wrote: On Mon, Feb 19, 2018 at 3:11 PM, Danyang Su mailto:danyang...@gmail.com>> wrote: Hi Matt, Would

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Satish Balay
I just tried your test code with gfortran [without petsc] - and I don't understand it. Does gfortran not support this openmp usage? [tried gfortran 4.8.4 and 7.3.1] balay@es^/sandbox/balay/omp $ gfortran -fopenmp -c hellocount hellocount.F90 hellocount_main.F90 balay@es^/sandbox/balay/omp

Re: [petsc-users] how to check if cell is local owned in DMPlex

2018-03-02 Thread Danyang Su
On 18-03-02 10:58 AM, Matthew Knepley wrote: On Fri, Mar 2, 2018 at 1:41 PM, Danyang Su > wrote: On 18-02-19 03:30 PM, Matthew Knepley wrote: On Mon, Feb 19, 2018 at 3:11 PM, Danyang Su mailto:danyang...@gmail.com>> wrote: Hi Matt, Would y

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Adrián Amor
Thanks Satish, I tried the procedure you suggested and I get the same performance, so I guess that MKL is not a problem in this case (I agree with you that it has to be improved though... my makefile is a little chaotic with all the libraries that I use). And thanks Barry and Matthew! I'll try to

Re: [petsc-users] how to check if cell is local owned in DMPlex

2018-03-02 Thread Matthew Knepley
On Fri, Mar 2, 2018 at 1:41 PM, Danyang Su wrote: > > On 18-02-19 03:30 PM, Matthew Knepley wrote: > > On Mon, Feb 19, 2018 at 3:11 PM, Danyang Su wrote: > >> Hi Matt, >> >> Would you please let me know how to check if a cell is local owned? When >> overlap is 0 in DMPlexDistribute, all the cell

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Satish Balay
When using MKL - PETSc attempts to default to sequential MKL. Perhaps this pulls in a *conflicting* dependency against -liomp5 - and one has to use threaded MKL for this case. i.e not use -lmkl_sequential You appear to have multiple mkl libraires linked in - its not clear what they are for - and

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Smith, Barry F.
> On Mar 2, 2018, at 9:39 AM, Adrián Amor wrote: > > Thanks a lot for your early response! So, sorry if this is a very > straightforward question from your answer, and just to be sure, then can't I > use PETSC in a code where in some place OpenMP parallelization is used while > PETSC is call

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Matthew Knepley
On Fri, Mar 2, 2018 at 10:32 AM, Smith, Barry F. wrote: > >PETSc is for writing parallel codes using MPI, it is not for writing > parallel codes with OpenMP. http://www.mcs.anl.gov/petsc/ > miscellaneous/petscthreads.html To follow up: 1) We do not have any expertise debugging OpenMP pro

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Adrián Amor
Thanks a lot for your early response! So, sorry if this is a very straightforward question from your answer, and just to be sure, then can't I use PETSC in a code where in some place OpenMP parallelization is used while PETSC is called in a part of the program non-parallelized with OpenMP? Thanks!

Re: [petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Smith, Barry F.
PETSc is for writing parallel codes using MPI, it is not for writing parallel codes with OpenMP. http://www.mcs.anl.gov/petsc/miscellaneous/petscthreads.html Barry > On Mar 2, 2018, at 9:00 AM, Adrián Amor wrote: > > Hi all, > > I have been working in the last months with PETSC in a

[petsc-users] Using PETSC with an openMP program

2018-03-02 Thread Adrián Amor
Hi all, I have been working in the last months with PETSC in a FEM program written on FORTRAN, so far sequential. Now, I want to parallelize it with OpenMP and I have found some problems. Finally, I have built a mockup program trying to localize the error. 1. I have compiled PETSC with these opti