Re: [petsc-users] problem with PetscInitialize when moving to 3.19.0

2023-04-15 Thread Matthew Knepley
On Sat, Apr 15, 2023 at 7:28 AM Danny Lathouwers - TNW via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear community, > > I am transitioning a working Fortran code based on version 3.10.4 to > version 3.19.0. > The code compiles except for one problem during linking where > PetscInitialize

Re: [petsc-users] Effect of -pc_gamg_threshold vs PETSc version

2023-04-14 Thread Matthew Knepley
On Fri, Apr 14, 2023 at 8:54 AM Jeremy Theler wrote: > Hi Mark. So glad you answered. > > > 0) what is your test problem? eg, 3D Lapacian with Q1 finite > > elements. > > I said in my first email it was linear elasticty (and I gave a link > where you can see the geometry, BCs, etc.) but I did

Re: [petsc-users] Drawing a line plot with two lines

2023-04-14 Thread Matthew Knepley
On Fri, Apr 14, 2023 at 2:58 AM Smit Thijs wrote: > Hi All, > > > I am trying to plot a loglog plot with two lines, one for my error and one > with a slope of 1. Plotting only the error or only the slope of 1 works > fine, but I like both lines in the same plot (that doesn’t work till now). >

Re: [petsc-users] Using nonzero -pc_hypre_boomeramg_restriction_type in field split

2023-04-13 Thread Matthew Knepley
On Thu, Apr 13, 2023 at 5:07 PM Alexander Lindsay wrote: > Here's the result. > > 0 KSP unpreconditioned resid norm 1.033076851740e+03 true resid norm > 1.033076851740e+03 ||r(i)||/||b|| 1.e+00 > Residual norms for fieldsplit_u_ solve. > 0 KSP Residual norm

Re: [petsc-users] MPI+OpenMP+MKL

2023-04-07 Thread Matthew Knepley
g > spawn, but they remain unused by the code. The previous calculations on the > code show that it is capable of using OpenMP and MKL, only when PETSC > KSPSolver is called MKL seems to be turned off. > > On Fri, Apr 7, 2023 at 8:10 AM Matthew Knepley wrote: > >> On Fri, Ap

Re: [petsc-users] MPI+OpenMP+MKL

2023-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2023 at 10:06 AM Astor Piaz wrote: > Hello petsc-users, > I am trying to use a code that is parallelized with a combination of > OpenMP and MKL parallelisms, where OpenMP threads are able to spawn MPI > processes. > I have carefully scheduled the processes such that the right

Re: [petsc-users] Question about NASM initialization

2023-04-06 Thread Matthew Knepley
On Thu, Apr 6, 2023 at 10:21 AM Takahashi, Tadanaga wrote: > I am following up from the last inquiry. I read the source code nasm.c > and it looks > like sub-snes iteration is being initialized with a scatter call from the > previous

Re: [petsc-users] Installation issues based on Petsc-pardiso et metis

2023-04-06 Thread Matthew Knepley
On Thu, Apr 6, 2023 at 5:21 AM ziming xiong wrote: > Hello, > I want configure Petsc with pardiso and metis , but there is still error, > This seems like a fundamental misunderstanding. There are two ways to run on a Windows machine: 1) You can use Windows compilers and generate .lib

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Matthew Knepley
The documentation does say Entries which cannot be determined are set to '' so I guess we need a guard. Matt On Wed, Apr 5, 2023 at 5:04 PM Kaus, Boris wrote: > That indeed seems to be the issue: > > sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # python3 > Python 3.9.7 (default, Nov 24 2021,

Re: [petsc-users] Define sub-dm from original dm and vector mapping

