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 pro

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 th

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 > PCBDD

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 > v

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 comm

Re: [petsc-users] Problem setting Fieldsplit fields

2023-02-14 Thread Matthew Knepley
come from the PC, not the DM. 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: > >

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 t

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 matrix-vector

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 o

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 = 'com.apple.m

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 a DMP

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 a

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(), MatZeroRow

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 preconditione

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 printed

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 hear

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 se

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 progr

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread Matthew Knepley
sses. > Did you run and see 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: >> >

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. >>>

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 > Reg

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
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

Re: [petsc-users] Interpreting Redistribution SF

2023-01-19 Thread Matthew Knepley
ll? > 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 U

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 D

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 limita

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) > i

Re: [petsc-users] Retreiving a PetscObject

2023-01-13 Thread Matthew Knepley
tion 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?

Re: [petsc-users] coordinate degrees of freedom for 2nd-order gmsh mesh

2023-01-12 Thread Matthew Knepley
t? >> > > No. > > Cheers, > Dave > >> > > > >> Regards, >> Blaise >> >> >> On Jan 12, 2023, at 7:13 PM, Matthew Knepley wrote: >> >> On Thu, Jan 12, 2023 at 1:33 PM Jed Brown wrote: >> >>> It's confusing

Re: [petsc-users] coordinate degrees of freedom for 2nd-order gmsh mesh

2023-01-12 Thread Matthew Knepley
t; Blaise > > > On Jan 12, 2023, at 7:13 PM, Matthew Knepley wrote: > > On Thu, Jan 12, 2023 at 1:33 PM Jed Brown wrote: > >> It's confusing, but this line makes high order simplices always read as >> discontinuous coordinate spaces. I would love

Re: [petsc-users] coordinate degrees of freedom for 2nd-order gmsh mesh

2023-01-12 Thread Matthew Knepley
es: > > > Sorry either your mail system or mine prevented me from attaching the > file, > > so I put it on pastebin: > > https://pastebin.com/awFpc1Js > > > > On Wed, Jan 11, 2023 at 4:54 PM Matthew Knepley > wrote: > > > >> Can you send the .

Re: [petsc-users] coordinate degrees of freedom for 2nd-order gmsh mesh

2023-01-11 Thread Matthew Knepley
Can you send the .msh file? I still have not installed Gmsh :) Thanks, Matt On Wed, Jan 11, 2023 at 2:43 PM Daniel R. Shapero wrote: > Hi all -- I'm trying to read in 2nd-order / piecewise quadratic meshes > that are generated by gmsh and I don't understand how the coordinates are > sto

Re: [petsc-users] PETSC install

2023-01-11 Thread Matthew Knepley
On Wed, Jan 11, 2023 at 2:33 PM Barry Smith wrote: > > Did you do exactly: > > export HWLOC_HIDE_ERRORS=2 > > make check > > Also, what shell are you using? The command above is for bash, but if you use csh it is different. Thanks, Matt > ? > > > > On Jan 11, 2023, at 6:51 PM, Sijie

