Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread Matthew Knepley
If you want to make a PR with your hack, we can help build out the infrastructure for what Jed is recommending. Thanks, Matt On Fri, Aug 4, 2023 at 2:56 PM Jed Brown wrote: > Yeah, we'd like the implementation to stay in alpha2.c. There could be a > new interface

Re: [petsc-users] PETSc :: FEM Help

2023-08-04 Thread Matthew Knepley
t/outlet labels where being constructed on dmSurface. I fixed this. 2) The 14/7 faceIDs do not appear to be the ones you want. Here is corrected source. Can you look at the labels? Thanks, Matt > Thank you. > Brandon > > > ------ > *From:* Matthew Kneple

Re: [petsc-users] DMPlex edge/vertex orientation

2023-08-04 Thread Matthew Knepley
On Fri, Aug 4, 2023 at 12:06 PM onur.notonur via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi, > > I'm currently working with 3D DMPlex and performing crucial calculations > involving face normals and edge tangents. I've noticed that face normals > are directed from support[0] to

Re: [petsc-users] compiler related error (configuring Petsc)

2023-08-02 Thread Matthew Knepley
On Wed, Aug 2, 2023 at 9:32 AM maitri ksh wrote: > I could compile petsc using the newer version of gnu compiler. > However, there is some unusual error when I tried to test petsc using a > print 'hello' file. I could not interpret what the error ('*error.txt*') > is, but it says something

Re: [petsc-users] PETSc :: FEM Help

2023-08-01 Thread Matthew Knepley
Sorry about this. I signed up for a conference without the work done, with predictable results. I have just returned home. There were just a few small problems. First, the labels were attached to dmSurface, but you wanted them on dm. They got destroyed with dmSurface before setting the BC.

Re: [petsc-users] [petsc-maint] Monolithic AMG with fieldsplit as smoother

2023-07-26 Thread Matthew Knepley
On Thu, Jul 27, 2023 at 12:48 AM Jed Brown wrote: > AMG is subtle here. With AMG for systems, you typically feed it elements > of the near null space. In the case of (smoothed) aggregation, the coarse > space will have a regular block structure with block sizes equal to the > number of near-null

Re: [petsc-users] Inverse of a Large Sparse Matrix

2023-07-26 Thread Matthew Knepley
On Wed, Jul 26, 2023 at 8:13 AM maitri ksh wrote: > I have a large sparse matrix (48x48) and I need to take its > inverse and use it to solve an eigenvalue problem. According to > petsc-archive > , >

Re: [petsc-users] UNABLE to read '.mat' file with 'PetscViewerHDF5Open' (WSL-Ubuntu22.04)

2023-07-25 Thread Matthew Knepley
On Tue, Jul 25, 2023 at 3:12 AM maitri ksh wrote: > Hi, > I am new to Petsc, here are some details of the relevant softwares I am > using: > 1. petsc-3.19.3 (on wsl-ubuntu22.04 platform) > 2. MATLAB-R2022a > 3. hdf5-1.10.7 (checked using 'pkg-config --modversion hdf5') > 4. configured using:

Re: [petsc-users] 3D Poisson solver failed in KSPSolve when number of cores is larger than one

2023-07-24 Thread Matthew Knepley
On Mon, Jul 24, 2023 at 8:16 PM Thuc Bui wrote: > Dear PETSc Users/Developers. > > > > I have been successfully using PETsc on Windows without MPI for a while > now. I have now attempted to implement PETSc with MPI on Windows 10. I have > built a release version of PETSc 3.18.6 with MS MPI

Re: [petsc-users] support for mixed block size matrices/AIM in PETSc?

2023-07-24 Thread Matthew Knepley
On Mon, Jul 24, 2023 at 6:34 AM Daniel Stone wrote: > Hello PETSc Users/Developers, > > A collegue of mine is looking into implementing an adaptive implicit > method (AIM) over > PETSc in our simulator. This has led to some interesting questions about > what can > be done with blocked matrices,

Re: [petsc-users] Matrix assembly problem of overlapped DMPlex

2023-07-23 Thread Matthew Knepley
On Sun, Jul 23, 2023 at 11:54 AM 袁煕 wrote: > 袁煕 > 0:50 (0 分前) > To PETSc > Hi, > > I used PETSc to assemble a FEM stiff matrix of an overlapped (overlap=2) > DMPlex and used the MUMPS solver to solve it. But I got a > different solution by using 1 CPU and MPI parallel computation. I am >

Re: [petsc-users] HELP: How to compile Fortran 2008 files using Petsc.

2023-07-22 Thread Matthew Knepley
On Sat, Jul 22, 2023 at 10:50 AM s.pradeep kumar wrote: > Hi, > > Petsc by default seems to only recognize only the following files > > // > .SUFFIXES: .F .F90 .f90 ${SUFFIXES} .PETSc .C .cc .cpp .cxx .r .rm .so > .html .ad .m .F95 .f95 .fiat .cu .hip.cpp .kokkos.cxx .raja.cxx *.sycl.cxx > // >

Re: [petsc-users] Python version of VecDuplicateVecs

