Re: [petsc-users] Question about DMLocalToLocal for DM_BOUNDARY_GHOSTED conditions

2020-05-25 Thread Matthew Knepley
> *From:* Matthew Knepley > *Sent:* Friday, May 22, 2020 8:03 PM > *To:* Lucas Banting > *Cc:* PETSc > *Subject:* Re: [petsc-users] Question about DMLocalToLocal for > DM_BOUNDARY_GHOSTED conditions > > On Fri, May 22, 2020 at 4:34 PM Lucas Banting > wrote

Re: [petsc-users] Question about DMLocalToLocal for DM_BOUNDARY_GHOSTED conditions

2020-05-25 Thread Lucas Banting
From: Matthew Knepley Sent: Friday, May 22, 2020 8:03 PM To: Lucas Banting Cc: PETSc Subject: Re: [petsc-users] Question about DMLocalToLocal for DM_BOUNDARY_GHOSTED conditions On Fri, May 22, 2020 at 4:34 PM Lucas Banting mailto:banti...@myumanitoba.ca>> wrote: Hello, I am conv

Re: [petsc-users] Question about DMLocalToLocal for DM_BOUNDARY_GHOSTED conditions

2020-05-22 Thread Matthew Knepley
On Fri, May 22, 2020 at 4:34 PM Lucas Banting wrote: > Hello, > > I am converting a serial code to parallel in fortran with petsc. I am > using the DMDA to manage communication of the information that used to be > in old two-dimensional fortran arrays. > > I noticed when using

Re: [petsc-users] Question on VecScatter options

2020-04-10 Thread Junchao Zhang
sf_type window is not recommended, since it is very unlikely to bring any benefit. sf_type neighbor uses MPI-3.0 MPI_Ineighbor_alltoallv() for communication. If the the MPI implementation you use has optimized the so-called neighborhood communication, then using this option may improve

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-30 Thread Berend van Wachem
Dear Matt, I am still not having success with the different sections on the DMForest. The example you sent works only if the two sections are the same. But, if the first section stores the data at the cell centers and the second section stores the data at the cell faces, the code crashes.

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-23 Thread Berend van Wachem
Dear Matt, It seems I judged to early. The solution works when the mesh is refined, and for multiple times refinement, but does not work for re-coarsening. I have created a working example where I show this, please find it attached. Starting from line 190, the forest is refined. A call to

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-21 Thread Berend van Wachem
Thanks Matt, This indeed works. Thank you very much! Best wishes, Berend. On 2020-03-19 23:39, Matthew Knepley wrote: Okay this runs for me.   Thanks,     Matt On Thu, Mar 19, 2020 at 6:07 PM Matthew Knepley > wrote: On Fri, Mar 13, 2020 at 9:45 AM Berend

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-19 Thread Matthew Knepley
Okay this runs for me. Thanks, Matt On Thu, Mar 19, 2020 at 6:07 PM Matthew Knepley wrote: > On Fri, Mar 13, 2020 at 9:45 AM Berend van Wachem < > berend.vanwac...@ovgu.de> wrote: > >> Dear Matt, >> >> Thanks for your response. My understanding of the DM and DMClone is the >> same - and

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-19 Thread Matthew Knepley
On Fri, Mar 13, 2020 at 9:45 AM Berend van Wachem wrote: > Dear Matt, > > Thanks for your response. My understanding of the DM and DMClone is the > same - and I have tested this with a DMPLEX DM without problems. > > However, for some reason, I cannot change/set the section of a P4EST dm. > In

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-19 Thread Berend van Wachem
Dear Matt, I haven't been able to progress further with changing the Section of a P4EST DM. Therefore, what do you think of the following strategy: 1. Create the DMPlex versions of dmIn and dmOut from the subsequent P4EST DM's 2. Create the appropriate sections onto the DMPlex versions of

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-13 Thread Matthew Knepley
On Fri, Mar 13, 2020 at 9:45 AM Berend van Wachem wrote: > Dear Matt, > > Thanks for your response. My understanding of the DM and DMClone is the > same - and I have tested this with a DMPLEX DM without problems. > > However, for some reason, I cannot change/set the section of a P4EST dm. > In

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-13 Thread Berend van Wachem
Dear Matt, Thanks for your response. My understanding of the DM and DMClone is the same - and I have tested this with a DMPLEX DM without problems. However, for some reason, I cannot change/set the section of a P4EST dm. In the attached example code, I get an error in line 140, where I try

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-12 Thread Matthew Knepley
On Thu, Mar 12, 2020 at 7:40 AM Berend van Wachem wrote: > Dear All, > > I have started to use DMPLEX with P4EST for a computational fluid > dynamics application. I am solving a coupled system of 4 discretised > equations (for 3 velocity components and one pressure) on a mesh. > However, next to