2023-04-05 Thread Matthew Knepley
On Wed, Apr 5, 2023 at 3:04 PM Mike Michell wrote: > Dear PETSc developer team, > > Hi, this is a follow-up question regarding generating sub-dm for surface > from the original volumetric dm ( > https://lists.mcs.anl.gov/pipermail/petsc-users/2023-March/048263.html). > > I have created a short

Re: [petsc-users] Problem setting Fieldsplit fields

2023-04-05 Thread Matthew Knepley
On Tue, Apr 4, 2023 at 4:02 PM Nicolas Barnafi wrote: > Hi Matt, > > One further question on this. I am working on the code now, but have one > issue. > > The IS I grab from all fields need to be set to the sub PCs, but they > will have a local ordering of the dofs. Is there a tool in PETSc to

Re: [petsc-users] How to use PETSc real version and complex version simultaneously?

2023-04-05 Thread Matthew Knepley
On Wed, Apr 5, 2023 at 1:59 PM gaochenyi14 wrote: > Hi, > > I rely on PETSc to deal with real and complex sparse matrices of dimension > 1e4 * 1e4 or above. I want to use real version when only real matrices are > involved, to achieve better performance, and use complex version only when >

Re: [petsc-users] Questions about the PetscDSSetResidual and Nedelec element.

2023-04-05 Thread Matthew Knepley
, Matt > On Tue, Apr 4, 2023 at 10:59 AM Matthew Knepley wrote: > >> On Tue, Apr 4, 2023 at 10:45 AM neil liu wrote: >> >>> Hello, >>> >>> I am learning this case, >>> https://petsc.org/release/src/snes/tutorials/ex62.c.html >>&g

Re: [petsc-users] Questions about the PetscDSSetResidual and Nedelec element.

2023-04-05 Thread Matthew Knepley
ree -1 \ -q_petscdualspace_order 1 \ -q_petscdualspace_lagrange_trimmed true \ Thanks, Matt > Thanks, > > On Wed, Apr 5, 2023 at 11:16 AM Matthew Knepley wrote: > >> On Wed, Apr 5, 2023 at 10:36 AM neil liu wrote: >> >>> Thanks, Matt. >>> When you said &

Re: [petsc-users] Questions about the PetscDSSetResidual and Nedelec element.

2023-04-05 Thread Matthew Knepley
mn.edu/~arnold//papers/acta.pdf but that was hard to understand for me. There must be a better reference but I do not know it. Thanks, Matt > On Wed, Apr 5, 2023 at 10:12 AM Matthew Knepley wrote: > >> On Wed, Apr 5, 2023 at 10:00 AM neil liu wrote: >> >>> Thanks,

Re: [petsc-users] Questions about the PetscDSSetResidual and Nedelec element.

2023-04-04 Thread Matthew Knepley
On Tue, Apr 4, 2023 at 10:45 AM neil liu wrote: > Hello, > > I am learning this case, > https://petsc.org/release/src/snes/tutorials/ex62.c.html > . And try to make myself familiar with the FEM (PetscFE) there. > Then I have several questions. > 1) PetscDSSetResidual >

Re: [petsc-users] Installation issues based on Petsc-pardiso

2023-04-03 Thread Matthew Knepley
We cannot tell what is going on without the configure.log file for each case. Thanks, Matt On Mon, Apr 3, 2023 at 5:03 AM ziming xiong wrote: > Hello, > I'm trying to configure petsc (Version 3.19.0) with Pardiso, but I keep > getting errors, mainly in the blaslapack part, when I try

Re: [petsc-users] Petsc DMLabel Fortran Stub request

2023-03-27 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 10:03 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users > I apologize. I found this email today and it looks like no one answered. > I am trying to use the sequence of > call DMLabelPropagateBegin(synchLabel,sf,ierr) > call >

Re: [petsc-users] [petsc-maint] DMSwarm documentation

2023-03-27 Thread Matthew Knepley
On Mon, Mar 27, 2023 at 10:19 AM Joauma Marichal < joauma.maric...@uclouvain.be> wrote: > Hello, > > > > I am writing to you as I am trying to find documentation about a function > that would remove several particles (given their index). I was using: > > DMSwarmRemovePointAtIndex(*swarm,

Re: [petsc-users] Using PETSc Testing System

2023-03-27 Thread Matthew Knepley
On Mon, Mar 27, 2023 at 10:19 AM Jacob Faibussowitsch wrote: > Our testing framework was pretty much tailor-made for the PETSc src tree > and as such has many hard-coded paths and decisions. I’m going to go out on > a limb and say you probably won’t get this to work... > I think we can help you

Re: [petsc-users] Overcoming slow convergence with GMRES+Hypre BoomerAMG

2023-03-21 Thread Matthew Knepley
s row-contiguous, which > is why my layout is like this. My understanding is that my IS are set up > correctly to match this matrix structure, which is why I am uncertain why I > am getting the error message. I attached the output of my IS in my previous > message. > > Thank you,

Re: [petsc-users] Overcoming slow convergence with GMRES+Hypre BoomerAMG

2023-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2023 at 6:45 PM Christopher, Joshua via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi Barry and Mark, > > Thank you for your responses. I implemented the index sets in my > application and it appears to work in serial. Unfortunately I am having > some trouble running in

Re: [petsc-users] Create a nest not aligned by processors

2023-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2023 at 12:20 PM Berger Clement wrote: > That seems to be working fine, thank you ! > Great! Thanks Matt > --- > Clément BERGER > ENS de Lyon > > > Le 2023-03-20 15:51, Matthew Knepley a écrit : > > On Mon, Mar 20, 2023 at 10:09 AM Berger

Re: [petsc-users] Create a nest not aligned by processors

2023-03-20 Thread Matthew Knepley
t to MatAIJ via MatConvert, will the vector as built in the example I > showed you work properly ? > > No. MatConvert just changes the storage format, not the ordering. Thanks, Matt > Thank you ! > --- > Clément BERGER > ENS de Lyon > > > Le 2023-03-20 14:58, Matth

Re: [petsc-users] Create a nest not aligned by processors

2023-03-20 Thread Matthew Knepley
ing. Thanks, Matt > Thank you, > --- > Clément BERGER > ENS de Lyon > > > Le 2023-03-20 12:53, Matthew Knepley a écrit : > > On Mon, Mar 20, 2023 at 6:18 AM Berger Clement > wrote: > >> I simplified the problem with the initial test I talked about be

Re: [petsc-users] `snes+ksponly` did not update the solution when ksp failed.

2023-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2023 at 2:41 AM Zongze Yang wrote: > Hi, > > Hope this email finds you well. I am using firedrake to solve linear > problems, which use SNES with KSPONLY. > > I found that the solution did not update when the `ksp` failed with > DIVERGED_ITS. > The macro `SNESCheckKSPSolve`

Re: [petsc-users] Create a nest not aligned by processors

2023-03-20 Thread Matthew Knepley
I need to convert my matrix in MATAIJ format (or at least not > MATNEST), after that if I use a VECNEST for the left and right hanside, I > get an error during the solve procedure, it is removed if I copy my data in > a vector with standard format, I couldn't find any other way > --- &

Re: [petsc-users] PETSc build asks for network connections

2023-03-19 Thread Matthew Knepley
On Sun, Mar 19, 2023 at 1:59 PM Amneet Bhalla wrote: > I'm building PETSc without mpi (I built mpich v 4.1.1 locally). Here is > the configure command line that I used: > > ./configure --CC=mpicc --CXX=mpicxx --FC=mpif90 --PETSC_ARCH=darwin-dbg > --with-debugging=1 --download-hypre=1 --with-x=0

Re: [petsc-users] Create a nest not aligned by processors

2023-03-17 Thread Matthew Knepley
On Fri, Mar 17, 2023 at 2:53 PM Berger Clement wrote: > But this is to properly fill up the VecNest am I right ? Because this one > is correct, but I can't directly use it in the KSPSolve, I need to copy it > into a standard vector > I do not understand what you mean here. You can definitely use

Re: [petsc-users] Create a nest not aligned by processors

2023-03-17 Thread Matthew Knepley
On Fri, Mar 17, 2023 at 2:23 PM Berger Clement wrote: > My issue is that it seems to improperly with some step of my process, the > solve step doesn't provide the same result depending on the number of > processors I use. I manually tried to multiply one the matrices I defined > as a nest

Re: [petsc-users] Question about MatView

2023-03-17 Thread Matthew Knepley
On Fri, Mar 17, 2023 at 5:51 AM user_gong Kim wrote: > Hello, > > > > I have 2 questions about MatView. > > > > 1.I would like to ask if the process below is possible. > When running in parallel, is it possible to make the matrix of the mpiaij > format into a txt file, output it, and read it

Re: [petsc-users] Difference between opt and debug

2023-03-16 Thread Matthew Knepley
On Thu, Mar 16, 2023 at 8:26 AM user_gong Kim wrote: > Hello, > > I have some issues about different mode and different command. > > 1. Exactly the same code, but no error occurs in debug mode, but an error > occurs in opt mode. > In this case, what should I be suspicious of? > Memory

Re: [petsc-users] Question about time issues in parallel computing

2023-03-15 Thread Matthew Knepley
On Wed, Mar 15, 2023 at 3:38 AM ­권승리 / 학생 / 항공우주공학과 wrote: > Dear petsc developers. > > Hello. > I am trying to solve the structural problem with FEM and test parallel > computing works well. > > However, even if I change the number of cores, the total time is > calculated the same. > > I have

Re: [petsc-users] Memory Usage in Matrix Assembly.

2023-03-15 Thread Matthew Knepley
need to switch. Thanks Matt > Pantelis > ------ > *From:* Matthew Knepley > *Sent:* Tuesday, March 14, 2023 10:55 PM > *To:* Dave May > *Cc:* Pantelis Moschopoulos ; > petsc-users@mcs.anl.gov > *Subject:* Re: [petsc-users] Memory Usage in Matrix As

Re: [petsc-users] Memory Usage in Matrix Assembly.

2023-03-14 Thread Matthew Knepley
On Tue, Mar 14, 2023 at 12:01 PM Dave May wrote: > > > On Tue, 14 Mar 2023 at 07:59, Pantelis Moschopoulos < > pmoschopou...@outlook.com> wrote: > >> Dear Dave, >> >> Yes, I observe this in parallel runs. How I can change the parallel >> layout of the matrix? In my implementation, I read the

Re: [petsc-users] Dmplex+PetscFe+KSP

2023-03-14 Thread Matthew Knepley
On Tue, Mar 14, 2023 at 12:11 PM Barry Smith wrote: > > Matt can help you more directly. > > Barry > > > On Mar 14, 2023, at 11:40 AM, Jonathan Davud Razi Seyed Mirpourian < > jd...@dtu.dk> wrote: > > Dear Barry, > > Thank you very much for the quick answer! > > To my understanding, in the

Re: [petsc-users] petsc4py did not raise for a second time with option `ksp_error_if_not_converged`

2023-03-05 Thread Matthew Knepley
On Sun, Mar 5, 2023 at 3:14 AM Zongze Yang wrote: > > > Hello, > > I am trying to catch the "not converged" error in a loop with the > `ksp_error_if_not_converged` option on. However, it seems that PETSc only > raises the exception once, even though the solver does not converge after > that. Is

Re: [petsc-users] PETSC ERROR in DMGetLocalBoundingBox?

2023-03-03 Thread Matthew Knepley
On Sat, Mar 4, 2023 at 1:35 AM wrote: > Hi All, > > > > I get a very strange error after upgrading PETSc version to 3.18.3, > indicating some object is already free. The error is begin and does not > crash the code. There is no error before PETSc 3.17.5 versions. > We have changed the way

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
On Mon, Feb 27, 2023 at 10:26 AM Pierre Jolivet wrote: > On 27 Feb 2023, at 4:16 PM, Matthew Knepley wrote: > > On Mon, Feb 27, 2023 at 10:13 AM Pierre Jolivet wrote: > >> On 27 Feb 2023, at 3:59 PM, Matthew Knepley wrote: >> >> On Mon, Feb 27, 2023 at 9:53 AM

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
On Mon, Feb 27, 2023 at 10:13 AM Pierre Jolivet wrote: > On 27 Feb 2023, at 3:59 PM, Matthew Knepley wrote: > > On Mon, Feb 27, 2023 at 9:53 AM Zongze Yang wrote: > >> Hi, Matt, >> >> I tested coarsening a mesh by using ParMMg without firedrake, and found &g

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
k and give some comments or suggestions? > I replied on the issue. More generally, the adaptive refinement software has not seen wide use, and I expect more of these kinds of bugs until more people use it. Thanks, Matt > Best wishes, > Zongze > > > On Mon, 27 Feb 2023 at 20:19, M

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
s, Matt > Best wishes, > Zongze > > > On Mon, 27 Feb 2023 at 20:18, Matthew Knepley wrote: > >> On Sat, Feb 18, 2023 at 2:25 AM Zongze Yang wrote: >> >>> Dear PETSc Group, >>> >>> I am writing to inquire about the function DMAdaptLabel in P

Re: [petsc-users] petsc compiled without MPI

2023-02-27 Thread Matthew Knepley
On Mon, Feb 27, 2023 at 8:41 AM Long, Jianbo wrote: > Thanks for the explanations ! It turns out the issue of running > sequentially compiled petsc is PetscFinalize() function. Since my > subroutine involving petsc functions needs to be called multiple times in > the program, I have to comment

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
On Sat, Feb 18, 2023 at 6:41 AM Zongze Yang wrote: > Another question on mesh coarsening is about `DMCoarsen` which will fail > when running in parallel. > > I generate a mesh in Firedrake, and then create function space and > functions, after that, I get the dmplex and coarsen it. > When

Re: [petsc-users] Inquiry regarding DMAdaptLabel function

2023-02-27 Thread Matthew Knepley
On Sat, Feb 18, 2023 at 2:25 AM Zongze Yang wrote: > Dear PETSc Group, > > I am writing to inquire about the function DMAdaptLabel in PETSc. > I am trying to use it coarse a mesh, but the resulting mesh is refined. > > In the following code, all of the `adpat` label values were set to 2 >

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-26 Thread Matthew Knepley
>>>>>>> Number of physical boundary edge ...4 0 >>>>>>>> Number of physical and parallel boundary edge ...4 >>>>>>>> 0 >>>>>>>> Number of parallel boundary edge ...

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-26 Thread Matthew Knepley
;>>>> 0x6030f0f0 at pc 0x00010cf702a8 bp 0x7ffee2c9dfd0 sp 0x7ffee2c9dfc8 >>>>>> READ of size 8 at 0x6030f0f0 thread T0 >>>>>> #0 0x10cf702a7 in MAIN__ test.F90:657 >>>>>> #1 0x10cf768ee in main test.F90:43 >>>>>>

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-26 Thread Matthew Knepley
ht of 32-byte region >>>> [0x60322d20,0x60322d40) >>>> allocated by thread T0 here: >>>> #0 0x114a7457f in wrap_malloc (libasan.5.dylib:x86_64+0x7b57f) >>>> #1 0x1068dba71 in MAIN__ test.F90:499 >>>> #2 0x10

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-26 Thread Matthew Knepley
0x1068e78ee in main test.F90:43 >> #3 0x7fff6b80acc8 in start (libdyld.dylib:x86_64+0x1acc8) >> >> SUMMARY: AddressSanitizer: heap-buffer-overflow test.F90:657 in MAIN__ >> Shadow bytes around the buggy address: >> >> which corresponds to >> >>

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-26 Thread Matthew Knepley
ual face for inner face axrf(ifa,1) = 0.5d0*(yc(nc1)+yfc(ifa)) ! for nc1 cell axrf(ifa,2) = 0.5d0*(yc(nc2)+yfc(ifa)) ! for nc2 cell and these were allocated here allocate(xc(ncell)) allocate(yc(ncell)) Hopefully the error is straightforward to see now. Thanks, Matt >

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-22 Thread Matthew Knepley
ence, Simulation, and Learning Division > Fermi National Accelerator Laboratory > s-sajid-ali.github.io > > -- > *From:* Matthew Knepley > *Sent:* Wednesday, February 22, 2023 5:23 PM > *To:* Sajid Ali Syed > *Cc:* Barry Smith ; petsc-users@mcs.anl

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-22 Thread Matthew Knepley
> https://gitlab.com/petsc/petsc/-/merge_requests/6075 > <https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.com_petsc_petsc_-2D_merge-5Frequests_6075=DwMFaQ=gRgGjJ3BkIsb5y6s49QqsA=w-DPglgoOUOz8eiEyHKz0g=P7R0CW9R-fGNfm2q3yTL-ehqhM5N9-r8hHBLNgDetm9-7jxVqNsujIZ2hdnhVrVX=QwRI_DzGnCHagpa

Re: [petsc-users] MG on GPU: Benchmarking and avoiding vector host->device copy

2023-02-22 Thread Matthew Knepley
On Wed, Feb 22, 2023 at 5:45 PM Paul Grosse-Bley < paul.grosse-b...@ziti.uni-heidelberg.de> wrote: > I thought to have observed the number of cycles > with -pc_mg_multiplicative_cycles to be dependent on rtol. But I might have > seen this with maxits=0 which would explain my missunderstanding of

Re: [petsc-users] MG on GPU: Benchmarking and avoiding vector host->device copy

2023-02-22 Thread Matthew Knepley
On Wed, Feb 22, 2023 at 4:57 PM Paul Grosse-Bley < paul.grosse-b...@ziti.uni-heidelberg.de> wrote: > Hi again, > > I now found out that > > 1. preonly ignores -ksp_pc_side right (makes sense, I guess). > 2. richardson is incompatible with -ksp_pc_side right. > 3. preonly gives less output for

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-21 Thread Matthew Knepley
On Mon, Feb 20, 2023 at 12:05 PM Matthew Knepley wrote: > On Sat, Feb 18, 2023 at 12:00 PM Mike Michell > wrote: > >> As a follow-up, I tested: >> >> (1) Download tar for v3.18.4 from petsc gitlab ( >> https://gitlab.com/petsc/petsc/-/tree/v3.18.4) has no

Re: [petsc-users] DMPlex Halo Communication or Graph Partitioner Issue

2023-02-20 Thread Matthew Knepley
On Sat, Feb 18, 2023 at 12:00 PM Mike Michell wrote: > As a follow-up, I tested: > > (1) Download tar for v3.18.4 from petsc gitlab ( > https://gitlab.com/petsc/petsc/-/tree/v3.18.4) has no issue on DMPlex > halo exchange. This version works as I expect. > (2) Clone main branch (git clone

Re: [petsc-users] TS failed due to diverged_step_rejected

2023-02-17 Thread Matthew Knepley
is a controller for adaptive timestepping. It is on by default, but I suspect that you step into an unphysical regime, which makes its estimates unreliable. Thanks, Matt > Thank you, > > Jiannan > > > > *From: *Matthew Knepley > *Sent: *Friday, February 17, 2

Re: [petsc-users] TS failed due to diverged_step_rejected

2023-02-17 Thread Matthew Knepley
I am not sure what TS you are using, but the estimate of the local truncation error is 91.4, and does not seem to change when you make the step smaller, so something is off. You can shut off the adaptivity using -ts_adapt_type none Thanks, Matt On Fri, Feb 17, 2023 at 3:01 PM Tu,

Re: [petsc-users] Help with fieldsplit performance

2023-02-17 Thread Matthew Knepley
On Fri, Feb 17, 2023 at 7:09 AM Edoardo alinovi wrote: > Thanks Matt, That was my thinking. > > So If I am going to build my own Schur approximation matrix, I guess I can > forget about the numbering issue, correct? > Yes, you just match the numbering you are using. Thanks, Matt --

Re: [petsc-users] Help with fieldsplit performance

2023-02-17 Thread Matthew Knepley
On Tue, Feb 14, 2023 at 1:43 PM Edoardo alinovi wrote: > Hi Matt, > > So I have done some research these days and I have found out that I might > try to assemble the SIMPLE for Schur approximation (myS = A11 - A10 > inv(DIAGFORM(A00)) A01). > I show this on some slides. You can do it with

Re: [petsc-users] Question about rank of matrix

2023-02-17 Thread Matthew Knepley
On Fri, Feb 17, 2023 at 2:43 AM user_gong Kim wrote: > Hello, > > I have a question about rank of matrix. > At the problem > Au = b, > > In my case, sometimes global matrix A is not full rank. > In this case, the global matrix A is more likely to be singular, and if it > becomes singular, the

Re: [petsc-users] dmplex overlap questions

2023-02-16 Thread Matthew Knepley
On Thu, Feb 16, 2023 at 1:09 PM Lawrence Mitchell wrote: > On Thu, 16 Feb 2023 at 16:43, Matthew Knepley wrote: > > > > On Thu, Feb 16, 2023 at 10:54 AM Lawrence Mitchell wrote: > >> > >> Hi Blaise, > >> > >> On Thu, 16 Feb 2023

Re: [petsc-users] dmplex overlap questions

2023-02-16 Thread Matthew Knepley
On Thu, Feb 16, 2023 at 10:54 AM Lawrence Mitchell wrote: > Hi Blaise, > > On Thu, 16 Feb 2023 at 15:17, Blaise Bourdin wrote: > > > > Hi, > > > > I am trying to implement a non-local finite elements reconstruction > operator in parallel. > > > > Given a dmplex distributed with an overlap, is

Re: [petsc-users] Question for Petsc

2023-02-16 Thread Matthew Knepley
On Thu, Feb 16, 2023 at 9:14 AM ziming xiong wrote: > Hello, > I want to use Petsc to implement high performance computing, and I mainly > want to apply DDM methods to parallel computing. I have implemented some of > the DDM methods (such as ASM, Bjacobi, etc.), but I don't understand the >

Re: [petsc-users] Question about preconditioner

2023-02-16 Thread Matthew Knepley
On Thu, Feb 16, 2023 at 2:43 AM user_gong Kim wrote: > > > Hello, > > > > There are some questions about some preconditioners. > > The questions are from problem Au=b. The global matrix A has zero value > diagonal terms. > > 1. Which preconditioner is preferred for matrix A which has zero >

Re: [petsc-users] PetscViewer with 64bit

2023-02-14 Thread Matthew Knepley
On Tue, Feb 14, 2023 at 11:45 AM Mike Michell wrote: > I was trying to modify the header flags from "Int32" to "Int64", but the > problem was not resolved. Could I get any additional comments? > The calculated offsets are not correct I think. Matt > Thanks, > Mike > > >> Thanks for the

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-14 Thread Matthew Knepley
One complication is that you will have to hold the new ISes until the end, and then set them. Thanks, Matt > Best, > NB > > On 06/02/23 17:57, Matthew Knepley wrote: > > On Mon, Feb 6, 2023 at 11:45 AM Nicolas Barnafi > wrote: > >> Thank you Matt, >>

Re: [petsc-users] Segregated solvers in PETSc

2023-02-14 Thread Matthew Knepley
On Tue, Feb 14, 2023 at 9:25 AM Miguel Angel Salazar de Troya < miguel.sala...@corintis.com> wrote: > Hello, > > I am solving the Navier-Stokes equation and an advection-diffusion > equation to model the temperature. They are fully coupled because the > viscosity is temperature dependent. I plan

Re: [petsc-users] MatMatMul inefficient

2023-02-13 Thread Matthew Knepley
On Mon, Feb 13, 2023 at 9:21 AM Guido Margherita via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi all, > > I realised that performing a matrix-matrix multiplication using the > function MatMatMult it is not at all computationally efficient with respect > to performing N times a

Re: [petsc-users] PetscViewer with 64bit

2023-02-12 Thread Matthew Knepley
On Sun, Feb 12, 2023 at 6:15 PM Mike Michell wrote: > Dear PETSc team, > > I am a user of PETSc with Fortran. My code uses DMPlex to handle dm > object. To print out output variable and mesh connectivity, I use VecView() > by defining PetscSection on that dm and borrow a vector. The type of the

Re: [petsc-users] GPUs and the float-double dilemma

2023-02-10 Thread Matthew Knepley
On Fri, Feb 10, 2023 at 11:31 AM Junchao Zhang wrote: > > On Fri, Feb 10, 2023 at 8:16 AM Ces VLC wrote: > >> Hi! >> >> I searched if it’s supported to link an application to two different >> builds of PETSc (one configured as float precision, and the other as >> double). The last post I found

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Matthew Knepley
On Thu, Feb 9, 2023 at 6:05 PM Sajid Ali Syed via petsc-users < petsc-users@mcs.anl.gov> wrote: > I added “-malloc_debug” in a .petscrc file and ran it again. The backtrace > from lldb is in the attached file. The crash now seems to be at: > > Process 32660 stopped* thread #1, queue =

Re: [petsc-users] DMPlex Reordering

2023-02-08 Thread Matthew Knepley
On Mon, Jul 25, 2022 at 11:54 AM Matthew Knepley > wrote: > >> On Mon, Jul 25, 2022 at 10:11 AM Nicholas Arnold-Medabalimi < >> narno...@umich.edu> wrote: >> >>> Hi Petsc users, >>> >>> I have been working on how to read in meshes into

Re: [petsc-users] MG on GPU: Benchmarking and avoiding vector host->device copy

2023-02-07 Thread Matthew Knepley
On Tue, Feb 7, 2023 at 6:23 AM Mark Adams wrote: > I do one complete solve to get everything setup, to be safe. > > src/ts/tutorials/ex13.c does this and runs multiple solves, if you like > but one solve is probably fine. > I think that is SNES ex13 Matt > This was designed as a benchmark

Re: [petsc-users] Eliminating rows and columns which are zeros

2023-02-06 Thread Matthew Knepley
On Mon, Feb 6, 2023 at 4:45 PM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > No problem. I don’t completely follow. > > > > (Q1) I have used MATMPIAJI but not sure what is MatZero* (star) and what > it does? And its relevance to my problem. > Barry means MatZeroRows(),

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-06 Thread Matthew Knepley
94770066934048 94770100861088 > [0] PetscCommDuplicate(): Using internal PETSc communicator > 94770066934048 94770100861088 > [0] PetscCommDuplicate(): Using internal PETSc communicator > 94770066934048 94770100861088 > [0] PCSetUp(): Leaving PC with identical preconditioner sin

Re: [petsc-users] Help with fieldsplit performance

2023-02-05 Thread Matthew Knepley
On Sun, Feb 5, 2023 at 3:56 PM Edoardo alinovi wrote: > Maybe I managed to find out the number of iters of the field split by > adding: fieldsplit_u_ksp_converged_reason. > You also want -fieldsplit_p_ksp_converged_reason so we can see the iterates for the Schur complement. > This gets

Re: [petsc-users] Help with fieldsplit performance

2023-02-05 Thread Matthew Knepley
On Sun, Feb 5, 2023 at 1:26 PM Edoardo alinovi wrote: > Hello Petsc's crew, > > I would like to ask for some support in setting up the fieldsplit > preconditioner in order to obtain better performance. I have already found > some posts on the topic and keep experimenting, but I would like to

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-03 Thread Matthew Knepley
On Fri, Feb 3, 2023 at 3:03 PM Nicolas Barnafi wrote: > > There are a number of common errors: > > > >1) Your PC has a prefix > > > >2) You have not called KSPSetFromOptions() here > > > > Can you send the -ksp_view output? > > The PC at least has no prefix. I had to set ksp_rtol to 1 to

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-03 Thread Matthew Knepley
1) Your PC has a prefix 2) You have not called KSPSetFromOptions() here Can you send the -ksp_view output? Thanks, Matt > Best > > On 03-02-23 16:50, Matthew Knepley wrote: > > On Fri, Feb 3, 2023 at 2:46 PM Nicolas Barnafi via petsc-users > > mailto:pets

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-03 Thread Matthew Knepley
On Fri, Feb 3, 2023 at 2:46 PM Nicolas Barnafi via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear community, > > I am using a fieldsplit preconditioner, but for some reason I cannot > group fields as in other libraries (i.e. I do this in Firedrake and it > works). Some context: > > I have