2023-07-19 Thread Matthew Knepley
On Wed, Jul 19, 2023 at 7:59 AM Karsten Bolding < kars...@bolding-bruggeman.com> wrote: > Hello > > I'm re-implementing a model from mixed C/Fortran to Python where Petsc is > used for matrix/vector operations. > > In the C-code I have: > ierr = VecDuplicateVecs(templateVec,numTracers,); > to

Re: [petsc-users] periodic boundary conditions

2023-07-19 Thread Matthew Knepley
t is in the documentation). For AMG you need to specify the coarse solver. I know this works with GAMG, you use -mg_coarse_pc_type svd Thanks, Matt > Kind regards, > > Karthik. > > > > > > *From: *Matthew Knepley > *Date: *Tuesday, 18 July 2023 at 17:

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
> > Best, > Karthik. > > > *From: *Barry Smith > *Date: *Tuesday, 18 July 2023 at 16:58 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) < > karthikeyan.chockalin...@stfc.ac.uk> > *Cc: *Matthew Knepley , petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov&g

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
x = P x’ > > > > Say for 1-D problem with two elements > > (1)-(2)(3) > > > > P = [1 0, 0 1, 1 0] > > x = [x1 x2 x3] > > x’ = [x1 x2] > > > > and solve > > [P^T A P] x’ = P^T b > > > > I don’t think [P^T

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
On Tue, Jul 18, 2023 at 9:02 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Hello, > > > > This is exactly not a PETSc question. I am solving a Poisson equation > using finite elements. I would like to impose PBC. I am thinking of using > the Lagrange multiplier method to

Re: [petsc-users] Bug Report TaoALMM class

2023-07-17 Thread Matthew Knepley
Toby and Hansol, Has anyone looked at this? Thanks, Matt On Mon, Jun 12, 2023 at 8:24 AM Stephan Köhler < stephan.koeh...@math.tu-freiberg.de> wrote: > Dear PETSc/Tao team, > > I think there might be a bug in the Tao ALMM class: In the function >

Re: [petsc-users] Inquiry about reading the P2 tetrahedron mesh from GMSH

2023-07-17 Thread Matthew Knepley
On Fri, Jun 30, 2023 at 4:40 PM neil liu wrote: > Dear Petsc developers, > > I am reading P2 mesh from GMSH. And used DMFieldGetClosure_Internal to > check the coordinates for each tetrahedron, It seems reasonable. > But when I tried DMGetCoordinates (dm, ), it seems the vector > global is not

Re: [petsc-users] [EXTERNAL] PETSc Installation Assistance

2023-07-17 Thread Matthew Knepley
Hi Jesus, I think you are on main. Did everything you have get rebuilt? Toby just rewrote large sections of logging and this is right where it fails for you. It should be easy to see what is wrong by running in the debugger. Thanks, Matt On Mon, Jul 17, 2023 at 3:11 PM Pierre Jolivet

Re: [petsc-users] Parallel matrix multiplication

2023-07-17 Thread Matthew Knepley
On Mon, Jul 17, 2023 at 2:22 PM Barry Smith wrote: > > >https://petsc.org/release/manualpages/Mat/MatPtAP/ also note that > PETSc has a large infrastructure for efficient ways to compute various > matrix-matrix operations with a variety of algorithms that can be all > accessed by starting

Re: [petsc-users] Structured (DMDA) vs Unstructured (DMPlex) meshes

2023-07-17 Thread Matthew Knepley
On Mon, Jul 17, 2023 at 12:48 PM Barry Smith wrote: > >The largest potential advantage of DMDA is likely the possibility of > easily using geometric multigrid if it is appropriate for the problem (or > subproblem of the problem) you are solving. The second advantage is, this > depends on

Re: [petsc-users] petscconf.h missing building cpp file with dolfinx?

2023-07-17 Thread Matthew Knepley
On Mon, Jul 17, 2023 at 10:55 AM philliprusso via petsc-users < petsc-users@mcs.anl.gov> wrote: > I cloned petsc source for use with dolfinx project. So after .configure > mak sudo make install I found there was some type of difficulty with the > destination directory so I copied the files

Re: [petsc-users] windows build

2023-07-17 Thread Matthew Knepley
On Mon, Jul 17, 2023 at 6:08 AM Константин via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello. I have such problem, while I'm making petsc > $ make > C:/cygwin64/home/itugr/asd/petsc//lib/petsc/conf/petscvariables:140: *** > Too many open files. Stop. > Are there any advices how to fix

Re: [petsc-users] Bug in log_view printing

2023-07-16 Thread Matthew Knepley
On Sun, Jul 16, 2023 at 11:45 AM Jared Crean wrote: > Hello, > >I stumbled upon a small bug in the printing of the data when running > Petsc with -log_view. The entire table is attached, but here is an > example row: > Yes, we prescribe the exact number of spaces for each output, instead

Re: [petsc-users] Using PETSc GPU backend

2023-07-15 Thread Matthew Knepley
is detailed in the manual. 2. You should replace MatCreateAIJ(), with MatSetSizes() before MatSetFromOptions(). THanks, Matt > Thanks, > Cho > > -- > *From:* Matthew Knepley > *Sent:* Friday, July 14, 2023 5:57 PM > *To:* Ng, Cho-Kuen > *C

Re: [petsc-users] Using PETSc GPU backend

2023-07-14 Thread Matthew Knepley
r > of magnitude slower. How can I improve the GPU performance? > > Thanks, > Cho > -- > *From:* Ng, Cho-Kuen > *Sent:* Friday, June 30, 2023 7:57 AM > *To:* Barry Smith ; Mark Adams > *Cc:* Matthew Knepley ; petsc-users@mcs.anl.gov < > p

Re: [petsc-users] Near null space for a fieldsplit in petsc4py

2023-07-13 Thread Matthew Knepley
On Thu, Jul 13, 2023 at 5:33 AM Pierre Jolivet wrote: > Dear Nicolas, > > On 13 Jul 2023, at 10:17 AM, TARDIEU Nicolas > wrote: > > Dear Pierre, > > You are absolutely right. I was using a --with-debugging=0 (aka release) > install and this is definitely an error. > Once I used my debug

Re: [petsc-users] (no subject)

2023-07-11 Thread Matthew Knepley
On Tue, Jul 11, 2023 at 3:58 PM Константин via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello, I'm trying to build petsc on windows. And when I make it I have > such problem > > Did you run configure first? Thanks, Matt > -- > Константин > -- What most experimenters take for

Re: [petsc-users] Inquiry about the PetscScalar in Petsc.

2023-07-11 Thread Matthew Knepley
On Tue, Jul 11, 2023 at 11:48 AM neil liu wrote: > Thanks for your reply. > I am using DMPLEX to read GMSH. And it seems I have to use > DMGetCoordinatesLocal(); > VecGetArray(veccords, );//it seems coords has to be defined by > complex either. > > 2) Store the coordinates in coords with

Re: [petsc-users] Solving a simpler PDE results in error while solving the original equation works in snes/tutorials/ex13.c

2023-07-10 Thread Matthew Knepley
On Mon, Jul 10, 2023 at 5:02 PM Tony Wu wrote: > In snes/tutorials/ex13.c, > there is a function SetupPrimalProblem(), which sets up the f_0 and f_1 in > PetscDSSetResidual() as described in > https://petsc.org/release/manualpages/DT/PetscDSSetResidual/#petscdssetresidual > , > and also the

Re: [petsc-users] Applying Multi-Point-Constraints with SNES

2023-07-07 Thread Matthew Knepley
have a scalar > DoF on each vertices in addition to displacement field. In other words, the > section has two fields, where displacement field has 2 DoFs and phase-field > has 1 DoF. > It should just work. Thanks, Matt > Thanks, > > Hongrui > > > > *Fr

Re: [petsc-users] Scalable Solver for Incompressible Flow

2023-07-06 Thread Matthew Knepley
On Thu, Jul 6, 2023 at 8:30 PM Alexander Lindsay wrote: > This is an interesting article that compares a multi-level ILU algorithm > to approximate commutator and augmented Lagrange methods: > https://doi.org/10.1002/fld.5039 > That is for incompressible NS. The results are not better than

Re: [petsc-users] Applying Multi-Point-Constraints with SNES

2023-07-06 Thread Matthew Knepley
On Thu, Jul 6, 2023 at 3:40 PM Hongrui Yu wrote: > Hello PETSc users, > > > > In our Finite Element application we would like to apply > Multi-Point-Constraints to some vertices. In these Multi-Point-Constraints > we force certain DoF in the following nodes to be the same as those in >

Re: [petsc-users] User-defined updating function in SNES

2023-07-06 Thread Matthew Knepley
On Thu, Jul 6, 2023 at 3:42 PM YuSh Lo wrote: > Hi, > > I am using SNES to solve some nonlinear functions. > After each iteration, I have an user-defined updating to do. > Some values in the solution vectors must be inserted to some different > location. > I have tried to do it in the beginning

Re: [petsc-users] Smaller assemble time with increasing processors

2023-07-03 Thread Matthew Knepley
On Mon, Jul 3, 2023 at 9:56 AM Runfeng Jin wrote: > Hi, impressive performance! > I use the newest version of petsc(release branch), and it almost deletes > all assembly and stash time in large processors (assembly time > 64-4s/128-2s/256-0.2s, stash time all below 2s). For the zero

Re: [petsc-users] Question about residue norm in PETSc

2023-07-02 Thread Matthew Knepley
%90%8C=wanghemeng%40163.com=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png=%5B%22wanghemeng%40163.com%22%5D> > Replied Message > From Matthew Knepley > Date 7/2/2023 20:32 > To 王赫萌 > Cc PETSc > Subject Re: [petsc-users] Question about residu

Re: [petsc-users] Question about residue norm in PETSc

2023-07-02 Thread Matthew Knepley
312782.529439, norm_b 72743.044439 Norm of error 18.0468 iterations 100 Residue of error 1.31278e+06 iterations 100 I ran with -pc_type jacobi -ksp_max_it 100 because GAMG takes a long time to setup on my laptop. Those numbers match exactly. THanks, Matt I'm such a beginner T_T &g

Re: [petsc-users] Question about residue norm in PETSc

2023-07-02 Thread Matthew Knepley
On Sun, Jul 2, 2023 at 8:05 AM Matthew Knepley wrote: > On Sun, Jul 2, 2023 at 7:53 AM 王赫萌 wrote: > >> Thanks for your reply! >> So sorry that I made a mistake in the description. >> I set the tolerances by: >> PetscCall(KSPSetTolerances(ksp, 1e-12, DBL_MIN, P

Re: [petsc-users] Question about residue norm in PETSc

2023-07-02 Thread Matthew Knepley
the output 2) You are asking why you calculate a different residual? I will have to run your code. Thanks, Matt > Best regards! > Hemeng Wang > > > Replied Message > From Matthew Knepley > Date 7/2/2023 18:51 > To 王赫萌 > Cc petsc-users@mcs.anl.gov >

Re: [petsc-users] Question about residue norm in PETSc

2023-07-02 Thread Matthew Knepley
On Sun, Jul 2, 2023 at 2:24 AM 王赫萌 wrote: > Dear PETSc Team, > > Sorry to bother! My name is Hemeng Wang, and I am currently learning the > use of PETSc software package. I am confused while calculating the norm of > residue. > > I calculated residue norm by myself with: > ``` >

Re: [petsc-users] PCMG with PCREDISTRIBUTE

2023-06-30 Thread Matthew Knepley
nd use that to > move the entries in the reduced interpolation you have created. > > > > If you do succeed it would actually be useful code that we could add to > PCREDISTRIBUTE for more general use by others. > > > > Barry > > “ > > > > Thanks, that seems

Re: [petsc-users] Fortran alternative for DMDAGetElements?

2023-06-30 Thread Matthew Knepley
lize(ierr) > > > > On Jun 30, 2023, at 9:21 AM, Ngoc Mai Monica Huynh < > ngocmaimonica.hu...@unipv.it> wrote: > > Yes, I have the #include at the top of the code. > > Thank you very much for your help. > I’ll let you know if I have any improvements from my s

Re: [petsc-users] PCMG with PCREDISTRIBUTE

2023-06-30 Thread Matthew Knepley
On Fri, Jun 30, 2023 at 10:16 AM Carl-Johan Thore via petsc-users < petsc-users@mcs.anl.gov> wrote: > Thanks for the quick reply and the suggestions! > > > > “ … you should first check that the PCMG works quite well “ > > > > Yes, the PCMG works very well for the full system. > > > > “I am

Re: [petsc-users] Fortran alternative for DMDAGetElements?

2023-06-30 Thread Matthew Knepley
Fortran does not find the interface, then it will just SEGV. Thanks, Matt > Monica > > On 30 Jun 2023, at 12:50, Matthew Knepley wrote: > > On Fri, Jun 30, 2023 at 6:47 AM Ngoc Mai Monica Huynh < > ngocmaimonica.hu...@unipv.it> wrote: > >> Hi, >> >> I

Re: [petsc-users] Fortran alternative for DMDAGetElements?

2023-06-30 Thread Matthew Knepley
ot pass over it. > Unfortunately, I cannot run with the debug option on this machine. > Am I calling the routine in a wrong way? > Does src/dm/tutorials/ex11f90.F90 run for you? Thanks, Matt > Thanks, > Monica > > > On 29 Jun 2023, at 21:09, Matthew Knepley

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Matthew Knepley
On Fri, Jun 30, 2023 at 1:13 AM Ng, Cho-Kuen via petsc-users < petsc-users@mcs.anl.gov> wrote: > Mark, > > The application code reads in parameters from an input file, where we can > put the PETSc runtime options. Then we pass the options to > PetscInitialize(...). Does that sounds right? >

Re: [petsc-users] Fortran alternative for DMDAGetElements?

2023-06-29 Thread Matthew Knepley
On Thu, Jun 29, 2023 at 3:05 PM Ngoc Mai Monica Huynh < ngocmaimonica.hu...@unipv.it> wrote: > Thank you. > Does this mean that DMDARestoreElements() is supported as well now? > Yes. Thanks, Matt > Monica > > > Il giorno 29 giu 2023, alle ore 20:17, Barry Smith ha > scritto: > >  > >

Re: [petsc-users] SOLVE + PC combination for 7 point stencil (unstructured) poisson solution

2023-06-27 Thread Matthew Knepley
s is definitely the option I would try. First, I would just use AMG (GAMG, Hypre, ML). If those work, you can speed up the setup time and bring down memory somewhat with GMG. Since your grid is Cartesian, you could use DMDA to do this easily. Thanks, Matt > I'll keep you updated. Thanks,

Re: [petsc-users] How to build compatible MPI matrix for dmplex

2023-06-27 Thread Matthew Knepley
On Tue, Jun 27, 2023 at 2:20 PM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > > I try to create a compatible sparse MPI matrix A with dmplex global vector > x, so I can do matrix-vector multiplication y = A*x. > > I think I can first get the local and global sizes

Re: [petsc-users] SOLVE + PC combination for 7 point stencil (unstructured) poisson solution

2023-06-27 Thread Matthew Knepley
nless you are very confident that GPUs will help, I would not recommend spending the time. Thanks, Matt > Thank you for your help! > Marcos > > -- > *From:* Matthew Knepley > *Sent:* Monday, June 26, 2023 12:11 PM > *To:* Vanella, Marcos (Fed) > *

Re: [petsc-users] SOLVE + PC combination for 7 point stencil (unstructured) poisson solution

2023-06-26 Thread Matthew Knepley
On Mon, Jun 26, 2023 at 12:08 PM Vanella, Marcos (Fed) via petsc-users < petsc-users@mcs.anl.gov> wrote: > Than you Matt and Mark, I'll try your suggestions. To configure with hypre > can I just use the --download-hypre configure line? > Yes, Thanks, Matt > That is what I did with

Re: [petsc-users] Using DMDA for a block-structured grid approach

2023-06-26 Thread Matthew Knepley
On Mon, Jun 26, 2023 at 11:44 AM Srikanth Sathyanarayana wrote: > Dear PETSc developers, > > > I am currently working on a Gyrokinetic code where I essentially have to > implement a block structured grid approach in one of the subdomains of > the phase space coordinates. I have attached one such

Re: [petsc-users] SOLVE + PC combination for 7 point stencil (unstructured) poisson solution

2023-06-26 Thread Matthew Knepley
On Mon, Jun 26, 2023 at 11:34 AM Vanella, Marcos (Fed) via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi, I was wondering if anyone has experience on what combinations are more > efficient to solve a Poisson problem derived from a 7 point stencil on a > single mesh (serial). > I've been

Re: [petsc-users] Questions on CPR preconditioner

2023-06-25 Thread Matthew Knepley
On Sun, Jun 25, 2023 at 9:21 AM Edoardo alinovi wrote: > Hello petsc's friends > > I have a curiosity about a sentence in the user guide about CPR > preconditioner: > > *"**The Constrained Pressure Preconditioner (CPR) can be implemented > using PCCOMPOSITE >

Re: [petsc-users] Inquiry about PetscDTSimplexQuadrature .

2023-06-24 Thread Matthew Knepley
know if it does not do what you want. Thanks, Matt > Have a good night. > > Thanks, > > On Fri, Jun 23, 2023 at 10:33 AM Matthew Knepley > wrote: > >> On Fri, Jun 23, 2023 at 10:28 AM neil liu wrote: >> >>> Dear Petsc developers, >>

Re: [petsc-users] Inquiry about PetscDTSimplexQuadrature .

2023-06-23 Thread Matthew Knepley
On Fri, Jun 23, 2023 at 10:28 AM neil liu wrote: > Dear Petsc developers, > > I am learning *PetscDTSimplexQuadrature *and plan to use it. > I found that, in the biunit simplex (tetra), > (-1,-1,-1),(1,-1,-1),(-1,1,-1),(-1,-1,1), > degree 1: npoints 4, the sum of weights = 4/3(the volume of

Re: [petsc-users] hypre-ILU vs hypre Euclid

2023-06-22 Thread Matthew Knepley
On Thu, Jun 22, 2023 at 8:37 PM Alexander Lindsay wrote: > I know that PETSc has hooks for Euclid but I discovered today that it does > not support 64 bit indices, which many MOOSE applications need. This would > probably be more appropriate for a hypre support forum (does anyone know if > such

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-21 Thread Matthew Knepley
Thanks, Matt > Thank you. > > Em ter., 20 de jun. de 2023 às 15:08, Matthew Knepley > escreveu: > >> On Tue, Jun 20, 2023 at 2:02 PM Diego Magela Lemos >> wrote: >> >>> So... what do I need to do, please? >>> Why am I getting wrong result

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-20 Thread Matthew Knepley
4:56, Jed Brown > escreveu: > >> Matthew Knepley writes: >> >> >> The matrix entries are multiplied by 2, that is, the number of >> processes >> >> used to execute the code. >> >> >> > >> > No. This was mostly intended

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-20 Thread Matthew Knepley
); > > // Solve > PetscCall(KSPSolve(ksp, B, X)); > > // View solution vector > PetscCall(VecView(X, PETSC_VIEWER_STDERR_WORLD)); > > // Verify the solution > PetscCall(VecAXPY(X, -1.0, U)); > PetscCall(VecNorm(X, NORM_2, )); > PetscCall(

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-20 Thread Matthew Knepley
On Tue, Jun 20, 2023 at 10:55 AM Diego Magela Lemos via petsc-users < petsc-users@mcs.anl.gov> wrote: > Considering, for instance, the following COO sparse matrix format, with > repeated indices: > > std::vector rows{0, 0, 1, 2, 3, 4}; > std::vector cols{0, 0, 1, 2, 3, 4}; > std::vector values{2,

Re: [petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:49 PM Duan Junming wrote: > *From:* knep...@gmail.com > *Sent:* Sunday, June 18, 2023 20:35 > *To:* Duan Junming > *Cc:* petsc-users@mcs.anl.gov > *Subject:* Re: [petsc-users] Advice on small block matrix vector > multiplication > > > On Sun, Jun 18, 2023 at 2:13 PM

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread Matthew Knepley
ed when you distribute. Are you running in serial? https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/plex/plexdistribute.c#L1715 No SF is created in serial because we do not reorder unless distributing. Thanks, Matt > Thanks, > Josh > > > > Matthew Knepley 於 202

Re: [petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:13 PM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > I am using DMPlex to manage the unknowns, two fields, one for pressure, > and one for velocities with two/three components, defined in each cell. > They're represented by polynomials,

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread Matthew Knepley
alling PetscSFView. >> I use PETSC_VIEWER_STDOUT_WORLD as PetscViewer >> >> Thanks, >> Josh >> >> >> Matthew Knepley 於 2023年6月9日 週五 下午1:04寫道: >> >>> On Fri, Jun 9, 2023 at 1:46 PM YuSh Lo wrote: >>> >>>> Hi Barry, >>>>

Re: [petsc-users] Question about using MatCreateAIJ

2023-06-15 Thread Matthew Knepley
On Thu, Jun 15, 2023 at 8:32 AM Karsten Lettmann < karsten.lettm...@uni-oldenburg.de> wrote: > Dear all, > > > I'm quite new to PETSC. So I hope the following questions are not too > stupid. > > > 1) We have a (Fortran) code, that we want to update from an older PETSC > version (petsc.2.3.3-p16)

Re: [petsc-users] Interpolation Between DMSTAG Objects

2023-06-14 Thread Matthew Knepley
On Wed, Jun 7, 2023 at 10:46 AM Colton Bryant < coltonbryant2...@u.northwestern.edu> wrote: > Hello, > > I am new to PETSc so apologies in advance if there is an easy answer to > this question I've overlooked. > > I have a problem in which the computational domain is divided into two >

Re: [petsc-users] dm_view of high-order geometry/solution

2023-06-12 Thread Matthew Knepley
On Mon, Jun 12, 2023 at 6:01 AM Duan Junming wrote: > Dear Matt, > > Thank you for the reply. I have a more specific question about the > spectral element example. Do you have any suggestions that how to write > all the nodes in each cell to .vtu? > It is the same procedure. VTU is not a great

Re: [petsc-users] dm_view of high-order geometry/solution

2023-06-12 Thread Matthew Knepley
On Mon, Jun 12, 2023 at 4:13 AM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > > I am playing with dm/impls/plex/tests/ex33.c and know how to set > high-order geometry. > > Is it possible to output the final mesh to vtu, e.g. annulus example? > The problem is that

Re: [petsc-users] IS natural numbering to global numbering

2023-06-09 Thread Matthew Knepley
On Fri, Jun 9, 2023 at 1:46 PM YuSh Lo wrote: > Hi Barry, > > Is there any way to use the mapping generated by DMPlexDistribute along > with AO? > For Plex, if you turn on https://petsc.org/main/manualpages/DM/DMSetUseNatural/ before DMPlexDistribute(), it will compute and store a

Re: [petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread Matthew Knepley
On Fri, Jun 9, 2023 at 12:04 PM neil liu wrote: > Dear Petsc developers, > > I am using valgrind to check the memory leak. It shows, > [image: image.png] > Finally, I found that DMPlexrestoretrasitiveclosure can resolve this > memory leak. > > My question is from the above screen shot, it seems

Re: [petsc-users] Behavior of KSP iterations when using Restart

2023-06-09 Thread Matthew Knepley
_type lu Thanks, Matt > ------ > *De:* Matthew Knepley > *Enviado:* viernes, 9 de junio de 2023 4:13:35 > *Para:* Nicolas Garcia Guzman > *Cc:* petsc-users@mcs.anl.gov > *Asunto:* Re: [petsc-users] Behavior of KSP iterations when using Restart > &

Re: [petsc-users] Behavior of KSP iterations when using Restart

2023-06-08 Thread Matthew Knepley
On Thu, Jun 8, 2023 at 9:13 PM Nicolas Garcia Guzman wrote: > Hello, > > > I am solving a linear system using petsc4py, with the following command: > > > python main.py -ksp_type gmres -ksp_gmres_restart 16 -ksp_max_it 18 > -ksp_monitor -ksp_converged_reason -ksp_rtol 1e-15 -pc_type asm >

Re: [petsc-users] Gauss-Lobatto-Legendre Element Gradient -- Caught signal number 11 SEGV

2023-06-01 Thread Matthew Knepley
On Thu, Jun 1, 2023 at 1:46 AM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > > I have a simple demo code attached below, which gives a segmentation > violation error. > > Can you help me with this problem? I think the problem is due to the > destroy function. > >

Re: [petsc-users] PetscSF "One-Sided" vs. "Two-Sided"

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 6:37 PM Ferrand, Jesus A. wrote: > Dear PETSc team: > > For one of my applications, I need to know which owned DAG points in a > (DMPlex) are other ranks' ghosts. > Say, rank-0 has some point "x" (which it owns) and it shows up in, say, > rank-1 as a ghost numbered "y".

Re: [petsc-users] Using SNESSHELL as a wrapper for a CFD solver.

2023-05-31 Thread Matthew Knepley
d for consistency and comparison to these other (more appropriate!) uses > of PETSc. > > Thanks. > Kenneth > > > > *From: *Matthew Knepley > *Date: *Wednesday, May 31, 2023 at 3:48 PM > *To: *Kenneth C Hall > *Cc: *petsc-users@mcs.anl.gov > *Subject: *Re: [pe

Re: [petsc-users] Using SNESSHELL as a wrapper for a CFD solver.

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 3:21 PM Kenneth C Hall wrote: > Hi, > > > > I am doing a number of problems using PETSc/SLEPc, but I also work on some > non-PETSc/SLEPc flow solvers. I would like to use PETSc as a wrapper for > this non-PETSc flow solver for compatibility, so I can use the tolerance

Re: [petsc-users] Multiple points constraint in parallel

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 2:43 PM YuSh Lo wrote: > Matthew Knepley 於 2023年5月31日 週三 下午1:02寫道: > >> On Wed, May 31, 2023 at 1:53 PM YuSh Lo wrote: >> >>> Hi Matthew, >>> >>> Matthew Knepley 於 2023年5月31日 週三 上午5:08寫道: >>> >>>

Re: [petsc-users] Multiple points constraint in parallel

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 1:53 PM YuSh Lo wrote: > Hi Matthew, > > Matthew Knepley 於 2023年5月31日 週三 上午5:08寫道: > >> On Wed, May 31, 2023 at 1:25 AM YuSh Lo wrote: >> >>> Hi, >>> >>> I have some multiple points constraint input as follows, &

Re: [petsc-users] [petsc-maint] Error during compile

2023-05-31 Thread Matthew Knepley
th exit code 1 (use -v to see > invocation)* > > > > > > I attach the complete log file. > > > > Thanks a lot for your help. > > > > Best regards, > > > > Joauma > > > > *De : *Matthew Knepley > *Date : *mercredi, 31 mai 2023 à 12:03 >

Re: [petsc-users] Multiple points constraint in parallel

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 1:25 AM YuSh Lo wrote: > Hi, > > I have some multiple points constraint input as follows, > > A_1 a_4 > B_2 b_5 > C_3 c_6 > > each columns are stored in different IS. > So one IS lists the capital letter and one lists the lowercase? > After dmplex distribute, they will

Re: [petsc-users] [petsc-maint] Error during compile

2023-05-31 Thread Matthew Knepley
On Wed, May 31, 2023 at 5:25 AM Joauma Marichal < joauma.maric...@uclouvain.be> wrote: > Hello, > > > > I am writing to you as I am trying to compile petsc on my mac. > > > > I used: > > $ export >

Re: [petsc-users] Get global offset in global vector for the points not owned by this processor.

2023-05-29 Thread Matthew Knepley
On Mon, May 29, 2023 at 5:47 PM YuSh Lo wrote: > Hi, > > How to get the offset in global vector for the points not owned by this > processor? > I have a parallel DMPlex and a section assigned to it. > GetSectionGetOffset with a global section returns -1 for the points not > owned by this

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

2023-05-24 Thread Matthew Knepley
Checking back. What does not work? Thanks, Matt On Tue, Jan 24, 2023 at 11:26 AM Matthew Knepley wrote: > On Tue, Jan 24, 2023 at 10:39 AM Berend van Wachem < > berend.vanwac...@ovgu.de> wrote: > >> Dear Matt, >> >> I have been working on this now

Re: [petsc-users] DMLabel to extract height-0 points by their DMPolytope value

2023-05-24 Thread Matthew Knepley
On Tue, May 23, 2023 at 8:44 PM Ferrand, Jesus A. wrote: > Dear PETSc team: > > I am trying to use DMPlex and DMLabel to develop an API to write plexes to > .cgns format in parallel. > To that end, I need a way to extract the height-0 points and sort them by > topological type (i.e., chunk of

Re: [petsc-users] MPI_Iprobe Error with MUMPS Solver on Multi-Nodes

2023-05-23 Thread Matthew Knepley
y. If this >> amount of memory is sufficient for solving the matrix with approximately 3 >> million degrees of freedom? >> >> Thanks! >> Zongze >> >> Il giorno lun 22 mag 2023 alle ore 20:03 Zongze Yang < >>> yangzon...@gmail.com> ha scri

Re: [petsc-users] MPI_Iprobe Error with MUMPS Solver on Multi-Nodes

2023-05-23 Thread Matthew Knepley
ees of freedom? > It really depends on the fill. Suppose that you get 1% fill, then (3e6)^2 * 0.01 * 8 = 1e12 B and you have 1.5e12 B, so I could easily see running out of memory. Thanks, Matt > Thanks! > Zongze > > Il giorno lun 22 mag 2023 alle ore 20:03 Zongze Yan

Re: [petsc-users] MPI_Iprobe Error with MUMPS Solver on Multi-Nodes

2023-05-22 Thread Matthew Knepley
On Mon, May 22, 2023 at 11:07 AM Zongze Yang wrote: > Hi, > > I hope this letter finds you well. I am writing to seek guidance regarding > an error I encountered while solving a matrix using MUMPS on multiple nodes: > Iprobe is buggy on several MPI implementations. PETSc has an option for

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-22 Thread Matthew Knepley
llCoordinatesLocal and CoordinatesLocal works. > > Best regards, Berend. > > Many thanks and best regards, Berend. > > On 5/17/23 23:04, Matthew Knepley wrote: > > On Wed, May 17, 2023 at 2:01 PM Berend van Wachem > > mailto:berend.vanwac...@ovgu.de>> wrote: > > > >

Re: [petsc-users] Using dmplexdistribute do parallel FEM code.

2023-05-18 Thread Matthew Knepley
t; 2 13 0 0 > 2 21 0 0 > 2 26 0 0 > 3 1 0 0 > $EndNodes > $Elements > 5 24 1 24 > 2 1 2 2 > 1 1 2 4 > 2 4 2 3 > 2 13 2 4 > 3 9 1 2 > 4 9 2 10 > 5 5 9 10 > 6 5 10 6 > 2 21 2 4 > 7 11 3 4 > 8 11 4 12 > 9 7 11 12 > 10 7 12 8 > 2 26 2 2 >

Re: [petsc-users] Using dmplexdistribute do parallel FEM code.

2023-05-17 Thread Matthew Knepley
On Wed, May 17, 2023 at 6:58 PM neil liu wrote: > Dear Petsc developers, > > I am writing my own code to calculate the FEM matrix. The following is my > general framework, > > DMPlexCreateGmsh(); > MPI_Comm_rank (Petsc_comm_world, ); > DMPlexDistribute (.., .., ); > > dm = dmDist; > //This can

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Matthew Knepley
should be 1.0. > > Am I doing something wrong? > Quickly, I see that a *= 10.0 + 1.0; is the same as a *= 11.0; not multiply by 10 and add 1. I will send it back when I get everything the way I want. Thanks, Matt > Thanks and best regards, > > Berend. > > On 5/

Re: [petsc-users] Nested field split

2023-05-17 Thread Matthew Knepley
On Wed, May 17, 2023 at 3:23 PM Matthew Knepley wrote: > On Wed, May 17, 2023 at 2:59 PM Barry Smith wrote: > >> >> Absolutely, that is fundamental to the design. >> >> In the simple case where all the degrees of freedom exist at the same >> grid po

Re: [petsc-users] Nested field split

2023-05-17 Thread Matthew Knepley
On Wed, May 17, 2023 at 2:59 PM Barry Smith wrote: > > Absolutely, that is fundamental to the design. > > In the simple case where all the degrees of freedom exist at the same > grid points, hence storage is like u,v,t,p in the vector the nesting is > trivial. You indicate the fields

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Matthew Knepley
DMSetCoordinatesLocal(dm, xl); DMGetCellCoordinatesLocal(dm, ); VecScale(xl, scale); DMSetCellCoordinatesLocal(dm, xl); Does this not work? Thanks, Matt Best regards, Berend. > > On 5/17/23 16:35, Matthew Knepley wrote: > > On Wed, May 17, 2023 at 10:21 AM Berend van Wachem < > berend.va

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Matthew Knepley
to push in an API for "just" scaling, but I could be convinced the other way. Thanks, Matt > Thanks, Berend. > > On 5/17/23 16:10, Matthew Knepley wrote: > > On Wed, May 17, 2023 at 10:02 AM Berend van Wachem > > mailto:berend.vanwac...@ovgu.de>> wrote: &g

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Matthew Knepley
On Wed, May 17, 2023 at 10:02 AM Berend van Wachem wrote: > Dear PETSc Team, > > We are using DMPlex, and we create a mesh using > > DMPlexCreateBoxMesh ( ); > > and get a uniform mesh. The mesh is periodic. > > We typically want to "scale" the coordinates (vertices) of the mesh, and > to

Re: [petsc-users] Large MATMPIAIJ - 32bit integer overflow in nz value

2023-05-17 Thread Matthew Knepley
On Wed, May 17, 2023 at 9:02 AM Fleischli Benno HSLU T < benno.fleisc...@hslu.ch> wrote: > Dear PETSc developers > > I am creating a very large parallel sparse matrix (MATMPIAIJ) with PETSc. > I write this matrix to disk. > The number of non-zeros exceeds the maximum number a 32-bit integer can >

Re: [petsc-users] SNESDMDASNESSetFunctionLocal in Fortran

2023-05-16 Thread Matthew Knepley
s, Matt > Thank you for your patience! I am still new to PETSc and learning how to > use it. > > > > *From:* Matthew Knepley > *Sent:* Sunday, May 14, 2023 12:24 PM > *To:* Khaled Nabil Shar Abdelaziz > *Cc:* petsc-users@mcs.anl.gov > *Subject:* Re: [petsc-

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