Re: [petsc-users] Diagnosing Convergence Issue in Fieldsplit Problem

2024-05-23 Thread Matthew Knepley
I put in stuff to propagate the nullspace if you use DM. Matt On Thu, May 23, 2024 at 11:04 PM Barry Smith wrote: > On May 23, 2024, at 3: 48 PM, Stefano Zampini com> wrote: the null space of the Schur complement is the restriction of > the original null space. I guess if fieldsplit is

Re: [petsc-users] Modify matrix nonzero structure

2024-05-20 Thread Matthew Knepley
em (the poor > nonlinear solver convergence being caused by missing Jacobian elements > representing interaction between the sources)? > > - Adrian > On 20/05/24 12:41 pm, Matthew Knepley wrote: > > On Sun, May 19, 2024 at 8:25 PM Barry Smith wrote: > >> You can call MatS

Re: [petsc-users] Modify matrix nonzero structure

2024-05-19 Thread Matthew Knepley
On Sun, May 19, 2024 at 8:25 PM Barry Smith wrote: > You can call MatSetOption(mat,MAT_NEW_NONZERO_LOCATION_ERR) then insert > the new values. If it is just a handful of new insertions the extra time > should be small. Making a copy of the matrix won't give you a new matrix > that is any faster

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-18 Thread Matthew Knepley
code in the > GitHub, I would appreciate it if you could have a look at it and guide me > how to fix it. > I believe the problem is in the memory of LHS and res_vector because they > are new vectors I created. > > Thank you in advance for your help, I really appreciate it > >

Re: [petsc-users] GMSH entities

2024-05-14 Thread Matthew Knepley
On Tue, May 14, 2024 at 9:07 AM Matthew Knepley wrote: > On Mon, May 13, 2024 at 10:04 PM Adrian Croucher < > a.crouc...@auckland.ac.nz> wrote: > >> On 14/05/24 1:44 pm, Matthew Knepley wrote: >> >> I wish GMsh was clearer about what is optional: >> https

Re: [petsc-users] GMSH entities

2024-05-14 Thread Matthew Knepley
On Mon, May 13, 2024 at 10:04 PM Adrian Croucher wrote: > On 14/05/24 1:44 pm, Matthew Knepley wrote: > > I wish GMsh was clearer about what is optional: > https://urldefense.us/v3/__https://gmsh.info/doc/texinfo/gmsh.html*MSH-file-format__;Iw!!

Re: [petsc-users] DMPlex periodic face coordinates

2024-05-14 Thread Matthew Knepley
On Tue, May 14, 2024 at 12:14 AM Matteo Semplice < matteo.sempl...@uninsubria.it> wrote: > Dear petsc-users, I am playing with DMPlexGetCellCoordinates and observing > that it returns correct periodic coordinates for cells, but not for faces. > More precisely, adding

Re: [petsc-users] GMSH entities

2024-05-13 Thread Matthew Knepley
On Mon, May 13, 2024 at 9:33 PM Adrian Croucher wrote: > hi, We often create meshes in GMSH format using the meshio library. This > works OK if we stick to GMSH file format 2. 2. If we use GMSH file format > 4. 1, DMPlex can't read them because it expects the "Entities" section to > be present:

Re: [petsc-users] [SLEPc] Best method to compute all eigenvalues of a MatShell

2024-05-13 Thread Matthew Knepley
On Mon, May 13, 2024 at 1:40 PM Sreeram R Venkat wrote: > I have a MatShell object that computes matrix-vector products of a dense > symmetric matrix of size NxN. The MatShell does not actually form the dense > matrix, so it is never in memory/storage. For my application, N ranges from > 1e4 to

Re: [petsc-users] HDF5 time step count

2024-05-13 Thread Matthew Knepley
On Sun, May 12, 2024 at 10:42 PM Adrian Croucher wrote: > hi Matt, > On 11/05/24 4:12 am, Matthew Knepley wrote: > > Thanks. I tried it out and the error below was raised, looks like it's >> when it tries to destroy the viewer. It still runs ok when >> DMGetOutputSeque

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-11 Thread Matthew Knepley
ide the nonzero pattern of the sparse Jacobian; that is > what residual components f_i are coupled to what input variables in the > array x_i. This information comes from your PDE and discretization and > appears implicitly in your residual function. > > Barry > > > I hope

Re: [petsc-users] HDF5 time step count

2024-05-10 Thread Matthew Knepley
On Fri, May 10, 2024 at 1:01 AM Adrian Croucher wrote: > hi Matt, > On 10/05/24 12:15 am, Matthew Knepley wrote: > > I just tried to test it, but there doesn't seem to be a Fortran interface >> for DMGetOutputSequenceLength(). >> > Pushed. > > Thanks. I

Re: [petsc-users] HDF5 time step count

2024-05-09 Thread Matthew Knepley
On Wed, May 8, 2024 at 10:46 PM Adrian Croucher wrote: > hi Matt, > On 9/05/24 3:00 am, Matthew Knepley wrote: > > Sorry about the delay. I had lost track of this. Can you look at branch > > knepley/feature-hdf5-seq-len > > I have not made a test yet, but if this wo