Re: [petsc-users] Eliminating rows and columns which are zeros

2023-02-03 Thread Matthew Knepley
On Fri, Feb 3, 2023 at 1:05 PM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Thank you. The entire error output was an attachment in my previous email. > I am pasting here for your reference. > The options "-options_left" does not take effect until PetscFinalize(), but your

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread Matthew Knepley
ee what you get? If it is on all processes, it should work. Thanks, Matt > Hyung Kim > > > > > > > > 2023년 2월 3일 (금) 오후 10:54, Matthew Knepley 님이 작성: > >> On Fri, Feb 3, 2023 at 8:52 AM 김성익 wrote: >> >>> I want to extract same row val

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread Matthew Knepley
can't find same function for matrix. > > Hyung Kim > > 2023년 2월 3일 (금) 오후 10:47, Matthew Knepley 님이 작성: > >> On Fri, Feb 3, 2023 at 8:45 AM 김성익 wrote: >> >>> Following your comments, >>> If I extract first row of below matrix. >>> [imag

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread Matthew Knepley
On Fri, Feb 3, 2023 at 8:06 AM 김성익 wrote: > Following your comments, > I want to check below things. > For example, the global dense matrix are as below. > [image: image.png] > If I want to get first row ('1 2 0 0 3 0 0 4') in Proc 1. > Then I should put 'MatCreateSubMatrix >