Re: [petsc-users] Question regarding the EPSSetDimensions routine

2020-02-13 Thread Jose E. Roman
I mean run with -eps_monitor (see section 2.5.3) and you will see if residuals are decreasing. Either increase the maximum number of iterations or the size of the subspace. > El 13 feb 2020, a las 22:03, baikadi pranay > escribió: > > Thank you Jose for the reply. > > If I set

Re: [petsc-users] Question regarding the EPSSetDimensions routine

2020-02-13 Thread baikadi pranay
Thank you Jose for the reply. If I set PETSC_DEFAULT_INTEGER for ncv as suggested in the EPSSetDimensions documentation, I am still running into the same problem. Also, could you elaborate on what you mean by checking convergence with a monitor. Do you mean comparing the eigenvalues for ith and

Re: [petsc-users] Question regarding the EPSSetDimensions routine

2020-02-13 Thread Jose E. Roman
For nev=10 you are using a subspace of size 20. This may be too small. Check convergence with a monitor and increase ncv if necessary. Jose > El 13 feb 2020, a las 21:25, baikadi pranay > escribió: > >  > Hello PETSc Users, > > I am trying to find the lowest 'n' eigenvalues of a hermitian

Re: [petsc-users] Question about changing time step during calculation

2019-11-17 Thread Smith, Barry F. via petsc-users
> On Nov 17, 2019, at 5:32 PM, Zhang, Hong via petsc-users > wrote: > > TSSetTimeStep() > > https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetTimeStep.html#TSSetTimeStep > > If you want to decide the step size by yourself, make sure that the > adaptivity is turned off,

Re: [petsc-users] Question about changing time step during calculation

2019-11-17 Thread Zhang, Hong via petsc-users
TSSetTimeStep() https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetTimeStep.html#TSSetTimeStep If you want to decide the step size by yourself, make sure that the adaptivity is turned off, e.g., with -ts_adapt_type none Btw, have you tried the available TSAdapt types? Is

Re: [petsc-users] Question -with-64-bit-blas-indices

2019-10-10 Thread Smith, Barry F. via petsc-users
> On Oct 10, 2019, at 12:38 PM, Randall Mackie via petsc-users > wrote: > > With the release of PETSc 3.12, there is a new option mentioned in the list > of changes: > > Added --with-64-bit-blas-indices that will switch to 64 bit indices when > using MKL libraries for BLAS/LAPACK and build

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-09-30 Thread Smith, Barry F. via petsc-users
Sorry this code has not been changed. Barry > On Sep 30, 2019, at 4:24 PM, Sajid Ali > wrote: > > Hi PETSc-developers, > > Has this bug been fixed in the new 3.12 release ? > > Thank You, > Sajid Ali > Applied Physics > Northwestern University > s-sajid-ali.github.io

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-09-30 Thread Sajid Ali via petsc-users
Hi PETSc-developers, Has this bug been fixed in the new 3.12 release ? Thank You, Sajid Ali Applied Physics Northwestern University s-sajid-ali.github.io

Re: [petsc-users] question about small matrices

2019-09-25 Thread Jed Brown via petsc-users
"Povolotskyi, Mykhailo via petsc-users" writes: > Hi Matthew, > > is it possible to do in principle what I would like to do? SNES isn't meant to solve tiny independent systems. (It's just high overhead for that purpose.) You can solve many such instances together by creating a residual

Re: [petsc-users] question about small matrices

2019-09-25 Thread Povolotskyi, Mykhailo via petsc-users
Hi Matthew, is it possible to do in principle what I would like to do? On 9/25/2019 3:12 AM, Matthew Knepley wrote: On Wed, Sep 25, 2019 at 1:27 AM Povolotskyi, Mykhailo via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Dear Petsc developers, in my application I have to solve millions

Re: [petsc-users] question about installing petsc3.11

2019-09-20 Thread Povolotskyi, Mykhailo via petsc-users
I have to apologize. By mistake I was installing the new version in the directory where the old version already existed. After I cleaned everything, I do not see that error message anymore. Yes, the error message was somewhat misleading, but I will not be able to reproduce it. Michael. On

Re: [petsc-users] question about installing petsc3.11