Re: [petsc-users] Getting correct local size using VecScatterCreateToAll

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 6:22 PM Venugopal, Vysakh (venugovh) via petsc-users wrote: > Hello, > > > > I have created a global vector V using DMCreateGlobalVector of size m. For > n processes, the local size of V is m/n. > > > > Subsequently, I am using VecScatterCreateToAll to get a sequential copy

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
annot easily refer to the function pointers). You can 1) Set the new section into the distributed DM 2) Make a new global or local vector 3) Call VecCopy() to move the data The new vector will have the right viewer. Thanks, Matt > Thanks > Nicholas > > On Fri, Jan 6,

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
ocal coordinate vector. It seems like you are doing something else. Maybe the documentation is misleading. Thanks, Matt > Thanks > Nicholas > > On Fri, Jan 6, 2023 at 10:59 AM Matthew Knepley wrote: > >> On Fri, Jan 6, 2023 at 10:41 AM Nicholas Arnold-Medabalimi < >

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
Vec by calling DMCreateGlobalVector()? Thanks, Matt > Thanks for your time > Nicholas > > On Fri, Jan 6, 2023 at 10:23 AM Matthew Knepley wrote: > >> On Fri, Jan 6, 2023 at 10:10 AM Nicholas Arnold-Medabalimi < >> narno...@umich.edu> wrote: >> &g

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
offset that is less than the starting ownership range. I would > expect cell 0 to start at offset 2640 at minimum. > Send the output for this section call PetscSectionView(section, PETSC_VIEWER_STDOUT_WORLD); Thanks, Matt > Sincerely > Nicholas > > > > > O

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
GetLocalSize2750 > size(stateVecV)2750 > > process 1 > Petsc VecGetLocalSize2640 > size(stateVecV)2640 > The offsets shown below are well-within these sizes. I do not understand the problem. Thanks, Matt > On Fri, Jan 6, 2023 at 9:51

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
sitive offset that > is less than its starting ownership index (in the initial email output). > > Thanks for the assistance > Nicholas > > > On Fri, Jan 6, 2023 at 9:20 AM Matthew Knepley wrote: > >> On Fri, Jan 6, 2023 at 2:28 AM Nicholas Arnold-Medabalimi < >> na

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 2:28 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users, > > I'm working with a dmplex system with a subsampled mesh distributed with > an overlap of 1. > > I'm encountering unusual situations when using VecGetOwnershipRange to > adjust the offset re

Re: [petsc-users] MatCreateSeqAIJWithArrays for GPU / cusparse

2023-01-05 Thread Matthew Knepley
On Thu, Jan 5, 2023 at 3:42 PM Jed Brown wrote: > Mark Adams writes: > > > Support of HIP and CUDA hardware together would be crazy, > > I don't think it's remotely crazy. libCEED supports both together and it's > very convenient when testing on a development machine that has one of each > brand

Re: [petsc-users] error when trying to compile with HPDDM

2023-01-05 Thread Matthew Knepley
On Thu, Jan 5, 2023 at 11:36 AM Alfredo Jaramillo wrote: > Dear developers, > I'm trying to compile petsc together with the HPDDM library. A series on > errors appeared: > > /home/ajaramillo/petsc/x64-openmpi-aldaas2021/include/HPDDM_specifications.hpp: > In static member function ‘static constex

Re: [petsc-users] MatCreateSeqAIJWithArrays for GPU / cusparse

2023-01-04 Thread Matthew Knepley
> On Wed, Jan 4, 2023 at 6:17 PM Matthew Knepley wrote: > >> On Wed, Jan 4, 2023 at 7:09 PM Junchao Zhang >> wrote: >> >>> On Wed, Jan 4, 2023 at 6:02 PM Matthew Knepley >>> wrote: >>> >>>> On Wed, Jan 4, 2023 at 6:49 PM

Re: [petsc-users] MatCreateSeqAIJWithArrays for GPU / cusparse

2023-01-04 Thread Matthew Knepley
On Wed, Jan 4, 2023 at 7:09 PM Junchao Zhang wrote: > On Wed, Jan 4, 2023 at 6:02 PM Matthew Knepley wrote: > >> On Wed, Jan 4, 2023 at 6:49 PM Junchao Zhang >> wrote: >> >>> >>> On Wed, Jan 4, 2023 at 5:40 PM Mark Lohry wrote: >>> >&

Re: [petsc-users] MatCreateSeqAIJWithArrays for GPU / cusparse

2023-01-04 Thread Matthew Knepley
On Wed, Jan 4, 2023 at 6:49 PM Junchao Zhang wrote: > > On Wed, Jan 4, 2023 at 5:40 PM Mark Lohry wrote: > >> Oh, is the device backend not known at compile time? >> > Currently it is known at compile time. > Are you sure? I don't think it is known at compile time. Thanks, Matt > Or

Re: [petsc-users] Getting global indices of vector distributed among different processes.

2023-01-04 Thread Matthew Knepley
On Wed, Jan 4, 2023 at 10:48 AM Venugopal, Vysakh (venugovh) via petsc-users wrote: > Hello, > > > > Is there a way to get the global indices from a vector created from > DMCreateGlobalVector? Example: > > > > If global vector V (of size 10) has indices {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} > and they a

Re: [petsc-users] Question - about the 'Hint for performance tuning'