Re: [petsc-users] Composite preconditioners in petsc4py

2023-01-31 Thread Matthew Knepley
for iOS <https://aka.ms/o0ukef> > ------ > *From:* Matthew Knepley > *Sent:* Tuesday, January 31, 2023 6:55:29 AM > *To:* Adolfo Rodriguez > *Cc:* petsc-users > *Subject:* Re: [petsc-users] Composite preconditioners in petsc4py > > On Mon, Jan

Re: [petsc-users] Composite preconditioners in petsc4py

2023-01-31 Thread Matthew Knepley
On Mon, Jan 30, 2023 at 6:56 PM Adolfo Rodriguez wrote: > Hi, > > how do you use composite preconditioners in petsc4py. I used to have a > script that worked but it does not work anymore. Something has changed. Any > simple examples? > Do you mean using PCCOMPOSITE? Thanks, Matt >

Re: [petsc-users] Kronecker Product

2023-01-30 Thread Matthew Knepley
ase (for me at least) is to create several large sparse matrices > which will be combined in various ways through Kronecker products. The > combination happens at every time step in an evolution, so it really needs > to be fast as well. I’m thinking mpi/petsc is probably not the most > op

Re: [petsc-users] Kronecker Product

2023-01-30 Thread Matthew Knepley
On Mon, Jan 30, 2023 at 2:24 PM Guglielmo, Tyler Hardy via petsc-users < petsc-users@mcs.anl.gov> wrote: > Thanks Barry, > > > > I saw that function, but wasn’t sure how to apply it since the > documentation says that S and T are dense matrices, but in my case all > matrices involved are sparse.

