Re: [petsc-users] [petsc-maint] compiler preprocessor for PETSc

2023-09-16 Thread Matthew Knepley
On Sat, Sep 16, 2023 at 10:20 AM Michael Wick wrote: > Hi PETSc team: > > What is an appropriate compiler preprocessor to tell the code PETSc has > been initialized? > https://petsc.org/main/manualpages/Sys/PetscInitialized/ Thanks, Matt > Mike > -- What most experimenters take for

Re: [petsc-users] Coupled system of equations on unstructured mesh

2023-09-10 Thread Matthew Knepley
em. > This is answered above. Thanks, Matt > Kind regards, > > Karthik. > > > > > > *From: *Matthew Knepley > *Date: *Sunday, 10 September 2023 at 20:18 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) < > karthikeyan.chockalin...@stfc.ac.uk>

Re: [petsc-users] Coupled system of equations on unstructured mesh

2023-09-10 Thread Matthew Knepley
ockSize/ Thanks, Matt > > > Many thanks, > > Karthik. > > > > > > *From: *Matthew Knepley > *Date: *Sunday, 10 September 2023 at 20:09 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) < > karthikeyan.chockalin...@stfc.ac.uk> > *Cc: *p

Re: [petsc-users] Coupled system of equations on unstructured mesh

2023-09-10 Thread Matthew Knepley
MATAIJ? > You do not need to change the type, just give the AIJ matrix a blocksize of 2. Thanks, Matt > Kind regards, > > Karthik. > > > > *From: *Matthew Knepley > *Date: *Sunday, 10 September 2023 at 19:03 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) <

Re: [petsc-users] Coupled system of equations on unstructured mesh

2023-09-10 Thread Matthew Knepley
On Sun, Sep 10, 2023 at 1:48 PM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Hello, > > > > I have so far solved scalar field problems using finite elements on a > given (*unstructured*) mesh. I made use of MATMPIAIJ to create matrixes, > MatCreateVecs(A, , ) to create vectors,

Re: [petsc-users] Slower performance using more MPI processes

2023-09-08 Thread Matthew Knepley
On Fri, Sep 8, 2023 at 4:53 PM Chris Hewson wrote: > Hi There, > > I am trying to solve a linear problem and am having an issue when I use > more MPI processes with the KSPsolve slowing down considerably the more > processes I add. > > The matrix itself is 620100 X 620100 with ~5 million

Re: [petsc-users] Non-linear solve: DIVERGED_LINE_SEARCH

2023-09-07 Thread Matthew Knepley
e DMComputeResidualLocal, so it is hard to see. Thanks, Matt > Thank you. > > > > Best, > > Karthik. > > > > *From: *Matthew Knepley > *Date: *Thursday, 7 September 2023 at 14:32 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) < > karthikeyan.choc

Re: [petsc-users] Non-linear solve: DIVERGED_LINE_SEARCH

2023-09-07 Thread Matthew Knepley
; Jacobian had been zeroed out? > I think you miss my point. Suppose you did not zero out the Jacobian when you started adding entries. Then you will get something close to twice the value. The linear system will solve fine, but the sep would be wrong. Thanks, Matt > > > Be

Re: [petsc-users] Non-linear solve: DIVERGED_LINE_SEARCH