2023-01-02 Thread Matthew Knepley
On Mon, Jan 2, 2023 at 4:16 AM 김성익 wrote: > Hello, > > Happy new year!! > > > > I have some questions about “Hint for performance tuning” in user guide of > petsc. > > > > 1. In the “Performance Pitfalls and Advice” section, there are 2 > modes “debug” and “optimized builds. My current setup

Re: [petsc-users] DMLabel Views

2022-12-30 Thread Matthew Knepley
On Fri, Dec 30, 2022 at 7:52 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users > > I'm in the process of tagging cells in a DMPlex for identification before > a mesh filter. I'm trying to debug some issues related to my tagging > metrics that is only appearing for more co

Re: [petsc-users] Write/read a DMForest to/from a file

2022-12-30 Thread Matthew Knepley
On Fri, Dec 30, 2022 at 5:59 AM Berend van Wachem wrote: > Dear Mark, > > Yes, I have tried that. That will only work if I convert the DMForest to > a DMPlex first, and then write the DMPlex to file. But then, I cannot > read in a DMForest when I want to continue the calculations later on. > > Be

Re: [petsc-users] Question-Memory of matsetvalue

2022-12-30 Thread Matthew Knepley
On Fri, Dec 30, 2022 at 4:36 AM 김성익 wrote: > Hello, > > > > I have a question about memory of matsetvalue. > > When I assembly the local matrix to global matrix, I’m just using > matsetvalue. > Because the connectivity is so complex I can’t use matsetvalues. > > I asked this question because I wa

Re: [petsc-users] Getting a vector from a DM to output VTK

2022-12-26 Thread Matthew Knepley
nclude Thanks Matt > Sincerely > Nicholas > > > > On Mon, Dec 26, 2022 at 10:45 AM Matthew Knepley > wrote: > >> On Mon, Dec 26, 2022 at 10:40 AM Nicholas Arnold-Medabalimi < >> narno...@umich.edu> wrote: >> >>> Hi Matt >>>

Re: [petsc-users] gamg out of memory with gpu

2022-12-26 Thread Matthew Knepley
e geometric one. > cd $PETSC_DIR/src/snes/tutorials/ex5 ./ex5 -da_grid_x 64 -da_grid_y 64 -mms 3 -pc_type gang and for GPUs I think you need the options to move things over -dm_vec_type cuda -dm_mat_type aijcusparse Thanks, Matt > Thanks, > Edoardo > > Il giorno lun 26 d

Re: [petsc-users] Getting a vector from a DM to output VTK

2022-12-26 Thread Matthew Knepley
d into > the local section. Things look good on the ASCII output but if we can > resolve 1 then I think the loop is fully closed and I can just worry about > the fortran translation. > > Thanks again for all your help. > > Sincerely > Nicholas > > > > On Mon, Dec

Re: [petsc-users] gamg out of memory with gpu