Re: [petsc-users] HDF5 time step count

2024-05-08 Thread Matthew Knepley
eature-hdf5-seq-len I have not made a test yet, but if this works for you, I will make a test and merge it in. Thanks! Matt > Regards, Adrian > On 11/10/21 2:08 pm, Adrian Croucher wrote: > > On 10/11/21 11:59 AM, Matthew Knepley wrote: > > On Sun, Oct 10, 2021 at

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-07 Thread Matthew Knepley
ow why it would not work for your problem if you don't use it. Thanks, Matt > > Please find the attached file contains a draft of my code > > Thank you in advance for your time and help. > > > Best regards, > > Sawsan > > ----------

Re: [petsc-users] Reasons for breakdown in preconditioned LSQR

2024-05-07 Thread Matthew Knepley
hy not first permute back to the Poisson matrix? Then it would be trivial. Thanks, Matt > I'm not sure what you mean by "permuted randomly." A random permutation > of the matrix can kill performance but not math. > > Mark > > > On Tue, May 7, 2024 at 8:03 AM Matt

Re: [petsc-users] Reasons for breakdown in preconditioned LSQR

2024-05-07 Thread Matthew Knepley
On Tue, May 7, 2024 at 5:12 AM Pierre Jolivet wrote: > On 7 May 2024, at 9: 10 AM, Marco Seiz wrote: Thanks > for the quick response! On 07. 05. 24 14: 24, Pierre Jolivet wrote: On 7 > May 2024, at 7: 04 AM, Marco Seiz wrote: This > Message Is From an External > ZjQcmQRYFpfptBannerStart > This

Re: [petsc-users] PETSc options

2024-05-06 Thread Matthew Knepley
On Mon, May 6, 2024 at 1:14 PM Mark Adams wrote: > But that will hardwire disabling -options_left. right? > True. Your suggestion would only filter out those two in particular. Thanks, Matt > On Mon, May 6, 2024 at 11:30 AM Matthew Knepley wrote: > >> On Mon, May

Re: [petsc-users] PETSc options

2024-05-06 Thread Matthew Knepley
On Mon, May 6, 2024 at 11:15 AM Pierre Jolivet wrote: > On 6 May 2024, at 3:14 PM, Matthew Knepley wrote: > > This Message Is From an External Sender > This message came from outside your organization. > On Mon, May 6, 2024 at 1:04 AM Adrian Croucher > wrote: > &g

Re: [petsc-users] PETSc options

2024-05-06 Thread Matthew Knepley
On Mon, May 6, 2024 at 1:04 AM Adrian Croucher wrote: > hi, My code has some optional command line arguments -v and -h for output > of version number and usage help. These are processed using Fortran's > get_command_argument(). Since updating PETSc to version 3. 21, I get some > extra warnings

Re: [petsc-users] [EXTERNAL] Re: Is there anything like a "DMPlexSetCones()" ?

2024-05-03 Thread Matthew Knepley
connectivity list. > Right, but that means that the connectivity you read in is not in local numbering. You will have to renumber it, so making a copy is probably necessary anyway. This is the same sort of processing I do for the parallel read. Thanks, Matt > ----

Re: [petsc-users] Question about petsc4py createWithArray function

2024-05-02 Thread Matthew Knepley
On Thu, May 2, 2024 at 12:53 PM Samar Khatiwala < samar.khatiw...@earth.ox.ac.uk> wrote: > Hello, I have a couple of questions about createWithArray in petsc4py: 1) > What is the correct usage for creating a standard MPI Vec with it? > Something like this seems to work but is it right?: On each

Re: [petsc-users] [EXTERNAL] Re: Is there anything like a "DMPlexSetCones()" ?

2024-05-01 Thread Matthew Knepley
tivity lists. > You know the number of cells if you can read connectivity. Do you mean that the format does not tell you the number of vertices? Thanks, Matt > -- > *From:* Ferrand, Jesus A. > *Sent:* Wednesday, May 1, 2024 8:17 PM > *To:* Matth

Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?

2024-05-01 Thread Matthew Knepley
On Wed, May 1, 2024 at 3:34 PM Ferrand, Jesus A. wrote: > Dear PETSc team: For a project that I'm working on, I need to manually > build a DMPlex. From studying the source code of the various APIs in which > the plex is built from some supported file format, I get that the workflow > is this:

Re: [petsc-users] PETSc-GPU

2024-04-26 Thread Matthew Knepley
On Fri, Apr 26, 2024 at 7:23 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Hello, When PETSc is installed with GPU support, will it run only on GPUs > or can it be run on CPUs (without GPUs)? Currently, PETSc crashes when run > on CPUs. Thank you. Best regards, Karthik. --

Re: [petsc-users] [petsc-maint] Inquiry about Multithreading Capabilities in PETSc's KSPSolver

2024-04-23 Thread Matthew Knepley
On Tue, Apr 23, 2024 at 4:00 PM Yongzhong Li wrote: > Thanks Barry! Does this mean that the sparse matrix-vector products, which > actually constitute the majority of the computations in my GMRES routine in > PETSc, don’t utilize multithreading? Only basic vector operations such as > VecAXPY and