2019-09-20 Thread Balay, Satish via petsc-users
--with-64-bit-indices=1 => PetscInt = int64_t --known-64-bit-blas-indices=1 => blas specified uses 64bit indices. What is your requirement (use case)? Satish On Fri, 20 Sep 2019, Povolotskyi, Mykhailo via petsc-users wrote: > Does it mean I have to configure petsc with --with-64-bit-indices=1

Re: [petsc-users] question about installing petsc3.11

2019-09-20 Thread Povolotskyi, Mykhailo via petsc-users
Does it mean I have to configure petsc with --with-64-bit-indices=1 ? On 09/20/2019 03:41 PM, Matthew Knepley wrote: On Fri, Sep 20, 2019 at 1:55 PM Povolotskyi, Mykhailo via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello, I'm upgrading petsc from 3.8 to 3.11. In doing so, I see an

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-20 Thread Jose E. Roman via petsc-users
I have tried with slepc-master and it works: $ mpiexec -n 2 ./ex1 -eps_ciss_partitions 2 matrix size 774 (-78.7875,8.8022) (-73.9569,-42.2401) (-66.9942,-7.50907) (-62.262,-2.71603) (-58.9716,0.60) (-57.9883,0.298729) (-57.8323,1.06041) (-56.5317,1.10758) (-56.0234,45.2405) (-54.4058,2.88373)

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-19 Thread Povolotskyi, Mykhailo via petsc-users
Hong, do you have in mind a reason why the newer version should work or is it a general recommendation? Which stable version would you recommend to upgrade to? Thank you, Michael. On 09/19/2019 02:22 PM, Zhang, Hong wrote: Michael,

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-19 Thread Zhang, Hong via petsc-users
Michael, -- [0]PETSC ERROR: No support for this operation for this object type [0]PETSC ERROR: Mat type seqdense [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-19 Thread Povolotskyi, Mykhailo via petsc-users
Hello Jose, I have done the test case to reproduce my error. 1. You will need to download a file "matrix.bin"  from the following link https://www.dropbox.com/s/6y7ro99ou4qr8uy/matrix.bin?dl=0 2. Here is the C++ code I use #include #include #include #include #include #include #include

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-19 Thread Jose E. Roman via petsc-users
Michael, In my previous email I should have checked it better. The CISS solver works indeed with dense matrices: $ mpiexec -n 2 ./ex2 -n 30 -eps_type ciss -terse -rg_type ellipse -rg_ellipse_center 1.175 -rg_ellipse_radius 0.075 -eps_ciss_partitions 2 -mat_type dense 2-D Laplacian

Re: [petsc-users] question about MatCreateRedundantMatrix

2019-09-18 Thread hong--- via petsc-users
Michael, We have support of MatCreateRedundantMatrix for dense matrices. For example, petsc/src/mat/examples/tests/ex9.c: mpiexec -n 4 ./ex9 -mat_type dense -view_mat -nsubcomms 2 Hong On Wed, Sep 18, 2019 at 5:40 PM Povolotskyi, Mykhailo via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear

Re: [petsc-users] question about CISS

2019-09-07 Thread Povolotskyi, Mykhailo via petsc-users
Thank you. I will try to divide the ring into fragments and see what happens. Michael. On 9/7/2019 5:15 AM, Jose E. Roman wrote: > In the ring region, you should choose appropriate start and end angles to > narrow down the region, so that it fits closer to the wanted eigenvalues, > otherwise

Re: [petsc-users] question about CISS

2019-09-07 Thread Jose E. Roman via petsc-users
In the ring region, you should choose appropriate start and end angles to narrow down the region, so that it fits closer to the wanted eigenvalues, otherwise the region spans the whole circumference. Note that there is a fixed number of integration points around the contour, so if the area is

Re: [petsc-users] question about CISS

2019-08-29 Thread Jose E. Roman via petsc-users
> El 29 ago 2019, a las 22:20, Povolotskyi, Mykhailo > escribió: > > Thank you for suggestion. > > Is it interfaced to SLEPC? No, could be a future project... > > > On 08/29/2019 04:14 PM, Jose E. Roman wrote: >> I am not an expert in contour integral eigensolvers. I think difficulties

Re: [petsc-users] question about CISS

2019-08-29 Thread Povolotskyi, Mykhailo via petsc-users
It is not a symmetric matrix On 08/29/2019 04:30 PM, Matthew Knepley wrote: On Thu, Aug 29, 2019 at 4:29 PM Jed Brown via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Elemental also has distributed-memory eigensolvers that should be at least as good as ScaLAPACK's. There is support for

Re: [petsc-users] question about CISS

2019-08-29 Thread Jed Brown via petsc-users
Elemental also has distributed-memory eigensolvers that should be at least as good as ScaLAPACK's. There is support for Elemental in PETSc, but not yet in SLEPc. "Povolotskyi, Mykhailo via petsc-users" writes: > Thank you for suggestion. > > Is it interfaced to SLEPC? > > > On 08/29/2019 04:14

Re: [petsc-users] question about CISS

2019-08-29 Thread Povolotskyi, Mykhailo via petsc-users
Thank you for suggestion. Is it interfaced to SLEPC? On 08/29/2019 04:14 PM, Jose E. Roman wrote: > I am not an expert in contour integral eigensolvers. I think difficulties > come with corners, so ellipses are the best choice. I don't think ring > regions are relevant here. > > Have you

Re: [petsc-users] question about CISS

2019-08-29 Thread Jose E. Roman via petsc-users
I am not an expert in contour integral eigensolvers. I think difficulties come with corners, so ellipses are the best choice. I don't think ring regions are relevant here. Have you considered using ScaLAPACK. Some time ago we were able to address problems of size up to 400k

Re: [petsc-users] question about CISS

2019-08-29 Thread Povolotskyi, Mykhailo via petsc-users
Thank you, Jose, what about rings? Are they better than rectangles? Michael. On 08/29/2019 03:44 PM, Jose E. Roman wrote: > The CISS solver is supposed to estimate the number of eigenvalues contained > in the contour. My impression is that the estimation is less accurate in case > of

Re: [petsc-users] question about CISS

2019-08-29 Thread Jose E. Roman via petsc-users
The CISS solver is supposed to estimate the number of eigenvalues contained in the contour. My impression is that the estimation is less accurate in case of rectangular contours, compared to elliptic ones. But of course, with ellipses it is not possible to fully cover the complex plane unless

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-22 Thread Smith, Barry F. via petsc-users
There is no harm in having the GMRES there even if you use a direct solver (for testing) so just leave the GMRES. Changing to preonly every time you try LU is prone to error if you forget to change back. Barry > On May 22, 2019, at 2:45 PM, Sajid Ali via petsc-users > wrote: > > Hi

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-22 Thread Smith, Barry F. via petsc-users
> On May 22, 2019, at 2:26 PM, Sajid Ali via petsc-users > wrote: > > Hi Hong, > > Looks like this is my fault since I'm using -ksp_type preonly -pc_type gamg. > If I use the default ksp (GMRES) then everything works fine on a smaller > problem. > > Just to confirm, -ksp_type preonly

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-22 Thread Sajid Ali via petsc-users
Hi Matt, Thanks for the explanation. That makes sense since I'd get reasonably close convergence with preonly sometimes and not at other times which was confusing. Anyway, since there's no pc_tol (analogous to ksp_rtol/ksp_atol, etc), I'd have to more carefully set the gamg preconditioner

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-22 Thread Sajid Ali via petsc-users
Hi Hong, Looks like this is my fault since I'm using -ksp_type preonly -pc_type gamg. If I use the default ksp (GMRES) then everything works fine on a smaller problem. Just to confirm, -ksp_type preonly is to be used only with direct-solve preconditioners like LU,Cholesky, right ? Thank You,

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-20 Thread Zhang, Hong via petsc-users
Sajid, I have also rested the simpler problem you provided. The branch hongzh/fix-computejacobian gives exactly the same numerical results as the master branch does, but runs much faster. So the solver seems to work correctly. To rule out the possible compiler issues, you might want to try a

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-17 Thread Sajid Ali via petsc-users
Hi Hong, The solution has the right characteristics but it's off by many orders of magnitude. It is ~3.5x faster as before. Am I supposed to keep the TSRHSJacobianSetReuse function or not? Thank You, Sajid Ali Applied Physics Northwestern University

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-16 Thread Smith, Barry F. via petsc-users
> On May 16, 2019, at 8:04 PM, Sajid Ali > wrote: > > While there is a ~3.5X speedup, deleting the aforementioned 20 lines also > leads the new version of petsc to give the wrong solution (off by orders of > magnitude for the same program). Ok, sorry about this. Unfortunately this

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-16 Thread Zhang, Hong via petsc-users
Hi Sajid, Can you please try this branch hongzh/fix-computejacobian quickly and see if it makes a difference? Thanks, Hong (Mr.) On May 16, 2019, at 8:04 PM, Sajid Ali via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: While there is a ~3.5X speedup, deleting the aforementioned 20 lines

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-16 Thread Sajid Ali via petsc-users
While there is a ~3.5X speedup, deleting the aforementioned 20 lines also leads the new version of petsc to give the wrong solution (off by orders of magnitude for the same program). I tried switching over the the IFunction/IJacobian interface as per the manual (page 146) which the following

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-16 Thread Sajid Ali via petsc-users
Hi Barry, Thanks a lot for pointing this out. I'm seeing ~3X speedup in time ! Attached are the new log files. Does everything look right ? Thank You, Sajid Ali Applied Physics Northwestern University out_50 Description: Binary data out_100 Description: Binary data

Re: [petsc-users] Question about TSComputeRHSJacobianConstant

2019-05-16 Thread Smith, Barry F. via petsc-users
Sajid, This is a huge embarrassing performance bug in PETSc https://bitbucket.org/petsc/petsc/issues/293/refactoring-of-ts-handling-of-reuse-of It is using 74 percent of the time to perform MatAXPY() on two large sparse matrices, not knowing they have identical nonzero patterns and

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-13 Thread Zhang, Junchao via petsc-users
-Christophe Cc : petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> Objet : Re: [petsc-users] Question about parallel Vectors and communicators On Tue, May 7, 2019 at 11:38 AM GIRET Jean-Christophe via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Dear PETSc users,

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-13 Thread GIRET Jean-Christophe via petsc-users
. Any hint on that? Again, thank you all for your great support, Best, JC De : Zhang, Junchao [mailto:jczh...@mcs.anl.gov] Envoyé : vendredi 10 mai 2019 22:01 À : GIRET Jean-Christophe Cc : Mark Adams; petsc-users@mcs.anl.gov Objet : Re: [petsc-users] Question about parallel Vectors

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-10 Thread Zhang, Junchao via petsc-users
e data exchange for the coupling part. Thanks again for your support, Best regards, Jean-Christophe De : Mark Adams [mailto:mfad...@lbl.gov<mailto:mfad...@lbl.gov>] Envoyé : mardi 7 mai 2019 21:39 À : GIRET Jean-Christophe Cc : petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> Objet

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-09 Thread Jed Brown via petsc-users
hange for the coupling part. > > Thanks again for your support, > Best regards, > Jean-Christophe > > De : Mark Adams [mailto:mfad...@lbl.gov] > Envoyé : mardi 7 mai 2019 21:39 > À : GIRET Jean-Christophe > Cc : petsc-users@mcs.anl.gov > Objet : Re: [petsc-users] Questio

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-09 Thread GIRET Jean-Christophe via petsc-users
. Thanks again for your support, Best regards, Jean-Christophe De : Mark Adams [mailto:mfad...@lbl.gov] Envoyé : mardi 7 mai 2019 21:39 À : GIRET Jean-Christophe Cc : petsc-users@mcs.anl.gov Objet : Re: [petsc-users] Question about parallel Vectors and communicators On Tue, May 7, 2019 at 11:38 AM

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-07 Thread Mark Adams via petsc-users
On Tue, May 7, 2019 at 11:38 AM GIRET Jean-Christophe via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear PETSc users, > > > > I would like to use Petsc4Py for a project extension, which consists > mainly of: > > - Storing data and matrices on several rank/nodes which could > not

Re: [petsc-users] Question about parallel Vectors and communicators

2019-05-07 Thread Jed Brown via petsc-users
The standard approach would be to communicate via the parent comm. So you split comm world into part0 and part1 and use a VecScatter with vecs on world (which can have zero entries on part1 and part0 respectively) to exchange your data. You can use VecPlaceArray or VecCreate*WithArray to avoid

Re: [petsc-users] Question on KSPSetReusePreconditioner

2019-04-18 Thread Yuyun Yang via petsc-users
I see, thanks for the helpful answers! Best regards, Yuyun Get Outlook for iOS<https://aka.ms/o0ukef> From: Smith, Barry F. Sent: Thursday, April 18, 2019 3:51:27 PM To: Yuyun Yang Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Qu

Re: [petsc-users] Question on KSPSetReusePreconditioner

2019-04-18 Thread Smith, Barry F. via petsc-users
> On Apr 18, 2019, at 10:44 AM, Yuyun Yang via petsc-users > wrote: > > Hello team, > > I have a question on when I should be setting KSPSetReusePreconditioner to > PETSC_TRUE or PETSC_FALSE. It made a pretty big difference in the solutions I > get when I ran my code testing both

Re: [petsc-users] Question on KSPSetReusePreconditioner

2019-04-18 Thread Yuyun Yang via petsc-users
: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Question on KSPSetReusePreconditioner On Thu, Apr 18, 2019 at 11:44 AM Yuyun Yang via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello team, I have a question on when I should be setting KSPSetReusePreconditioner to PETS

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-13 Thread Smith, Barry F. via petsc-users
e) to petsc-ma...@mcs.anl.gov and we'll see if we can get MUMPS to crash on it. Barry > > Best regards, > Yuyun > > -Original Message- > From: Smith, Barry F. > Sent: Saturday, April 13, 2019 7:08 PM > To: Yuyun Yang > Cc: petsc-users@mcs.anl.gov > Subject: Re: [

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-13 Thread Yuyun Yang via petsc-users
, April 13, 2019 7:08 PM To: Yuyun Yang Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH It will be in the directory where the program is run. Perhaps you are not calling KSPSetFromOptions()? This is where it is checked. Barry > On Apr

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-13 Thread Smith, Barry F. via petsc-users
ing produced in my output or source file directories. Is it located > somewhere else? > > Best regards, > Yuyun > > -Original Message- > From: Smith, Barry F. > Sent: Thursday, April 11, 2019 10:21 PM > To: Yuyun Yang > Cc: petsc-users@mcs.anl.gov >

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-13 Thread Yuyun Yang via petsc-users
: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH Ok, still a little odd. PCSetOperators() which is called internally by KSPSetOperators() checks if the matrix has changed size and generates an error. Similar if you set a different matrix from before

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Smith, Barry F. via petsc-users
; Yuyun > > Get Outlook for iOS > From: Smith, Barry F. > Sent: Thursday, April 11, 2019 9:21:11 PM > To: Yuyun Yang > Cc: petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH > > >Ahh, I just realized one o

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Smith, Barry F. via petsc-users
86113e+01 s, dt = 8.30543e+00 > > From: petsc-users On Behalf Of Yuyun Yang > via petsc-users > Sent: Thursday, April 11, 2019 10:02 PM > To: Smith, Barry F. > Cc: petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH >

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Yuyun Yang via petsc-users
Sent: Thursday, April 11, 2019 9:21:11 PM To: Yuyun Yang Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH Ahh, I just realized one other thing we can try. Run the program that crashes with -ksp_mat_view binary this will produce a file

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Smith, Barry F. via petsc-users
tlook for iOS > From: Smith, Barry F. > Sent: Thursday, April 11, 2019 6:44:54 PM > To: Yuyun Yang > Cc: petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH > > > > > On Apr 11, 2019, at 5:44 PM, Yuyun Yang via petsc-use

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Yuyun Yang via petsc-users
ursday, April 11, 2019 6:44:54 PM To: Yuyun Yang Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Question about KSP, and makefile linking MPICH > On Apr 11, 2019, at 5:44 PM, Yuyun Yang via petsc-users > wrote: > > Hello team, > > I’d like to check if it’s ok to