2022-12-26 Thread Matthew Knepley
On Mon, Dec 26, 2022 at 4:41 AM Edoardo Centofanti < edoardo.centofant...@universitadipavia.it> wrote: > Hi PETSc Users, > > I am experimenting some issues with the GAMG precondtioner when used with > GPU. > In particular, it seems to go out of memory very easily (around 5000 > dofs are enough to

Re: [petsc-users] Getting a vector from a DM to output VTK

2022-12-26 Thread Matthew Knepley
MPI processes > type: mpi > Process [0] > 101325. > 300. > 101326. > 301. > 101341. > 316. > 7.90505e-323 > 1.97626e-323 > 4.30765e-312 > 6.91179e-310 > Process [1] > 101497. > 472. > 101516. > 491. > 1.99665e-314 > 8.14714e-321 > &g

Re: [petsc-users] Question about eigenvalue and eigenvectors

2022-12-24 Thread Matthew Knepley
Or just call the LAPACK routine directly. Matt On Sat, Dec 24, 2022 at 7:14 AM Stefano Zampini wrote: > For 3x3 matrices you can use explicit formulas > > On Sat, Dec 24, 2022, 11:20 김성익 wrote: > >> Hello, >> >> >> I tried to calculate the eigenvalues and eigenvectors in 3 by 3 matrix >> (r

Re: [petsc-users] locate DMSwarm particles with respect to a background DMDA mesh

2022-12-23 Thread Matthew Knepley
SetMigrateType() should be enough for me. > > Hi Matteo, I have done this in https://gitlab.com/petsc/petsc/-/merge_requests/5941 I also hope to get the fix for your DMDA issue in there. Thanks, Matt > Thanks > > Matteo > > > Cheers > Dave > > &

Re: [petsc-users] Getting a vector from a DM to output VTK

2022-12-23 Thread Matthew Knepley
On Thu, Dec 22, 2022 at 12:41 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users > > I've been having trouble consistently getting a vector generated from a DM > to output to VTK correctly. I've used ex1.c (which works properly)to try > and figure it out, but I'm still hav

Re: [petsc-users] locate DMSwarm particles with respect to a background DMDA mesh

2022-12-22 Thread Matthew Knepley
e ha scritto: > > Hi. > I am sorry to take this up again, but further tests show that it's not > right yet. > > Il 04/11/22 12:48, Matthew Knepley ha scritto: > > On Fri, Nov 4, 2022 at 7:46 AM Matteo Semplice < > matteo.sempl...@uninsubria.it> wrote: >

Re: [petsc-users] Error while running an example

2022-12-21 Thread Matthew Knepley
On Wed, Dec 21, 2022 at 12:12 PM Guilherme Lima wrote: > Hello > > So, this error occurred while running example 50 on > petsc/src/ksp/ksp/tutorials > The machine also have a MPI installed, so in order to run the ex50 I did: > > /home/slave12/projects/petsc/arch-linux-c-debug/bin/mpiexec -n 4 ./e

Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread Matthew Knepley
On Mon, Dec 19, 2022 at 6:12 AM TARDIEU Nicolas via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear PETSc users, > > I plan to solve nonlinear quasi-static problems with PETSc. More > precisely, these are solid mechanics problems with elasto-plasticity. > So they do not involve "physical tim

Re: [petsc-users] Matrix version of VecScatterCreateToAll

2022-12-18 Thread Matthew Knepley
On Sun, Dec 18, 2022 at 9:44 AM 김성익 wrote: > For example, before using preallocaotor, I made A matrix. (A matrix has > information about indices of global matrix) > And the code structures are as below. > for (int i=0; iMatGetRow(A,~~) // for getting indices info of global matrix. >MatSet

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-18 Thread Matthew Knepley
On Sun, Dec 18, 2022 at 9:21 AM Jed Brown wrote: > Matthew Knepley writes: > > > On Fri, Dec 16, 2022 at 12:22 AM Praveen C wrote: > > > >> Thank you very much. I do see correct normals now. > >> > >> Is there a way to set the option > >>

Re: [petsc-users] DMLocalToLocal() and DMCoarsen() for DMPlex with Fortran

2022-12-16 Thread Matthew Knepley
On Thu, Dec 15, 2022 at 10:10 PM Mike Michell wrote: > Hello PETSc developer team, > > I am a user of DMPlex in PETSc with Fortran. I have two questions: > > - Is DMLocalToLocal() now available for DMPlex with Fortran? I made > similar inquiry before: > https://www.mail-archive.com/petsc-users@mc

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-16 Thread Matthew Knepley
ruction, so it is difficult to insert an API. We could use a callback, but that rapidly becomes unwieldy. If you want to do it programmatically, I would use PetscOptionsSetValue(). Thanks, Matt > best > praveen > > On 15-Dec-2022, at 9:53 PM, Matthew Knepley wrote: > >

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

2022-12-15 Thread Matthew Knepley
On Wed, Dec 14, 2022 at 3:58 AM Berend van Wachem wrote: > > Dear PETSc team and users, > > I have asked a few times about this before, but we haven't really gotten > this to work yet. > > In our code, we use the DMPlex framework and are also interested in > periodic geometries. > > As our simula

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-15 Thread Matthew Knepley
ove options should now work for you. Thanks, Matt > Thank you > praveen > > > > On 14-Dec-2022, at 6:40 PM, Matthew Knepley wrote: > > On Wed, Dec 14, 2022 at 2:38 AM Praveen C wrote: > >> Thank you, this MR works if I generate the mesh within the cod

Re: [petsc-users] Saving solution with monitor function

2022-12-14 Thread Matthew Knepley
2022 at 12:51 PM > *To: *Guglielmo, Tyler Hardy > *Cc: *Matthew Knepley , petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov> > *Subject: *Re: [petsc-users] Saving solution with monitor function > > > > See, for example > https://petsc.org/release/docs/manualpa

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-14 Thread Matthew Knepley
mymesh.gmsh -dm_localize_height 1 then it should work. Thanks, Matt > Thanks > praveen > > On 14-Dec-2022, at 12:51 AM, Matthew Knepley wrote: > > On Tue, Dec 13, 2022 at 10:57 AM Matthew Knepley > wrote: > >> On Tue, Dec 13, 2022 at 6:11 AM Praveen C wrote:

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Matthew Knepley
On Tue, Dec 13, 2022 at 10:57 AM Matthew Knepley wrote: > On Tue, Dec 13, 2022 at 6:11 AM Praveen C wrote: > >> Hello >> >> In the attached test, I read a small grid made in gmsh with periodic bc. >> >> This is a 2d mesh. >> >> The cell numbe

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Matthew Knepley
On Tue, Dec 13, 2022 at 6:11 AM Praveen C wrote: > Hello > > In the attached test, I read a small grid made in gmsh with periodic bc. > > This is a 2d mesh. > > The cell numbers are shown in the figure. > > All faces have length = 2.5 > > But using PetscFVFaceGeom I am getting length of 7.5 for s

Re: [petsc-users] Saving solution with monitor function

2022-12-13 Thread Matthew Knepley
On Tue, Dec 13, 2022 at 8:40 AM Guglielmo, Tyler Hardy via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi all, > > > > I am a new PETSc user (and new to MPI in general), and was wondering if > someone could help me out with what I am sure is a basic question (if this > is not the appropriate e

Re: [petsc-users] Seg fault in gdb but program runs

2022-12-13 Thread Matthew Knepley
sing the seg fault. > It is not the size, it is your arguments. See here mat=@0x55927e10: 0x57791bb0, diag=5, offDiag=0) Thanks, Matt > > > *From: *Matthew Knepley > *Date: *Tuesday, December 13, 2022 at 2:49 PM > *To: *Yuyun Yang > *Cc: *petsc-users &

Re: [petsc-users] Seg fault in gdb but program runs

2022-12-12 Thread Matthew Knepley
un/scycle-2/source/spmat.cpp:265 > 265 kronConvert_symbolic(left,right,mat,d_nnz,o_nnz); > d_nnz and o_nnz are pointers, and they are supposed to hold arrays of the number of nonzero in each row, You seem to be passing integers. Thanks, Matt > On Tue, Dec 13, 2022 at 12:41

Re: [petsc-users] parallelize matrix assembly process

2022-12-12 Thread Matthew Knepley
On Mon, Dec 12, 2022 at 11:54 PM 김성익 wrote: > > With the following example > https://gitlab.com/petsc/petsc/-/blob/main/src/mat/tests/ex230.c > > There are some questions about MatPreallocator. > > 1. In parallel run, all the MPI ranks should do the same preallocator > procedure? > In parallel,

Re: [petsc-users] realCoords for DOFs

2022-12-12 Thread Matthew Knepley
On Mon, Dec 12, 2022 at 6:06 PM Yann Jobic wrote: > Hi all, > > I'm trying to get the coords of the dofs of a DMPlex for a PetscFE > discretization, for orders greater than 1. > > I'm struggling to run dm/impls/plex/tutorials/ex8.c > I've got the following error (with option -view_coord) : > You

Re: [petsc-users] Seg fault in gdb but program runs

2022-12-12 Thread Matthew Knepley
On Mon, Dec 12, 2022 at 9:56 PM Yuyun Yang wrote: > Hello team, > > > > I’m debugging my code using gdb. The program runs just fine if I don’t > debug it, but when I use gdb, it seg faults at a place where it never > experienced any seg fault when I debugged it 1-2 years ago. I wonder if > this m

Re: [petsc-users] Union of sequential vecs

2022-12-12 Thread Matthew Knepley
hread if needed. > > > > Best, > > Karthik. > > > > > > > > *From: *Matthew Knepley > *Date: *Saturday, 10 December 2022 at 02:20 > *To: *Chockalingam, Karthikeyan (STFC,DL,HC) < > karthikeyan.chockalin...@stfc.ac.uk> > *Cc: *Mark Adams , petsc-users@m

Re: [petsc-users] Insert one sparse matrix as a block in another

2022-12-12 Thread Matthew Knepley
On Mon, Dec 12, 2022 at 5:24 PM Jed Brown wrote: > The description matches MATNEST (MATCOMPOSITE is for a sum or product of > matrices) or parallel decompositions. Also consider the assembly style of > src/snes/tutorials/ex28.c, which can create either a monolithic or block > (MATNEST) matrix wit

Re: [petsc-users] Union of sequential vecs

2022-12-09 Thread Matthew Knepley
On Fri, Dec 9, 2022 at 6:50 PM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Thank you Mark and Barry. > > > > @Mark Adams I follow you for the most part. Shouldn’t R > be an MPI Vector? > > > > Here it goes: > > > > Q[Vec[i]] for all "i" in my local (sequential) "Vec". > > Compu

Re: [petsc-users] Modifying Entries Tied to Specific Points in Finite Element Stiffness Matrix using DMPlex

2022-12-09 Thread Matthew Knepley
true global dof). Thanks, MAtt > Thanks, > Kevin > > On Dec 9, 2022, at 09:10, Matthew Knepley wrote: > >  > On Thu, Dec 8, 2022 at 6:06 PM Hongrui Yu wrote: > >> Hello! I’m trying to adapt a serial Finite Element code using PETSc. In >> this code it reads

Re: [petsc-users] Modifying Entries Tied to Specific Points in Finite Element Stiffness Matrix using DMPlex

2022-12-09 Thread Matthew Knepley
On Thu, Dec 8, 2022 at 6:06 PM Hongrui Yu wrote: > Hello! I’m trying to adapt a serial Finite Element code using PETSc. In > this code it reads in special stiffness terms between the boundary DoFs > from an input file, and add them to corresponding locations in the global > Jacobian matrix. > Hm

Re: [petsc-users] Petsc Section in DMPlex

2022-12-08 Thread Matthew Knepley
(*,*) sizeVec > call VecGetLocalSize(vec_filtered,sizeVec,ierr) > write(*,*) sizeVec > call ISGetLocalSize(expandedIS,sizeVec,ierr) > write(*,*) sizeVec > call PetscSynchronizedFlush(PETSC_COMM_WORLD,ierr) > > > call VecISCopy(vec_full,expandedIS,SCATTER_REVERSE,vec_filtered,i

Re: [petsc-users] Petsc Section in DMPlex

2022-12-07 Thread Matthew Knepley
IS. For each point, get the dof and offset from the Section. Make a new IS that has all the dogs, namely each run [offset, offset+dof). Thanks, Matt > Sincerely > Nicholas > > > On Wed, Dec 7, 2022 at 7:06 AM Matthew Knepley wrote: > >> On Wed, Dec 7, 2022 at 6:5

Re: [petsc-users] About Preconditioner and MUMPS

2022-12-07 Thread Matthew Knepley
> Yes, first you know it is MUMPS Mat Object: (mpi_) 1 MPI process type: mumps Second you know METIS was used INFOG(7) (ordering option effectively used after analysis): 5 I would not expect much speedup on 2 processes with such a small matrix rows

Re: [petsc-users] Petsc Section in DMPlex

2022-12-07 Thread Matthew Knepley
resume in this case I would be using the scatter reverse option to > go from the full set to the reduced set? > Yes Thanks Matt > Sincerely > Nicholas > > > > > > > Sincerely > Nick > > On Wed, Dec 7, 2022 at 6:00 AM Matthew Knepley wrote: > &g

Re: [petsc-users] About Preconditioner and MUMPS

2022-12-07 Thread Matthew Knepley
e you mail about solver questions. Thanks Matt > Thanks, > Hyung Kim > > 2022년 12월 7일 (수) 오후 8:05, Matthew Knepley 님이 작성: > >> On Wed, Dec 7, 2022 at 5:13 AM 김성익 wrote: >> >>> I want to use METIS for ordering. >>> I heard the MUMPS has good performa

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