Re: [petsc-users] reading and writing periodic DMPlex to file

2023-01-24 Thread Matthew Knepley
works fine for me. > Will try again with current main. Thanks Matt > Thanks, best, Berend. > > > On 12/15/22 18:56, Matthew Knepley wrote: > > On Wed, Dec 14, 2022 at 3:58 AM Berend van Wachem > > mailto:berend.vanwac...@ovgu.de>> wrote: > > > > > >

Re: [petsc-users] Using PCREDISTRIBUTE together with PCFIELDSPLIT

2023-01-23 Thread Matthew Knepley
On Mon, Jan 23, 2023 at 9:18 AM Jonas Lundgren via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi! > > > > (Sorry for a long message, I have tried to cover the essentials only. I am > happy to provide further details and logs if necessary, but I have tried to > keep it as short as possible.)

Re: [petsc-users] Using PCREDISTRIBUTE together with PCFIELDSPLIT

2023-01-23 Thread Matthew Knepley
On Mon, Jan 23, 2023 at 9:18 AM Jonas Lundgren via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi! > > > > (Sorry for a long message, I have tried to cover the essentials only. I am > happy to provide further details and logs if necessary, but I have tried to > keep it as short as possible.)

Re: [petsc-users] Interpreting Redistribution SF

2023-01-20 Thread Matthew Knepley
to the original root should have > the same value so I won't have an ambiguity, correct? > That is right, so it should give you the result you expect. Thanks, Matt > On Thu, Jan 19, 2023 at 9:28 PM Matthew Knepley wrote: > >> On Thu, Jan 19, 2023 at 9:13 PM Nich