Re: [petsc-users] Question about KSP, and makefile linking MPICH

2019-04-11 Thread Smith, Barry F. via petsc-users
> On Apr 11, 2019, at 5:44 PM, Yuyun Yang via petsc-users > wrote: > > Hello team, > > I’d like to check if it’s ok to use the same ksp object and change its > operator (the matrix A) later on in the code to solve a different problem? Do you mean call KSPSetOperators() with one matrix

Re: [petsc-users] Question with filedsplit in PETSc

2019-02-23 Thread Matthew Knepley via petsc-users
On Thu, Feb 21, 2019 at 3:45 PM Zhu, Qiming via petsc-users < petsc-users@mcs.anl.gov> wrote: > > Dear all, > > > Sorry to disturb you. I am a user of Petsc. I am trying to use Fieldsplit > in Petsc to do preconditioning for Navier-Stokes problem. I have some > problems when I trying to use

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Smith, Barry F. via petsc-users
> On Jan 27, 2019, at 4:26 PM, Sajid Ali > wrote: > > The form is u_t = A(t)u. Got it. You can call TSRHSJacobianSetReuse() after you create the TS object and then each time your compute jacobian is called it will be passed the same matrix as before. Then you can use

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Sajid Ali via petsc-users
The form is u_t = A(t)u. On Sun, Jan 27, 2019 at 4:24 PM Smith, Barry F. wrote: > > > > On Jan 25, 2019, at 4:51 PM, Sajid Ali via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > > > Hi, > > > > If I have a linear time dependent equation I'm trying to solve using TS, > I can use : > >

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Smith, Barry F. via petsc-users
> On Jan 25, 2019, at 4:51 PM, Sajid Ali via petsc-users > wrote: > > Hi, > > If I have a linear time dependent equation I'm trying to solve using TS, I > can use : > TSSetProblemType(ts,TS_LINEAR); > TSSetRHSFunction(ts,NULL,TSComputeRHSFunctionLinear,NULL); >

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-25 Thread Zhang, Hong via petsc-users
On Jan 25, 2019, at 4:51 PM, Sajid Ali via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hi, If I have a linear time dependent equation I'm trying to solve using TS, I can use : TSSetProblemType(ts,TS_LINEAR); TSSetRHSFunction(ts,NULL,TSComputeRHSFunctionLinear,NULL);

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-07 Thread Balay, Satish via petsc-users
On Mon, 7 Jan 2019, Sajid Ali via petsc-users wrote: > Hi Satish, > > Please find attached the logs for the previous patch for petsc+debug. >>> Compilers: C Compiler:

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-07 Thread Balay, Satish via petsc-users
On Mon, 7 Jan 2019, Sajid Ali wrote: > @Satish Balay : I tried building with the patch and > don't see any difference. Do you want me to send you the config and build > logs to investigate further? Hm - you should see '-g' for 'petsc+debug'. Send the logs. I have - in

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-07 Thread Sajid Ali via petsc-users
> Anyway the FPE occurs in MatSolve_SeqAIJ_NaturalOrdering which usually indicates a zero on the diagonal of the matrix. Is that possible? It looks like this is indeed the case here. Thanks for the hint. @Satish Balay : I tried building with the patch and don't see any difference. Do you want

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Smith, Barry F. via petsc-users
Looks like spack did not compile PETSc with the -g option; which is strange because in both debug and and --with-debugging=0 PETSc ./configure make uses debug symbols #0 __muldc3 (a=-6.6364040265716871e-306, b=1.1689456061105587e-305, c=-0.0024992568840190117, d=0.024886737403015963)

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Sajid Ali via petsc-users
Trying it slightly differently, I do see it's a SIGFPE, arithmetic exception but all it shows is that it's an error in TSSolve but no further than that. [sajid@xrm free_space]$ gdb ex_modify GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7 Copyright (C) 2013 Free Software Foundation, Inc.

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Sajid Ali via petsc-users
Going by the advice given here : https://stackoverflow.com/a/2792735 I tried running the program, hoping to catch the FP exception and I got the error I had before (which turned out to be due to an FP exception as per previous petsc thread): Missing separate debuginfos, use: debuginfo-install

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Smith, Barry F. via petsc-users
Why did you quit the debugger? (gdb) quit Why didn't set the appropriate gdb option for catching floating point exceptions and then type cont ? Barry > On Jan 4, 2019, at 10:24 AM, Sajid Ali > wrote: > > Spack changes the configuration if debug variant is enabled as per this line

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Sajid Ali via petsc-users
I asked in the spack-slack channel and was told to include the explicitly link the gfortran associated with the gcc version I build petsc with. Following that advice, I'm using gcc@7.3.0, linking gcc@7.3.0/lib64 in FFLAGS and setting -g option to CFLAGS in my makefile. Yet, somehow the executable

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Sajid Ali via petsc-users
Should gdb : https://spack.readthedocs.io/en/latest/package_list.html#gdb be listed as an explicit dependency ? Also, why is the error message asking me to re-install my system blas/lapack ? I installed petsc with intel-mkl as blas/lapack provider and the linking failed for superlu-dist. Is that

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-04 Thread Sajid Ali via petsc-users
Spack changes the configuration if debug variant is enabled as per this line : '--with-debugging=%s' % ('1' if '+debug' in spec else '0'), I'm not sure what needs to be done to change this. In the meantime, I added -g to CFLAGS in the makefile and now I have this : https://pastebin.com/wxf05BH0

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-03 Thread Smith, Barry F. via petsc-users
> On Jan 3, 2019, at 8:44 PM, Balay, Satish wrote: > > I guess the primary bug here is 'petsc+debug' option is broken in spack. > > Its not clear to me if a package in spack should have 'debug' option. [so I > should remove this?] Question you should ask the spack folks. Many systems

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-03 Thread Balay, Satish via petsc-users
I guess the primary bug here is 'petsc+debug' option is broken in spack. Its not clear to me if a package in spack should have 'debug' option. [so I should remove this?] since spack way is perhaps: spack install CFLAGS=-g FFLAGS=-g CXXFLAGS=-g petsc Satish On Fri, 4 Jan 2019, Smith, Barry F.