Re: [petsc-users] Periodic boundary conditions using swarm

2024-04-21 Thread Matthew Knepley
it. It would make a fantastic contribution to PETSc. Thanks, Matt > Thanks, > Miguel > > On 21 Apr 2024, at 14:53, Matthew Knepley wrote: > > On Thu, Apr 18, 2024 at 8:23 AM MIGUEL MOLINOS PEREZ > wrote: > >>  Dear all, I am working on the implementation of period

Re: [petsc-users] Periodic boundary conditions using swarm

2024-04-21 Thread Matthew Knepley
On Thu, Apr 18, 2024 at 8:23 AM MIGUEL MOLINOS PEREZ wrote: >  Dear all, I am working on the implementation of periodic bcc using a > discretisation (PIC-style). I am working with a test case which consists on > solving the advection of a set of particles inside of a box (DMDA mesh) > with

Re: [petsc-users] About recent changes in GAMG

2024-04-19 Thread Matthew Knepley
On Fri, Apr 19, 2024 at 3:52 PM Ashish Patel wrote: > Hi Jed, VmRss is on a higher side and seems to match what > PetscMallocGetMaximumUsage is reporting. HugetlbPages was 0 for me. Mark, > running without the near nullspace also gives similar results. I have > attached the malloc_view and gamg

Re: [petsc-users] Using PETSc GPU backend

2024-04-13 Thread Matthew Knepley
Smith > >>> Sent: Saturday, July 15, 2023 8:36 AM > >>> To: Ng, Cho-Kuen > >>> Cc: petsc-users@mcs.anl.gov > >>> Subject: Re: [petsc-users] Using PETSc GPU backend > >>> > >>> Cho, > >>> > >>>

Re: [petsc-users] Exposing further detail in -log_view for Hypre withe PETSc

2024-04-10 Thread Matthew Knepley
On Wed, Apr 10, 2024 at 7:49 AM Khurana, Parv wrote: > Hello PETSc users community, Thank you in advance for your help as always. > I am using BoomerAMG from Hypre via PETSc as a part of preconditioner in my > software (Nektar++). I am trying to understand the time profiling > information that

Re: [petsc-users] Correct way to set/track global numberings in DMPlex?

2024-04-03 Thread Matthew Knepley
On Wed, Apr 3, 2024 at 2:28 PM Ferrand, Jesus A. wrote: > Dear PETSc team: (Hoping to get a hold of Jed and/or Matt for this one) > (Also, sorry for the mouthful below) I'm developing routines that will > read/write CGNS files to DMPlex and vice versa. One of the recurring > challenges is the

Re: [petsc-users] FE Tabulation values

2024-04-02 Thread Matthew Knepley
re is a different idea > behind it. > Yes, that is right. Thanks, Matt > Thanks. > Noam > On Tuesday, March 26th, 2024 at 11:17 PM, Matthew Knepley < > knep...@gmail.com> wrote: > > On Tue, Mar 26, 2024 at 2:23 PM Noam T. via petsc-users < >

Re: [petsc-users] PETSC Matrix debugging

2024-04-01 Thread Matthew Knepley
On Mon, Apr 1, 2024 at 1:57 PM Shatanawi, Sawsan Muhammad via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello everyone, I hope this email finds you well. Is there a way we can > check how the matrix looks like after setting it. I have tried debugging it > with gdb- break points- and print

Re: [petsc-users] Error loading data coming from a .hdf5 file into a DMSwarm

2024-04-01 Thread Matthew Knepley
fT7DAXF6-0fOpeWMEOJcrVL5grSHp-QCF8PdvRl51$ > > Este correo electrónico y, en su caso, cualquier fichero anexo al > mismo, contiene información de carácter confidencial exclusivamente > dirigida a su destinatario o destinatarios. Si no es UD. el > destinatario del mensaje, le rue

Re: [petsc-users] Error loading data coming from a .hdf5 file into a DMSwarm