2023-09-07 Thread Matthew Knepley
On Thu, Sep 7, 2023 at 8:49 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > I just noticed that the line search diverges even for the linear Poisson > equation (where the Jacobian is a constant). I am not sure, what I am doing > wrong. > You need to test the Jacobian. We have

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-03 Thread Matthew Knepley
the exponential. This is just a more complicated form of the diagonal scaling commonly used to give all fields the same scale. Thanks, Matt > Thanks, > David > > On Sat, Sep 2, 2023 at 5:54 PM Matthew Knepley wrote: > >> On Sat, Sep 2, 2023 at 5:45 PM Dav

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-02 Thread Matthew Knepley
excessive number of > iterations in other steps. So it seems to me that ensuring that we do at > least one iteration will help here, so that's what I wanted to try. > Hmm, it sounds like the convergence measure is bad. Maybe using a weighted norm would be better? Thanks, Matt > Tha

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-02 Thread Matthew Knepley
On Sat, Sep 2, 2023 at 3:05 PM David Knezevic via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi all, > > I'm using the SNES solver for a plasticity model, and the issue I've run > into is that in some time steps the solver terminates after "NL step 0" > since the initial residual (based on

Re: [petsc-users] Configuring PETSc on Mac M1

2023-09-01 Thread Matthew Knepley
You need to send us configure.log so that we can see what the failure message is. Thanks, Matt On Fri, Sep 1, 2023 at 9:56 AM Giselle Sosa Jones wrote: > Hello, > > I am trying to install PETSc on my M1 Mac and I keep encountering the > following error when configuring: > > Unknown

Re: [petsc-users] Error while building PETSc with MATLAB

2023-08-29 Thread Matthew Knepley
On Tue, Aug 29, 2023 at 9:08 AM Satish Balay via petsc-users < petsc-users@mcs.anl.gov> wrote: > Send configure.log, make.log from both petsc-3.13 and 3.17 [or 3.19]. > > [you can gzip them to make the logs friendly to mailing list - or send > them to petsc-maint] > > And does test suite work

Re: [petsc-users] unable to distribute rows of a matrix across processors while loading

2023-08-27 Thread Matthew Knepley
On Sun, Aug 27, 2023 at 8:30 AM maitri ksh wrote: > Hi, > I am using MatSetSizes() followed by MatLoad() to distribute the rows of a > *sparse* matrix (*48x48*) across the processors. But it seems > like the entire matrix is getting loaded in each of the processors instead > of

Re: [petsc-users] C++11 related issue

2023-08-25 Thread Matthew Knepley
stances where 'bash -c' is being used, I couldn't > locate any. How should I proceed? > You can do the check by hand: cd $PETSC_DIR cd src/snes/tutorials make ex5 ./.ex5 -snes_monitor Thanks, Matt > On Thu, Aug 24, 2023 at 1:37 PM Matthew Knepley wrote: > >> O

Re: [petsc-users] C++11 related issue

2023-08-24 Thread Matthew Knepley
On Thu, Aug 24, 2023 at 6:10 AM maitri ksh wrote: > I was facing a problem while compiling a code (which earlier, got compiled > successfully using the same petsc set up), the problem was related to > compilers. I decided to reconfigure petsc but ran into errors which are > related to

Re: [petsc-users] Runtime options to activate GPU offloading of PETSc solvers

2023-08-23 Thread Matthew Knepley
On Wed, Aug 23, 2023 at 9:27 AM TROTIGNON Laurent wrote: > Hello all, > > In the on line docs of PETSc, I found this paragraph : > > > > « PETSc uses a single source programming model where solver back-ends are > selected as *runtime* options and configuration options with no changes > to the

Re: [petsc-users] CUDA error trying to run a job with two mpi processes and 1 GPU

2023-08-22 Thread Matthew Knepley
On Tue, Aug 22, 2023 at 2:54 PM Vanella, Marcos (Fed) via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi Junchao, both the slurm scontrol show job_id -dd and looking at > CUDA_VISIBLE_DEVICES does not provide information about which MPI process > is associated to which GPU in the node in our

Re: [petsc-users] (Sub) KSP initial guess with PCREDISTRIBUTE

2023-08-21 Thread Matthew Knepley
On Mon, Aug 21, 2023 at 4:06 AM Jonas Lundgren via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear PETSc users, > > > > I have a problem regarding the setting of initial guess to KSP when using > PCREDISTRIBUTE as the preconditioner. (The reason to why I use > PCREDISTRIBUTE is because I

Re: [petsc-users] MetSetValues not found

2023-08-19 Thread Matthew Knepley
On Sun, Aug 20, 2023 at 6:48 AM Sanjay Govindjee wrote: > I recently got a copy of E.Bueler's petsc book and was converting the > programs to fortran for my students and have run into a compile error that > I can not figure out. I comment out the MatSetValues line the code > compiles fine. > >

Re: [petsc-users] Filling non-zero values of a Petsc matrix using numpy arrays with non-zero indices and values (petsc4py)

2023-08-19 Thread Matthew Knepley
On Sun, Aug 20, 2023 at 12:53 AM Erik Kneller via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi All, > > Thank you for the recommendations. The first option provided by Matthew > works in petsc4py but required some additional computations to re-organize > information. I developed an approach

Re: [petsc-users] Filling non-zero values of a Petsc matrix using numpy arrays with non-zero indices and values (petsc4py)

2023-08-17 Thread Matthew Knepley
On Fri, Aug 18, 2023 at 12:49 AM Erik Kneller via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi All, > > I need to fill non-zero values of a Petsc matrix via petsc4py for the > domain defined by A.getOwnershipRange() using three Numpy arrays: (1) > array containing row indices of non-zero

Re: [petsc-users] DM/DS crash after update to 3.19 (Fortran)

2023-08-14 Thread Matthew Knepley
On Tue, Aug 15, 2023 at 2:06 AM Martin Diehl wrote: > Dear PETSc team, > > my simulation crashes after updating from 3.18.5 to 3.19.4. > > The error message is attached, so is the main code. The mesh (variable > named geomMesh) is read with DMPlexCreateFromFile in a different part > of the

Re: [petsc-users] error related to 'valgrind' when using MatView

2023-08-10 Thread Matthew Knepley
On Thu, Aug 10, 2023 at 2:30 AM maitri ksh wrote: > I am unable to understand what possibly went wrong with my code, I could > load a matrix (large sparse matrix) into petsc, write it out and read it > back into Matlab but when I tried to use MatView to see the matrix-info, it > produces error

Re: [petsc-users] DMPlex bug in src/snes/tutorials/ex17.c

2023-08-09 Thread Matthew Knepley
On Wed, Aug 9, 2023 at 11:09 AM Ilya Fursov wrote: > Hello, > > I have a problem running src/snes/tutorials/ex17.c in parallel, > given the specific runtime options (these options are actually taken from > the test example ex17_3d_q3_trig_elas). > > *The serial version works fine:* > ./ex17

Re: [petsc-users] Something went wrong with PETSc after installing ParaView

2023-08-06 Thread Matthew Knepley
ec -n ./myprog It shows this is the report at the end of the log. Thanks, Matt Regards, > Kai > > Matthew Knepley 于2023年8月5日周六 16:19写道: > >> On Sat, Aug 5, 2023 at 10:10 AM K. Wu wrote: >> >>> Dear Matthew, >>> >>> Thanks for your reply!

Re: [petsc-users] Something went wrong with PETSc after installing ParaView

2023-08-05 Thread Matthew Knepley
have that information in it. Thanks, Matt > Regards, > Kai > > Matthew Knepley 于2023年8月5日周六 14:23写道: > >> On Sat, Aug 5, 2023 at 3:22 AM K. Wu wrote: >> >>> Hi all, >>> >>> Good day! >>> >>> After installing ParaVie

Re: [petsc-users] Something went wrong with PETSc after installing ParaView

2023-08-05 Thread Matthew Knepley
On Sat, Aug 5, 2023 at 3:22 AM K. Wu wrote: > Hi all, > > Good day! > > After installing ParaView on my desktop, PETSc starts to work anomalously > even after reconfiguration: > 1. If I use mpirun (frequently used before), it seems that now all the > processors will run the program independently

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

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