Re: [petsc-users] Question about correctly catching fp_trap

2019-01-03 Thread Smith, Barry F. via petsc-users
This appears to be more a spack question than a PETSc question. That make (that doesn't have the -g) is controlled by spack, not PETSc. Barry > On Jan 3, 2019, at 6:15 PM, Sajid Ali via petsc-users > wrote: > > Hi, > > I've compiled a program using petsc with debugging enabled. >

Re: [petsc-users] Question about PetscViewerHDF5SetTimestep usage

2018-12-20 Thread Sajid Ali via petsc-users
I tried running the same with petsc@develop and it worked. But if the fix was committed on Dec5, then it should in theory work with petsc@3.10.3 . I'm not sure why it doesn't work either.

Re: [petsc-users] Question about PetscViewerHDF5SetTimestep usage

2018-12-20 Thread Smith, Barry F. via petsc-users
I don't understand. I run the program with both the maint and master branch and it works fine in both cases. Barry > On Dec 20, 2018, at 8:58 PM, Sajid Ali via petsc-users > wrote: > > The example is the same as above. Link : https://pastebin.com/cAeZsUgA > > Here's what happens

Re: [petsc-users] Question about PetscViewerHDF5SetTimestep usage

2018-12-20 Thread Sajid Ali via petsc-users
The example is the same as above. Link : https://pastebin.com/cAeZsUgA Here's what happens when I try to compile and run using petsc@3.10.3: https://pastebin.com/EGVSxJu5 Thank You, Sajid Ali Applied Physics Northwestern University

Re: [petsc-users] Question about PetscViewerHDF5SetTimestep usage

2018-12-20 Thread Sajid Ali via petsc-users
This error persists after updating petsc to 3.10.3. On Fri, Dec 14, 2018 at 4:17 PM Matthew Knepley wrote: > I think this was the last commit > (5eab803f81ff61e3e81a6486d2410623a017e36d) in the branch, > but just using the current master should work. > > Matt > > On Fri, Dec 14, 2018 at 4:04

Re: [petsc-users] Question about PetscViewerHDF5SetTimestep usage

2018-12-14 Thread Sajid Ali via petsc-users
Hi Matthew, Thanks for the info. Could you give a specific commit that I should rebuild PETSc with ? I’m currently building with commit=83593104eb216a023c00ab8a3f9897d55e531412'. On Fri, Dec 14, 2018 at 12:56 PM Matthew Knepley wrote: > I believe this is now fixed in 'master', It was a bug in

Re: [petsc-users] Question about DMDAGetElements

2018-11-19 Thread Mark Adams via petsc-users
The local indices of the local mesh and local vectors, which includes ghost vertices. There are global-to-local methods to fill in ghost values and local-to-global methods to create global vectors that you can use for computation. On Mon, Nov 19, 2018 at 5:16 PM Sajid Ali wrote: > Bingo! > >

Re: [petsc-users] Question about DMDAGetElements

2018-11-19 Thread Sajid Ali via petsc-users
Bingo! So, DMDAGetElements gives the indices of the mesh, right ? Thank you !

Re: [petsc-users] Question about DMDAGetElements

2018-11-19 Thread Mark Adams via petsc-users
You seem to be confusing the degree of the mesh and the "degree" of the matrix and vector. A matrix is always N x M (2D if you like), a vector is always N (or 1 x N, or 1D if you like). The mesh in a DM or DA can be 1, 2 or 3D. On Mon, Nov 19, 2018 at 4:44 PM Sajid Ali via petsc-users <

Re: [petsc-users] Question about DMDAGetElements

2018-11-19 Thread Sajid Ali via petsc-users
So, DMDA is used for sparse matrices arising from FD/FE and MatCreateMPIAIJ can be used for dense matrices (though it is strongly discouraged). My confusion stemmed from DMDAGetElements giving the element indices for the 1D mesh/vector of size N(when the DMDACreate1d is used). But these indices

Re: [petsc-users] Question about DMDAGetElements

2018-11-19 Thread Smith, Barry F. via petsc-users
> On Nov 19, 2018, at 3:30 PM, Sajid Ali > wrote: > > I think what confused me was the fact that using DMCreateMatrix(da,) > created a 12x12 matrix with 144 elements but summing up nel*nen from each > rank gives only 2*2+3*2+3*2+3*2=20 elements. So this means that > DMDAGetElements

<    1   2   3   4   5   6   >