2024-04-01 Thread Matthew Knepley
On Sun, Mar 31, 2024 at 4:08 PM MIGUEL MOLINOS PEREZ wrote: > Dear all, I am writing a function which store datasets (Vectors) coming > from a DMSwarm structure into a hdf5 file. This step is done nicely > write_function(){ PetscViewerHDF5Open(…) PetscViewerHDF5PushTimestepping(…) >

Re: [petsc-users] FE Tabulation values

2024-03-26 Thread Matthew Knepley
On Tue, Mar 26, 2024 at 2:23 PM Noam T. via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello, I am trying to understand the FE Tabulation data obtained from e. g > . PetscFEComputeTabulation. Using a 2D mesh with a single triangle, first > order, with vertices (0,0), (0,1), (1,0) (see msh

Re: [petsc-users] Question about how to use DS to do the discretization

2024-03-23 Thread Matthew Knepley
On Sat, Mar 23, 2024 at 8:03 AM Gong Yujie wrote: > Dear PETSc group, I'm reading the DS part for the discretization start > from SNES ex17. c which is a demo for solving linear elasticity problem. I > have two questions for the details. The first question is for the residual > function. Is the

Re: [petsc-users] MATSETVALUES: Fortran problem

2024-03-15 Thread Matthew Knepley
On Fri, Mar 15, 2024 at 9:55 AM Frank Bramkamp wrote: > Dear PETSc Team, I am using the latest petsc version 3. 20. 5. I would > like to create a matrix using MatCreateSeqAIJ To insert values, I use > MatSetValues. It seems that the Fortran interface/stubs are missing for > MatsetValues, as the

Re: [petsc-users] PAMI error on Summit

2024-02-29 Thread Matthew Knepley
On Thu, Feb 29, 2024 at 4:22 PM Blondel, Sophie via petsc-users < petsc-users@mcs.anl.gov> wrote: > I still get the same error when deactivating GPU-aware MPI. I also tried > unloading spectrum MPI and using openMPI instead (recompiling everything) > and I get a segfault in PETSc in that case

Re: [petsc-users] PAMI error on Summit

2024-02-29 Thread Matthew Knepley
On Thu, Feb 29, 2024 at 11:03 AM Blondel, Sophie via petsc-users < petsc-users@mcs.anl.gov> wrote: > Thank you Junchao, Yes, I am using gpu-aware MPI. Is "-use_gpu_aware_mpi > 0" a runtime option or a compile option? Best, Sophie From: Junchao Zhang > Sent: Thursday, February 29, 2024 10: 50 To:

Re: [petsc-users] Ghost points in DMSwarm

2024-02-25 Thread Matthew Knepley
Right now, there is no particle identity. Thanks, Matt > Best, > Miguel > > On Feb 25, 2024, at 6:53 PM, Matthew Knepley wrote: > > On Sun, Feb 25, 2024 at 7:21 AM MIGUEL MOLINOS PEREZ > wrote: > >> Dear Matthew, >> >> Thank you for answer

Re: [petsc-users] Ghost points in DMSwarm

2024-02-25 Thread Matthew Knepley
the residual equations of my problem (please, > don’t judge me, publish or perish...) > > Many thanks, > Miguel > > > On Feb 24, 2024, at 4:24 PM, Matthew Knepley wrote: > > On Fri, Feb 23, 2024 at 5:14 PM MIGUEL MOLINOS PEREZ > wrote: > >> Dear all, I am s

Re: [petsc-users] Ghost points in DMSwarm

2024-02-24 Thread Matthew Knepley
On Fri, Feb 23, 2024 at 5:14 PM MIGUEL MOLINOS PEREZ wrote: > Dear all, I am struggling on how to include ghost points in DMSwarm local > vectors. According to PETSc documentation it seems “straightforward” for a > DMDA mesh. However, I am not so sure on how to do it for a DMSwarm. In > fact, if

Re: [petsc-users] How to fetch right values of a local vector

2024-02-23 Thread Matthew Knepley
On Fri, Feb 23, 2024 at 9:54 AM 袁煕 wrote: > Hello, I cannot fetch right values of a local vector after a second time > calling DMSetLocalSection. My program runs like call > PetscSectionSetup(section1,ierr) call > DMSetLocalSection(dm_mesh,section1,ierr)call >

Re: [petsc-users] Fortran Interface NULL object / Casting

2024-02-23 Thread Matthew Knepley
On Thu, Dec 8, 2022 at 2:56 PM Barry Smith wrote: > >You would use *PETSC_NULL_DM*LABEL but Matt needs to customize the > PETSc Fortran stub for DMAddField() for you to handle accepting the NULL > from PETSc. > Sorry, I missed this message. The customization is done. Thanks, Matt

Re: [petsc-users] Difference between DMGetLocalVector and DMCreateLocalVector

2024-02-22 Thread Matthew Knepley
You are right. I was not clearing the caches when the section was reset. Stefano ahs fixed this now: https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7314__;!!G_uCfscf7eWS!ZPkq_k9vdzTZxeW53aWVTIcDgeGnywSm0tGKDJkJqdwgTomfYjw1lsTMyRtAjtruSslcgLIoKGg7IILlBxbJ$

Re: [petsc-users] Near nullspace lost in fieldsplit

2024-02-12 Thread Matthew Knepley
On Mon, Feb 12, 2024 at 7:10 AM Jeremy Theler (External) < jeremy.theler-...@ansys.com> wrote: > Hi Barry > > > The bug fix for 2 is availabel in > https://gitlab.com/petsc/petsc/-/merge_requests/7279 > > Note that our code goes through MatZeroRowsColumns_MPIAIJ() not through >

Re: [petsc-users] Near nullspace lost in fieldsplit

2024-02-09 Thread Matthew Knepley
On Fri, Feb 9, 2024 at 7:04 AM Jeremy Theler (External) < jeremy.theler-...@ansys.com> wrote: > Hi all > > Because of a combination of settings, our code passes through this line: > > > https://gitlab.com/petsc/petsc/-/blob/main/src/ksp/pc/impls/fieldsplit/fieldsplit.c?ref_type=heads#L692 > >

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-02-08 Thread Matthew Knepley
t other bug with coordinates (finger crossed). We are running the tests now. Thanks, Matt > Thanks, best regards, > Berend. > > p.s. If someone is interested in the code to transform a DMForest to a > DMPlex of type DM_POLY, I am more than happy to share. > > On

Re: [petsc-users] Creating DMPlex from the subsection of a DM

2024-02-07 Thread Matthew Knepley
On Wed, Feb 7, 2024 at 8:30 AM Mark Adams wrote: > Wait for Matt to chime in, but I think you will need to start from scratch > and use > https://petsc.org/release/manualpages/DMPlex/DMPlexBuildFromCellList > Let me restate things to make sure I get it. You want to select a submesh that retains

Re: [petsc-users] Advice for a non conform boundary coupling with PETSc

2024-02-05 Thread Matthew Knepley
On Mon, Feb 5, 2024 at 10:10 AM GUBERNATIS Pierre wrote: > Hello, > > I would appreciate an advice on this task, if possible. > > > > So far, we use PETSc to ‘couple’ two computations of the same simulation > code, in a single MPI run. > > I simplify but roughly, we have 2 Cartesian domains on

Re: [petsc-users] Bound exceed when running code with PETSc

2024-02-05 Thread Matthew Knepley
On Mon, Feb 5, 2024 at 8:48 AM TAY Wee Beng wrote: > Hi all, > > Not in my code, nor in PETSc. > I would try this. Of course, it would be best to see where exactly the overflow is happening. THanks, Matt > On 5/2/2024 8:21 pm, Matthew Knepley wrote: > > On Mon, F

Re: [petsc-users] Bound exceed when running code with PETSc

2024-02-05 Thread Matthew Knepley
On Mon, Feb 5, 2024 at 4:29 AM TAY Wee Beng wrote: > Hi, > > I have a code which uses PETSc and it was working fine. However, I > haven't used the code for a while and now we've migrated to a new cray > cluster so the compilers have been updated. I'm using gnu fortran. > > When running the code

Re: [petsc-users] PetscSection: Fortran interfaces

2024-02-03 Thread Matthew Knepley
Can you give us a simple code that is not working for you? My test should work src/dm/impls/plex/tests/ex26f90 Thanks, Matt On Sat, Feb 3, 2024 at 11:36 AM Barry Smith wrote: > > The Fortran "stubs" (subroutines) should be in >

Re: [petsc-users] PETSc init question

2024-01-31 Thread Matthew Knepley
On Wed, Jan 31, 2024 at 10:10 AM Alain O' Miniussi wrote: > Hi, > > It is indicated in: > https://petsc.org/release/manualpages/Sys/PetscInitialize/ > that the init function will call MPI_Init. > > What if MPI_Init was already called (as it is the case in my application) >From the page: "

Re: [petsc-users] Preconditioning of Liouvillian Superoperator

2024-01-31 Thread Matthew Knepley
On Wed, Jan 31, 2024 at 8:21 AM Mark Adams wrote: > Iterative solvers have to be designed for your particular operator. > You want to look in your field to see how people solve these problems. > (eg, zeros on the diagonal will need something like a block solver or maybe > ILU with a particular

Re: [petsc-users] pc_redistribute issue

2024-01-27 Thread Matthew Knepley
left preconditioning > using NONE norm type for convergence test > PC Object: (redistribute_sub_) 1 MPI process > type: lu > out-of-place factorization > tolerance for zero pivot 2.22045e-14 > > On Sat, Jan 27, 2024 at 10:24 AM Matthew Knepley

Re: [petsc-users] pc_redistribute issue

2024-01-27 Thread Matthew Knepley
View the solver. Matt On Sat, Jan 27, 2024 at 9:43 AM Mark Adams wrote: > I am not getting ksp_rtol 1e-12 into pc_redistribute correctly? > > > > * Linear redistribute_ solve converged due to CONVERGED_RTOL iterations 1 > 0 KSP Residual norm 2.182384017537e+02 1 KSP Residual norm >

Re: [petsc-users] Question about a parallel implementation of PCFIELDSPLIT

2024-01-23 Thread Matthew Knepley
ith v. Thanks, Matt > Thanks, > Pantelis > ------ > *Από:* Matthew Knepley > *Στάλθηκε:* Τρίτη, 23 Ιανουαρίου 2024 5:21 μμ > *Προς:* Pantelis Moschopoulos > *Κοιν.:* Barry Smith ; petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov>

Re: [petsc-users] Question about a parallel implementation of PCFIELDSPLIT

2024-01-23 Thread Matthew Knepley
getting MatLRC to do it. Thanks, Matt > Thanks, > Pantelis > -- > *Από:* Matthew Knepley > *Στάλθηκε:* Τρίτη, 23 Ιανουαρίου 2024 3:20 μμ > *Προς:* Pantelis Moschopoulos > *Κοιν.:* Barry Smith ; petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov> > *

Re: [petsc-users] Question about a parallel implementation of PCFIELDSPLIT

2024-01-23 Thread Matthew Knepley
upply the IS using the command PCFieldSplitSetIS, I do not specify > anything in the matrix set up right? > You should just need to specify the rows for each field as an IS. Thanks, Matt > Thanks, > Pantelis > ------ > *Από:* Matthew Knepley > *Σ

Re: [petsc-users] Question about a parallel implementation of PCFIELDSPLIT

2024-01-23 Thread Matthew Knepley
te the Field split: > ufields(3) = [0, 1, 2] > pfields(1) = [3] > > call PCSetType(pc, PCFIELDSPLIT, ierr) > call PCFieldSplitSetBlockSize(pc, 4,ierr) > call PCFieldSplitSetFields(pc, "0", 3, ufields, ufields,ierr) > call PCFieldSplitSetFields(pc, "1"

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Matthew Knepley
makes sense. You could call DMLocatePoints(), but maybe you are doing that. Thanks, Matt > Best, Berend. > > On 1/22/24 20:03, Matthew Knepley wrote: > > On Mon, Jan 22, 2024 at 1:57 PM Berend van Wachem < > berend.vanwac...@ovgu.de <mailto:berend.vanwac...@ovgu.de

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Matthew Knepley
me above, you would have to write both DMs. Are you trying to avoid this? Thanks, Matt > Thanks, > > Berend. > > On 1/22/24 18:58, Matthew Knepley wrote: > > On Mon, Jan 22, 2024 at 10:49 AM Berend van Wachem < > berend.vanwac...@ovgu.de <mailto:berend.vanwac...

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Matthew Knepley
On Mon, Jan 22, 2024 at 10:49 AM Berend van Wachem wrote: > Dear Petsc-Team, > > Is there a good way to define a unique integer number in each element > (e.g. a cell) of a DMPlex mesh, which is in the same location, > regardless of the number of processors or the distribution of the mesh > over

Re: [petsc-users] Question about a parallel implementation of PCFIELDSPLIT

2024-01-19 Thread Matthew Knepley
On Fri, Jan 19, 2024 at 4:25 PM Barry Smith wrote: > >Generally fieldsplit is used on problems that have a natural "split" of > the variables into two or more subsets. For example u0,v0,u1,v1,u2,v2,u3,v4 > This is often indicated in the vectors and matrices with the "blocksize" > argument, 2

Re: [petsc-users] HashMap Error when populating AIJCUSPARSE matrix

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 4:18 PM Yesypenko, Anna wrote: > Hi Matt, Barry, > > Apologies for the extra dependency on scipy. I can replicate the error by > calling setValue (i,j,v) in a loop as well. > In roughly half of 10 runs, the following script fails because of an error > in hashmapijv – the

Re: [petsc-users] Swarm view HDF5

2024-01-18 Thread Matthew Knepley
stepping is set. Thanks, Matt > Thanks, > Mark > > > On Thu, Jan 18, 2024 at 11:26 AM Matthew Knepley > wrote: > >> On Thu, Jan 18, 2024 at 10:08 AM Mark Adams wrote: >> >>> I am trying to view a DMSwarm with: -weights_view hdf5:part.h5 >>>

Re: [petsc-users] Swarm view HDF5

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 10:08 AM Mark Adams wrote: > I am trying to view a DMSwarm with: -weights_view hdf5:part.h5 > > Vec f; > PetscCall(DMSetOutputSequenceNumber(sw, 0, 0.0)); > PetscCall(DMSwarmCreateGlobalVectorFromField(sw, "w_q", )); >

Re: [petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 10:05 AM TARDIEU Nicolas wrote: > Arrghhh ! Shame on me ! > Sorry for that and thank you for the help Matt. > I works like a charm now. > No problem. I like when I figure it out :) Thanks, Matt > -- > *De :* knep...@gmail.com >

Re: [petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 9:46 AM TARDIEU Nicolas wrote: > Hi Matt, > The isovl is in global numbering. I am pasting the output of the script : > I see. Is your matrix diagonal? If so, there is no overlap. You need connections to the other rows in order to have overlapping submatrices.

Re: [petsc-users] HashMap Error when populating AIJCUSPARSE matrix

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 9:04 AM Yesypenko, Anna wrote: > Dear Petsc users/developers, > > I'm experiencing a bug when using petsc4py with GPU support. It may be my > mistake in how I set up a AIJCUSPARSE matrix. > For larger matrices, I sometimes encounter a error in assigning matrix > values;

Re: [petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 9:24 AM TARDIEU Nicolas via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear PETSc Team, > > I am trying to understand how to increase the overlap of a matrix. > I wrote the attached petsc4py script where I build a simple matrix and > play with the increaseOverlap

Re: [petsc-users] MatAssemblyBegin freezes during MPI communication

2024-01-18 Thread Matthew Knepley
On Thu, Jan 18, 2024 at 2:47 AM 袁煕 wrote: > Dear PETSc Experts, > > My FEM program works well generally, but in some specific cases with > multiple CPUs are used, it freezes when calling MatAssemblyBegin where > PMPI_Allreduce is called (see attached file). > > After some investigation, I found

Re: [petsc-users] Question about petsc4py with cuda

2024-01-15 Thread Matthew Knepley
On Mon, Jan 15, 2024 at 11:57 AM MIA via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi, > > I am trying to solve a large linear equation, which needs a GPU solver as > comparison. I install a CUDA-enabled PETSc and petsc4py from sources using > the release tarball. According to the test

Re: [petsc-users] [Gmsh] Access both default sets and region names

2024-01-12 Thread Matthew Knepley
On Fri, Jan 12, 2024 at 5:26 AM Noam T. wrote: > Great. > > Thank you very much for the quick replies. > It has now merged to the main branch. Thanks, Matt > Noam > On Thursday, January 11th, 2024 at 9:34 PM, Matthew Knepley < > knep...@gmail.com> wrote: >

Re: [petsc-users] [Gmsh] Access both default sets and region names

2024-01-11 Thread Matthew Knepley
/petsc/petsc/-/merge_requests/7178 If you build that branch, you can use -dm_plex_gmsh_use_generic to turn on those labels. Thanks, Matt > Thanks, > Noam > On Thursday, January 11th, 2024 at 6:31 PM, Matthew Knepley < > knep...@gmail.com> wrote: > > On Thu, Jan

Re: [petsc-users] [Gmsh] Access both default sets and region names

2024-01-11 Thread Matthew Knepley
> Noam > On Thursday, January 11th, 2024 at 5:28 PM, Matthew Knepley < > knep...@gmail.com> wrote: > > On Thu, Jan 11, 2024 at 11:18 AM Noam T. via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Would it be feasible to have an option (e.g. new flag along t

Re: [petsc-users] [Gmsh] Access both default sets and region names

2024-01-11 Thread Matthew Knepley
On Thu, Jan 11, 2024 at 11:18 AM Noam T. via petsc-users < petsc-users@mcs.anl.gov> wrote: > Would it be feasible to have an option (e.g. new flag along the lines of > -dm_plex_gmsh_...) that allows the user to access both the default sets > (Cell / Face / Vertex) together with user-defined

Re: [petsc-users] Matvecs and KSPSolves with multiple vectors

2023-12-21 Thread Matthew Knepley
On Thu, Dec 21, 2023 at 6:46 AM Sreeram R Venkat wrote: > Ok, I think the error I'm getting has something to do with how the > multiple solves are being done in succession. I'll try to see if there's > anything I'm doing wrong there. > > One question about the -pc_type lu -ksp_type preonly

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-21 Thread Matthew Knepley
ich launches a debugger window, and then 'cont' to run until the error, and then 'where' to print the stack trace. Thanks, Matt > Thank you again, > > Sawsan > ------ > *From:* Matthew Knepley > *Sent:* Wednesday, December 20, 2023 6:54 PM > *T

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Matthew Knepley
On Wed, Dec 20, 2023 at 9:49 PM Shatanawi, Sawsan Muhammad via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello Barry, > > Thank you a lot for your help, Now I am getting the attached error message. > Do not destroy the PC from KSPGetPC() THanks, Matt > Bests, > Sawsan >

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Matthew Knepley
On Tue, Dec 19, 2023 at 9:50 PM Shatanawi, Sawsan Muhammad via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello everyone, > > I hope this email finds you well. > > My Name is Sawsan Shatanawi, and I am currently working on developing a > Fortran code for simulating groundwater flow in a 3D

Re: [petsc-users] [petsc-maint] DMSwarm on multiple processors

2023-12-20 Thread Matthew Knepley
same number of processes on your own machine under Address Sanitizer with no errors? Thanks, Matt > Thanks again for your help. > > > > Best regards, > > > > Joauma > > > > *De : *Matthew Knepley > *Date : *mardi, 19 décembre 2023 à 14:3

Re: [petsc-users] [petsc-maint] DMSwarm on multiple processors

2023-12-19 Thread Matthew Knepley
is connected to that machine, rather than the library. Do you have access to a second parallel machine? Thanks, Matt > Thanks a lot for your help. > > > > Best regards, > > > > Joauma > > > > *De : *Matthew Knepley > *Date : *lundi, 18 d

Re: [petsc-users] [petsc-maint] DMSwarm on multiple processors

2023-12-18 Thread Matthew Knepley
ng under valgrind, or using Address Sanitizer from clang. Thanks, Matt Thanks for your help. > > > > Best regards, > > > > Joauma > > > > *De : *Matthew Knepley > *Date : *jeudi, 23 novembre 2023 à 15:32 > *À : *Joauma Marichal > *Cc : *petsc-ma.

Re: [petsc-users] Call to DMSetMatrixPreallocateSkip not changing allocation behavior

2023-12-14 Thread Matthew Knepley
On Thu, Dec 14, 2023 at 2:06 PM Fackler, Philip via petsc-users < petsc-users@mcs.anl.gov> wrote: > I'm using the following sequence of functions related to the Jacobian > matrix: > > DMDACreate1d(..., ); > DMSetFromOptions(da); > DMSetUp(da); > DMSetMatType(da, MATAIJKOKKOS); >

Re: [petsc-users] 捕获

2023-12-14 Thread Matthew Knepley
On Thu, Dec 14, 2023 at 1:27 AM 291--- via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear SLEPc Developers, > > I a am student from Tongji University. Recently I am trying to write a c++ > program for matrix solving, which requires importing the PETSc library that > you have developed.

Re: [petsc-users] DMSTAG Gathering Vector on single process

2023-12-13 Thread Matthew Knepley
ed, Dec 6, 2023 at 8:18 PM Barry Smith wrote: > >> >> >> On Dec 6, 2023, at 8:35 PM, Matthew Knepley wrote: >> >> On Wed, Dec 6, 2023 at 8:10 PM Barry Smith wrote: >> >>> >>> Depending on the serial library you may not need to split the vector >&g

Re: [petsc-users] Domain decomposition in PETSc for Molecular Dynamics

2023-12-12 Thread Matthew Knepley
e. Second, you can choose a grid size of R_cutoff for the background grid, and then check neighbors. This is probably how I would start. Thanks, Matt > Best, > Miguel > > On 13 Dec 2023, at 01:14, Matthew Knepley wrote: > >  > On Tue, Dec 12, 2023 at 2:36 PM

Re: [petsc-users] difference in Face Sets in latest petsc release

2023-12-12 Thread Matthew Knepley
h overlapping tag ranges. That seems counterproductive. Thanks, Matt > Thanks, > Sharan > > *Group - Theory & Simulation* > *Department of Microstructure Physics & Alloy Design* > > > > * From: * Matthew Knepley > * To: * Sharan Roongta > *

Re: [petsc-users] difference in Face Sets in latest petsc release

2023-12-12 Thread Matthew Knepley
On Tue, Dec 12, 2023 at 5:50 PM Sharan Roongta wrote: > Hello, > > I see discrepancy in the size/value of the 'Face Sets' printed in the > current release v3.20.2 , and v3.18.6 > > Attached is the .msh file > > -dm_view with v3.18.6 > DM Object: Generated Mesh 1 MPI process > type: plex >

Re: [petsc-users] DMPlex "Could not find orientation for quadrilateral"

2023-12-12 Thread Matthew Knepley
On Tue, Dec 12, 2023 at 12:22 PM onur.notonur via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi, > > I hope this email finds you well. I am currently working on importing an > OpenFOAM PolyMesh into DMPlex, and I've encountered an issue. The PolyMesh > format includes face owner

Re: [petsc-users] Applying Natural Boundary Conditions using PETSc FEM Technology

2023-12-12 Thread Matthew Knepley
On Tue, Dec 12, 2023 at 12:23 PM Brandon Denton via petsc-users < petsc-users@mcs.anl.gov> wrote: > Good Afternoon, > > I am currently working on an Inviscid Navier-Stokes problem and would like > to apply DM_BC_NATURAL boundary conditions to my domain. Looking through > the example files on

Re: [petsc-users] Fortran Interface

2023-12-12 Thread Matthew Knepley
On Tue, Dec 12, 2023 at 11:27 AM Palmer, Bruce J via petsc-users < petsc-users@mcs.anl.gov> wrote: > Does documentation for the PETSc fortran interface still exist? I looked > at the web pages for 3.20 (petsc.org/release) but if you go under the tab > C/Fortran API, only descriptions for the C

Re: [petsc-users] Question on output vector in vtk file

2023-12-11 Thread Matthew Knepley
On Mon, Dec 11, 2023 at 4:32 AM Gong Yujie wrote: > Dear PETSc developers, > > I have a DMPlex DM with 1 field 1dof. I'd like to output a vector with > block size equals to 3. It seems that there is no response using command > line option or using some code about PetscViewer. > I am not sure

Re: [petsc-users] Bug report VecNorm

2023-12-11 Thread Matthew Knepley
We already merged the fix. Thanks, Matt On Mon, Dec 11, 2023 at 6:00 AM Barry Smith wrote: > >I don't fully understand your code and what it is trying to > demonstrate, but VecGetArrayWrite is Logically Collective. Having > > if(rank == 0) > { >

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Matthew Knepley
On Sun, Dec 10, 2023 at 12:57 PM Matthew Knepley wrote: > On Sun, Dec 10, 2023 at 12:54 PM Matthew Knepley > wrote: > >> On Sun, Dec 10, 2023 at 2:41 AM Stephan Köhler < >> stephan.koeh...@math.tu-freiberg.de> wrote: >> >>> Dear PETSc/Tao team, >&

Re: [petsc-users] Bug report VecNorm

2023-12-10 Thread Matthew Knepley
On Sun, Dec 10, 2023 at 12:54 PM Matthew Knepley wrote: > On Sun, Dec 10, 2023 at 2:41 AM Stephan Köhler < > stephan.koeh...@math.tu-freiberg.de> wrote: > >> Dear PETSc/Tao team, >> >> there is a bug in the voector interface: In the function >> VecNorm, se

  1   2   3   4   5   6   7   8   9   10   >