Re: [petsc-users] Interpreting Redistribution SF

2023-01-19 Thread Matthew Knepley
gt; Yes, definitely. Thanks, Matt > Thanks > Nicholas > > > On Thu, Jan 19, 2023 at 8:28 PM Matthew Knepley wrote: > >> On Thu, Jan 19, 2023 at 11:58 AM Nicholas Arnold-Medabalimi < >> narno...@umich.edu> wrote: >> >>> Hi Petsc Users

Re: [petsc-users] Interpreting Redistribution SF

2023-01-19 Thread Matthew Knepley
On Thu, Jan 19, 2023 at 11:58 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users > > I'm working with a distribution start forest generated by > DMPlexDistribute and PetscSFBcast and Reduce to move data between the > initial distribution and the distribution generated by

Re: [petsc-users] DMPlex and CGNS

2023-01-16 Thread Matthew Knepley
On Mon, Jan 16, 2023 at 6:15 PM Jed Brown wrote: > How soon do you need this? I understand the grumbling about CGNS, but it's > easy to build, uses HDF5 parallel IO in a friendly way, supports high order > elements, and is generally pretty expressive. I wrote a parallel writer > (with some

Re: [petsc-users] Nonconforming object sizes using TAO (TAOBNTR)

2023-01-13 Thread Matthew Knepley
nzeros=2932, allocated nonzeros=2932 > > total number of mallocs used during MatSetValues calls=0 > > not using I-node (on process 0) routines > > total KSP iterations: 103 > > Active Set subset type: subvec > > convergence tolerances: gatol=0.0001,

Re: [petsc-users] Nonconforming object sizes using TAO (TAOBNTR)

2023-01-13 Thread Matthew Knepley
On Fri, Jan 13, 2023 at 11:22 AM Alexis Marboeuf wrote: > Hi all, > > In a variational approach of brittle fracture setting, I try to solve a > bound constraint minimization problem using TAO. I checkout on the main > branch of Petsc. Minimization with respect to the bounded variable (damage) >

Re: [petsc-users] Retreiving a PetscObject

2023-01-13 Thread Matthew Knepley
time. This means that you are in charge of that list. 2. DM has named vectors ( https://petsc.org/release/docs/manualpages/DM/DMGetNamedGlobalVector/) but not matrices You could probably just extract the DM code to manage your objects. Thanks, Matt > Thanks, > > Eric > >

Re: [petsc-users] Retreiving a PetscObject

2023-01-13 Thread Matthew Knepley
On Fri, Jan 13, 2023 at 4:24 AM Eric Chamberland < eric.chamberl...@giref.ulaval.ca> wrote: > Hi, > > Is it possible with PETSc's API to query an objet by it's name? > > Is there a "global" database with all PETScObject created? > No, we do not store that information. What would the use case be?

<    1   2   3   4   5   6   7   8   9   10   >