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

2024-05-23 Thread Stefano Zampini
It is true if A is nonsingular. if it is singular I never did the algebra; you need to use generalized Schur complements with pseudo-inverses Il giorno ven 24 mag 2024 alle ore 00:04 Barry Smith ha scritto: > > > On May 23, 2024, at 3:48 PM, Stefano Zampini > wrote: > &

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

2024-05-23 Thread Stefano Zampini
the null space of the Schur complement is the restriction of the original null space. I guess if fieldsplit is Schur type then we could in principle extract the sub vectors and renormalize them On Thu, May 23, 2024, 22:13 Jed Brown wrote: > Barry Smith writes: > Unfortunately it cannot >

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

2024-05-06 Thread Stefano Zampini
n the original array will have no effect). > > Lisandro: would be great if you can provide some guidance. > > Thanks, > > Samar > > On May 3, 2024, at 12:45 PM, Stefano Zampini > wrote: > > While waiting for our Python wizard to shed light on this, I note that, > fro

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

2024-05-03 Thread Stefano Zampini
While waiting for our Python wizard to shed light on this, I note that, from the documentation of PyArray_FROM_OTF

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

2024-03-23 Thread Stefano Zampini
Take a look at https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex11.c?ref_type=heads__;!!G_uCfscf7eWS!er4CI8GIe7OCWvCmRKQpZt6FOz1QYvbuZOdf2Fm7pvMGee3I9M5bhjNytv42F9C17NpBy0i6mTfgEmQfUR_QOqwC7gC6pYk$ and the discussion at the beginning (including the

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

2024-02-22 Thread Stefano Zampini
I guess we are missing to clear the internal scratch vectors, matt can confirm Can you please add this call AFTER you set the local section to confirm? call DMClearLocalVectors(dm_mesh, ierr); Il giorno gio 22 feb 2024 alle ore 11:36 袁煕 ha scritto: > Hello, I found DMGetLocalVector and

Re: [petsc-users] Bug in VecNorm, 3.20.3

2024-01-23 Thread Stefano Zampini
petsc main in debug mode has some additional checks for this cases. Can you run with the main branch and configure petsc using --with-debugging=1? Il giorno mar 23 gen 2024 alle ore 22:35 Barry Smith ha scritto: > >This could happen if the values in the vector get changed but the >

Re: [petsc-users] Parallel processes run significantly slower

2024-01-11 Thread Stefano Zampini
You are creating the matrix on the wrong communicator if you want it parallel. You are using PETSc.COMM_SELF On Thu, Jan 11, 2024, 19:28 Steffen Wilksen | Universitaet Bremen < swilk...@itp.uni-bremen.de> wrote: > Hi all, > > I'm trying to do repeated matrix-vector-multiplication of large sparse

Re: [petsc-users] Problem with matrix and vector using GPU

2023-09-20 Thread Stefano Zampini
You are missing a call to DMSetFromOptions On Wed, Sep 20, 2023, 19:20 Ramoni Z. Sedano Azevedo < ramoni.zsed...@gmail.com> wrote: > Thanks for the tip. Using dm_mat_type and dm_vec_type the code runs. > ./${executable} \ > -A_dm_mat_type aijcusparse \ > -P_dm_mat_type aijcusparse \ >

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

2023-09-07 Thread Stefano Zampini
The solver did not diverge. It was the line search that was not able to make further progress in minimizing the 2-norm of the residual. This is common in nonlinear solvers. It would help if you tell us what you are trying to solve. Note that at the first step, your residual norm is already 1.e-6.

Re: [petsc-users] Python PETSc performance vs scipy ZVODE

2023-08-10 Thread Stefano Zampini
nction will be replaced > by a series of gaussian pulses in the future, which will never be zero. > Maybe one could do an approximation and skip the second mult, if the > gaussians are close to zero. > On 10.08.23 12:16, Stefano Zampini wrote: > > If you do the mult of "pump"

Re: [petsc-users] Python PETSc performance vs scipy ZVODE

2023-08-10 Thread Stefano Zampini
scale = 0.5 * (5 < t < 10) > F.axpy(scale, tmp_vec) > > It is a little bit slower than option 3, but with about 2100it/s > consistently ~10% faster than option 4. > > Thank you very much for the suggestion! > On 10.08.23 11:47, Stefano Zampini wrote: > > I would use o

Re: [petsc-users] Python PETSc performance vs scipy ZVODE

2023-08-10 Thread Stefano Zampini
s message. > > One last point: If I didn't misunderstand the documentation at > https://petsc.org/release/manual/ts/#special-cases, should this maybe be > changed? > > Best regards > Niclas > On 09.08.23 17:51, Stefano Zampini wrote: > > TSRK is an explicit solver. Unless y

Re: [petsc-users] Python PETSc performance vs scipy ZVODE

2023-08-09 Thread Stefano Zampini
TSRK is an explicit solver. Unless you are changing the ts type from command line, the explicit jacobian should not be needed. On top of Barry's suggestion, I would suggest you to write the explicit RHS instead of assembly a throw away matrix every time that function needs to be sampled. On

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

2023-07-13 Thread Stefano Zampini
clearly, I meant optimized mode Il giorno gio 13 lug 2023 alle ore 19:19 Stefano Zampini < stefano.zamp...@gmail.com> ha scritto: > In any case, we need to activate PetscCheck in debug mode too. This could > have been avoided. > > Il giorno gio 13 lug 2023 alle ore 18:23 K

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

2023-07-13 Thread Stefano Zampini
In any case, we need to activate PetscCheck in debug mode too. This could have been avoided. Il giorno gio 13 lug 2023 alle ore 18:23 Karin ha scritto: > Thank you very much for the information Matt. > Unfortunately, I do not use DM :-( > > Le jeu. 13 juil. 2023 à 13:44, Matthew Knepley a

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

2023-06-20 Thread Stefano Zampini
The loop should iterate on the number of entries of the array, not the number of local rows On Tue, Jun 20, 2023, 17:07 Matthew Knepley wrote: > 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

Re: [petsc-users] MatSetSizes: C vs python

2023-06-06 Thread Stefano Zampini
The right call in petsc4py is P.setSizes(((nrowsLoc,PETSc.DECIDE),(ncolsLoc,PETSc.DECIDE)),1) https://petsc.org/main/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat.setSizes Il giorno mar 6 giu 2023 alle ore 13:05 Blaise Bourdin ha scritto: > Hi, > > Does anybody understand

Re: [petsc-users] Petsc using VecDuplicate in solution process

2023-06-06 Thread Stefano Zampini
Il giorno mar 6 giu 2023 alle ore 09:24 Pichler, Franz < franz.pich...@v2c2.at> ha scritto: > Hello, > > I was just investigating my KSP_Solve_BCGS Routine with algrandcallgrind, > > I see there that petsc is using a vecduplicate (onvolvin malloc and copy) > every time it is called. > Do you

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

2023-05-22 Thread Stefano Zampini
If I may add to the discussion, it may be that you are going OOM since you are trying to factorize a 3 million dofs problem, this problem goes undetected and then fails at a later stage Il giorno lun 22 mag 2023 alle ore 20:03 Zongze Yang ha scritto: > Thanks! > > Zongze > > Matthew Knepley

Re: [petsc-users] problem for using PCBDDC

2023-05-15 Thread Stefano Zampini
BDDC is a domain decomposition solver of the non-overlapping type and cannot be used on assembled operators. If you want to use it, you need to restructure your code a bit. I presume from your message that your current approach is 1) generate_assembled_csr 2) decompose_csr? or decompose_mesh? 3)

Re: [petsc-users] Help with KSPSetConvergenceTest

2023-05-13 Thread Stefano Zampini
Run make allfortranstubs to generate the fortran interfaces, then make On Sat, May 13, 2023, 13:35 Edoardo alinovi wrote: > Hello Barry, > > I have seen you guys merged in main the minimum tolerance stuff. > > After compiling that branch, I have tried to > call

Re: [petsc-users] Petsc ObjectStateIncrease without proivate header

2023-05-08 Thread Stefano Zampini
You can achieve the same effect by calling MatAssemblyBegin/End Il giorno lun 8 mag 2023 alle ore 15:54 Pichler, Franz < franz.pich...@v2c2.at> ha scritto: > Hello, > i am using petsc in a single cpu setup where I have preassembled crs > matrices that I wrap via PetSC’s > >

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

2023-04-05 Thread Stefano Zampini
It seems there's some typo/error in the configure command that is being executed. Can you post it here? Il giorno mer 5 apr 2023 alle ore 23:18 Kaus, Boris ha scritto: > Hi everyone, > > I’m trying to install precompiled binaries for PETSc 3.18.5 & 3.19.0 using > the BinaryBuilder

Re: [petsc-users] Does petsc4py support matrix-free iterative solvers?

2023-03-14 Thread Stefano Zampini
You can find other examples at https://gitlab.com/stefanozampini/petscexamples On Tue, Mar 14, 2023, 19:50 Jose E. Roman wrote: > Have a look at ex100.c ex100.py: > > https://gitlab.com/petsc/petsc/-/blob/c28a890633c5a91613f1645670105409b4ba3c14/src/ksp/ksp/tutorials/ex100.c > >

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

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

Re: [petsc-users] Question for Petsc

2023-02-16 Thread Stefano Zampini
For bddc, you can also take a look at https://gitlab.com/petsc/petsc/-/blob/main/src/ksp/ksp/tutorials/ex71.c On Thu, Feb 16, 2023, 19:41 Matthew Knepley wrote: > On Thu, Feb 16, 2023 at 9:14 AM ziming xiong > wrote: > >> Hello, >> I want to use Petsc to implement high performance computing,

Re: [petsc-users] GPU implementation of serial smoothers

2023-01-10 Thread Stefano Zampini
DILU in openfoam is our block Jacobi ilu subdomain solvers On Tue, Jan 10, 2023, 23:45 Barry Smith wrote: > > The default is some kind of Jacobi plus Chebyshev, for a certain class > of problems, it is quite good. > > > > On Jan 10, 2023, at 3:31 PM, Mark Lohry wrote: > > So what are people

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

2022-12-24 Thread Stefano Zampini
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 > (real and nonsymmetric). > I already checked the kspcomputeeigenvalues and kspcomputeritz. > > However, the target matrix

Re: [petsc-users] Get solution and rhs in the ts monitor

2022-11-10 Thread Stefano Zampini
-ksp_view_mat -ksp_view_rhs -ksp_view_solution > On Nov 10, 2022, at 5:00 PM, Tang, Qi wrote: > > Yes, but I need to get A, x and b out, so that I can test them in pyamg for > other preconditioner options. I can get A, x, and b through what I described, > but I do not think x or b is the

Re: [petsc-users] KSP on GPU

2022-11-01 Thread Stefano Zampini
Are you calling VecRestoreArray when you are done inserting the values? On Tue, Nov 1, 2022, 18:42 Carl-Johan Thore via petsc-users < petsc-users@mcs.anl.gov> wrote: > Thanks for the tips! > > > > The suggested settings for GAMG did not yield better results, > > but hypre worked well right away,

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-14 Thread Stefano Zampini
rds, > Peng Sun > ------ > *From:* Stefano Zampini > *Sent:* Friday, October 14, 2022 4:36 AM > *To:* Peng Sun > *Cc:* Zhang, Hong ; petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov> > *Subject:* Re: [petsc-users] Issue with single precision co

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-14 Thread Stefano Zampini
> On Oct 14, 2022, at 3:53 AM, Peng Sun wrote: > > Hi Hong, > > Thanks for the advice. I could not install petsc4py with the > --with-petsc4py=1 option, which gave me an "No rule to make target > 'petsc4py-install'" error when I ran "make install". That was why I needed > to install

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Stefano Zampini
Matt Yes, petsc4py does the right thing. This is probably. Picking up the wrong PETSc arch. Peng, can you please run this? import petsc4py petsc4py.init() print(petsc4py.get_config()) > On Oct 13, 2022, at 11:23 PM, Matthew Knepley wrote: > > Lisandro, > > PETSc is compiled for single.

Re: [petsc-users] Using VecGetType() and VecNest

2022-08-20 Thread Stefano Zampini
The idea of the pod code was to create local vectors to perform local products and use mpi non blocking collectives . Not sure how to fix for the nest case. I'm on vacation now, I can take a look in a couple of weeks or so On Sat, Aug 20, 2022, 05:30 Barry Smith wrote: > > I am not sure why

Re: [petsc-users] Issue to set values to a matrix in parallel in python

2022-08-09 Thread Stefano Zampini
PETSc distributes matrices and vectors in parallel. Take a look at https://petsc.org/release/docs/manualpages/Vec/VecGetOwnershipRange.html > On Aug 9, 2022, at 11:21 AM, Thomas Saigre wrote: > > Hi, > > I've been trying for a few weeks to construct a matrix from a list of > vectors,

Re: [petsc-users] Error running src/snes/tutorials/ex19 on Nvidia Tesla K40m : CUDA ERROR (code = 101, invalid device ordinal)

2022-07-14 Thread Stefano Zampini
You don't need unified memory for boomeramg to work. On Thu, Jul 14, 2022, 18:55 Barry Smith wrote: > > So the PETSc test all run, including the test that uses a GPU. > > The hypre test is failing. It is impossible to tell from the output why. > > You can run it manually, cd

Re: [petsc-users] Strange strong scaling result

2022-07-11 Thread Stefano Zampini
It depends on the solver used. What solver are you using? > On Jul 11, 2022, at 5:33 PM, Ce Qin wrote: > > Dear all, > > I want to analyze the strong scaling of our in-house FEM code. > The test problem has about 20M DoFs. I ran the problem using > various settings. The speedups for the

Re: [petsc-users] Solving a linear system with sparse matrices

2022-05-21 Thread Stefano Zampini
MatMatSolve with sparse rhs works with MUMPS On Sat, May 21, 2022, 19:41 Mateo José Moinelo wrote: > Hi. I am working on a Petsc program, and I have a problem. I have two > sparse matrices A and B, and I want to compute inv(A)*B. I understand that > computing the inverse of a matrix directly

Re: [petsc-users] Update of the buffer

2022-02-10 Thread Stefano Zampini
> On Feb 10, 2022, at 6:00 PM, Matthew Knepley wrote: > > On Thu, Feb 10, 2022 at 9:17 AM Medane TCHAKOROM > mailto:medane.tchako...@univ-fcomte.fr>> > wrote: > Hello , > > Sorry if this question does not belong to this mailling list, i'am using > Petsc , but with some > > MPI parts code,

Re: [petsc-users] PETSc GPU MatMatMult performance question

2022-02-03 Thread Stefano Zampini
1) It uses MatMPIDenseScatter() to move to the other ranks their needed > rows of the C matrix. That function has the call MatDenseGetArrayRead() > normally would trigger a copy of C up to the CPU each time. But since C is > not changing in your test run I guess it only triggers one copy. > > 2)

Re: [petsc-users] [petsc-dev] MatPreallocatorPreallocate segfault with PETSC 3.16

2022-02-01 Thread Stefano Zampini
Il giorno mar 1 feb 2022 alle ore 18:34 Jed Brown ha scritto: > Patrick Sanan writes: > > > Am Di., 1. Feb. 2022 um 16:20 Uhr schrieb Jed Brown : > > > >> Patrick Sanan writes: > >> > >> > Sorry about the delay on this. I can reproduce. > >> > > >> > This regression appears to be a result of

Re: [petsc-users] Error when configuring the PETSC environment

2022-01-25 Thread Stefano Zampini
You should attach configure.log if you want us to take a look at the failure. In any case, you should use gmake that you can install via brew > On Jan 26, 2022, at 12:53 AM, Peng, Kang wrote: > > Hi PETSc, > > I am trying to configure the PETSC environment in MacOS (Apple M1 pro chip, >

Re: [petsc-users] hypre / hip usage

2022-01-22 Thread Stefano Zampini
Mark the two options are only there to test the code in CI, and are not needed in general '--download-hypre-configure-arguments=--enable-unified-memory', This is only here to test the unified memory code path '--with-hypre-gpuarch=gfx90a', This is not needed if rocminfo is in PATH Our

Re: [petsc-users] Nullspaces

2022-01-04 Thread Stefano Zampini
Il Mar 4 Gen 2022, 16:56 Marco Cisternino ha scritto: > Hello Mark, > > I analyzed the codes with valgrind, both the real code and the tiny one. > > I obviously used memcheck tool but with full leak check compiling the > codes with debug info. > > Not considering OpenMPI events (I have no

Re: [petsc-users] PCs and MATIS

2021-12-14 Thread Stefano Zampini
Eric What Pierre and Barry suggested is OK. If you want to take a look at how to use MATIS with overlapped meshes, see https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/plex/plexhpddm.c This code assembles the

Re: [petsc-users] hypre on gpus

2021-11-22 Thread Stefano Zampini
You don't need to specify the HYPRE commit. Remove --download-hypre-commit=origin/hypre_petsc from the configuration options Il giorno lun 22 nov 2021 alle ore 17:29 Matthew Knepley ha scritto: > On Mon, Nov 22, 2021 at 8:50 AM Karthikeyan Chockalingam - STFC UKRI < >

Re: [petsc-users] PCSHELL does not support getting factor matrix

2021-11-19 Thread Stefano Zampini
Oh, I see the stack trace now. This requires to compute the inertia? > On Nov 19, 2021, at 3:45 PM, Stefano Zampini > wrote: > > Jose > > Now that we have the PCMatApply interface, you could switch to use that > inside SLEPc. I guess you are using MatSolve, right? >

Re: [petsc-users] PCSHELL does not support getting factor matrix

2021-11-19 Thread Stefano Zampini
Jose Now that we have the PCMatApply interface, you could switch to use that inside SLEPc. I guess you are using MatSolve, right? If not, the alternative is to have a PCFactorGetMatrix with creates on the fly an object that behaves like it. The problem is that we do not have a matching

Re: [petsc-users] Installation on NEC SX-Aurora TSUBASA

2021-10-28 Thread Stefano Zampini
> > Rafael. > > Em qui., 28 de out. de 2021 às 16:38, Stefano Zampini > mailto:stefano.zamp...@gmail.com>> escreveu: > Rafael > > PETSc can be built for NEC vector engines. Here is a sample configure script > https://gitlab.com/petsc/petsc/-/blob/main/config/exa

Re: [petsc-users] Installation on NEC SX-Aurora TSUBASA

2021-10-28 Thread Stefano Zampini
Rafael PETSc can be built for NEC vector engines. Here is a sample configure script https://gitlab.com/petsc/petsc/-/blob/main/config/examples/arch-necve.py NEC blas lapack should be automatically used. I don’t know if

Re: [petsc-users] Why PetscDestroy global collective semantics?

2021-10-23 Thread Stefano Zampini
Non-deterministic garbage collection is an issue from Python too, and firedrake folks are also working on that. We may consider deferring all calls to MPI_Comm_free done on communicators with 1 as ref count (i.e., the call will actually wipe out some internal MPI data) in a collective call that

Re: [petsc-users] Questions on Petsc4py with PyCUDA

2021-10-23 Thread Stefano Zampini
Use v.setType('veccuda')? Or v.setType(PETSc.Vec.Type.VECCUDA) Il Sab 23 Ott 2021, 11:46 Guangpu Zhu ha scritto: > Dear Sir/Madam, > > I am using the Petsc4py with PyCUDA. According to the following > link > > >

Re: [petsc-users] Still reachable memory in valgrind

2021-10-12 Thread Stefano Zampini
Your are using two different mallocs in PETSc. For your 3.14 test, PetscMallocAlign is used, while for 3.16, PetscTrMallocDefault is called, which uses much more memory to trace memory corruption previous allocated PETSc data. Il giorno mar 12 ott 2021 alle ore 18:07 Pierre Seize ha scritto: >

Re: [petsc-users] On QN + Fieldsplit

2021-10-12 Thread Stefano Zampini
Il giorno mar 12 ott 2021 alle ore 13:56 Nicolás Barnafi ha scritto: > Hello PETSc users, > > first email sent! > I am creating a SNES solver using fenics, my example runs smoothly with > 'newtonls', but gives a strange missing function error (error 83): > > Dolphin swallows any useful error

Re: [petsc-users] Error "Attempting to use an MPI routine before initializing MPICH" after compiling PETSc with Intel MPI and GCC

2021-10-11 Thread Stefano Zampini
; Regards, > > Roland > > Am 11.10.21 um 14:24 schrieb Stefano Zampini: >> You are most probably using a different mpiexec then the one used to compile >> petsc. >> >> >> >>> On Oct 11, 2021, at 3:23 PM, Roland Richter >> <mailt

Re: [petsc-users] Error "Attempting to use an MPI routine before initializing MPICH" after compiling PETSc with Intel MPI and GCC

2021-10-11 Thread Stefano Zampini
You are most probably using a different mpiexec then the one used to compile petsc. > On Oct 11, 2021, at 3:23 PM, Roland Richter wrote: > > I tried either ./ex19 (SNES-example), mpirun ./ex19 or mpirun -n 1 ./ex19, > all with the same result. > > Regards, > > Roland > > Am 11.10.21 um

Re: [petsc-users] Error "Attempting to use an MPI routine before initializing MPICH" after compiling PETSc with Intel MPI and GCC

2021-10-11 Thread Stefano Zampini
Try removing line 15 boost_procs = boost::thread::physical_concurrency(); Usually these errors are caused by destructors called when objects go out of scope > On Oct 11, 2021, at 12:23 PM, Roland Richter wrote: > >

Re: [petsc-users] Hypre runtime switch CPU/GPU

2021-10-07 Thread Stefano Zampini
We have discussed full runtime switch in HYPRE with Ruipeng few weeks ago, I'm not sure what's the status. cc'ing him Il giorno gio 7 ott 2021 alle ore 14:10 Mark Adams ha scritto: > I'm not sure, but I suspect that Hypre does not support runtime switching > and our model is that you can switch

Re: [petsc-users] Spock link error

2021-09-19 Thread Stefano Zampini
Are you following the user advices here https://docs.olcf.ornl.gov/systems/spock_quick_start_guide.html#compiling-with-the-cray-compiler-wrappers-cc-or-cc ? Il giorno dom 19 set 2021 alle ore 16:30 Mark Adams ha scritto: > I am getting to see this error. It seems to be suggesting that I turn >

Re: [petsc-users] PETSC installation on Cray

2021-09-13 Thread Stefano Zampini
Enrico I have accidentally stepped on the same issue. You may want to check if it works with this branch https://gitlab.com/petsc/petsc/-/tree/stefanozampini/cray-arm Il giorno mar 2 mar 2021 alle ore 23:03 Barry Smith ha scritto: > > Please try the following. Make four files as below then

Re: [petsc-users] KSPSolve with MPIAIJ with non-square 'diagonal parts'

2021-08-30 Thread Stefano Zampini
What is the error you are getting from the KSP? Default solver in parallel in BlockJacobi+ILU which does not work for non-square matrices. You do not need to call PCSetFromOptions on the pc. Just call KSPSetFromOptions and run with -pc_type none > On Aug 30, 2021, at 9:17 PM, Olivier Jamond

Re: [petsc-users] MatZeroRows changes my sparsity pattern

2021-07-15 Thread Stefano Zampini
Alexander Do you have a small code to reproduce the issue? Below is the output using a PETSc example (src/mat/tests/ex11). The pattern is kept. kl-18448:tests szampini$ ./ex11 Mat Object: 1 MPI processes type: seqaij row 0: (0, 5.) row 1: (0, -1.) (1, 4.) (2, -1.) (6, -1.) row 2: (2,

Re: [petsc-users] [EXTERNAL] Re: Problem with PCFIELDSPLIT

2021-07-14 Thread Stefano Zampini
ess. So if what I said is true, that effectively means it uses > U0 as the initial guess. > > Qi > >> On Jul 14, 2021, at 2:56 AM, Matthew Knepley > <mailto:knep...@gmail.com>> wrote: >> >> On Wed, Jul 14, 2021 at 4:43 AM Stefano Zampini > <mailto:st

Re: [petsc-users] [EXTERNAL] Re: Problem with PCFIELDSPLIT

2021-07-14 Thread Stefano Zampini
Qi Backward Euler is a special case of Theta methods in PETSc (Theta=1). In src/ts/impls/implicit/theta/theta.c on top of SNESTSFormFunction_Theta you have some explanation of what is solved for at each time step (see below). SNES then solves for the Newton update dy_n and the next Newton

Re: [petsc-users] CUDA running out of memory in PtAP

2021-07-09 Thread Stefano Zampini
etting > messy. > Thanks, > > On Wed, Jul 7, 2021 at 9:50 AM Stefano Zampini <mailto:stefano.zamp...@gmail.com>> wrote: > Do you want me to open an MR to handle the sequential case? > >> On Jul 7, 2021, at 3:39 PM, Mark Adams > <mailto:mfad...@lbl.gov>> wro

Re: [petsc-users] download zlib error

2021-07-07 Thread Stefano Zampini
ecent call last): > File "/ccs/home/adams/arch-spock-dbg-cray-kokkos.py", line 27, in > > '--LDFLAGS=-L'+os.environ['ROCM_PATH'],+'lib -lhsa-runtime64', > TypeError: bad operand type for unary +: 'str' > > On Wed, Jul 7, 2021 at 11:08 AM Stefano Zampini > wrote:

Re: [petsc-users] download zlib error

2021-07-07 Thread Stefano Zampini
Mark On Spock, you can use https://gitlab.com/petsc/petsc/-/blob/main/config/examples/arch-olcf-spock.py as a template for your configuration. You need to add libraries as LDFLAGS to resolve the hsa symbols > On

Re: [petsc-users] CUDA running out of memory in PtAP

2021-07-07 Thread Stefano Zampini
g_reuse_interpolation > [7]PETSC ERROR: -pc_type gamg > [7]PETSC ERROR: -petscspace_degree 1 > [7]PETSC ERROR: -snes_max_it 15 > [7]PETSC ERROR: -snes_rtol 1.e-6 > [7]PETSC ERROR: -snes_stol 1.e-6 > [7]PETSC ERROR: -ts_adapt_scale_solve_failed 0.5 > [7]PETSC ERROR: -ts_adapt_

Re: [petsc-users] CUDA running out of memory in PtAP

2021-07-07 Thread Stefano Zampini
This will select the CPU path -matmatmult_backend_cpu -matptap_backend_cpu > On Jul 7, 2021, at 2:43 AM, Mark Adams wrote: > > Can I turn off using cuSprarse for RAP? > > On Tue, Jul 6, 2021 at 6:25 PM Barry Smith > wrote: > > Stefano has mentioned this before. He

Re: [petsc-users] PETSc with Julia Binary Builder

2021-07-02 Thread Stefano Zampini
Patrick Should this be fixed in PETSc build system? https://github.com/JuliaPackaging/Yggdrasil/blob/master/P/PETSc/bundled/patches/petsc_name_mangle.patch > On Jul 2, 2021, at 9:05 AM, Patrick Sanan wrote: > > As you mention in [4], the proximate cause of the configure failure is this >

Re: [petsc-users] reproducibility

2021-06-14 Thread Stefano Zampini
Mark I presume in your first message you report the SHA1 as listed by log_view. That string is populated at configure time, not at runtime.

Re: [petsc-users] SLEPc: non-real singular vectors from SVD of real matrix

2021-06-02 Thread Stefano Zampini
Peder We have a fix for the hdf5 complex reader here if you want to give it a try https://gitlab.com/petsc/petsc/-/merge_requests/4044 Sorry it took so long and thank you for reporting the bug > On Apr 29, 2021, at 2:55 PM, Peder Jørgensgaard Olesen via petsc-users > wrote: > > Thank you

Re: [petsc-users] [petsc-maint] Performing a coordinate system rotation for the stiffness matrix

2021-05-31 Thread Stefano Zampini
Mike as long as P is a sparse matrix with compatible rows and cols (i.e. rows(P)= cols(A) = rows (A)) , MatPtAP will compute the result. Il giorno lun 31 mag 2021 alle ore 16:52 Mark Adams ha scritto: > > > On Mon, May 31, 2021 at 9:20 AM Michael Wick > wrote: > >> Hi PETSc team: >> >> I am

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
^~ > CC arch-summit-opt-gnu-cuda/obj/vec/vec/impls/seq/dvec2.o > > On Fri, May 28, 2021 at 1:50 PM Stefano Zampini <mailto:stefano.zamp...@gmail.com>> wrote: > OpenMPI.py depends on cuda.py in that, if cuda is present, confi

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
:mfad...@lbl.gov>> wrote: >> >> OK, I will try to rebase and test Barry's branch. >> >> On Fri, May 28, 2021 at 1:26 PM Stefano Zampini > <mailto:stefano.zamp...@gmail.com>> wrote: >> Yes, it is the branch I was using before force pushing to Barry’s >>

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
Or probably remove —download-openmpi ? Or, just for the moment, why can’t we just tell configure that mpi is a weak dependence of cuda.py, so that it will be forced to be configured later? > On May 28, 2021, at 8:12 PM, Stefano Zampini > wrote: > > That branch pr

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
e has had the time to clean things up. > > Barry > > >> On May 28, 2021, at 11:13 AM, Mark Adams > <mailto:mfad...@lbl.gov>> wrote: >> >> >> >> On Fri, May 28, 2021 at 11:57 AM Stefano Zampini > <mailto:stefano.zamp...@gmail.com>> wrote:

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
That test is not run in the testsuite Il Ven 28 Mag 2021, 19:13 Mark Adams ha scritto: > > > On Fri, May 28, 2021 at 11:57 AM Stefano Zampini < > stefano.zamp...@gmail.com> wrote: > >> If you are referring to your device set values, I guess it

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Stefano Zampini
If you are referring to your device set values, I guess it is not currently tested See the discussions here https://gitlab.com/petsc/petsc/-/merge_requests/3411 I started cleaning up the code to prepare for testing but we never finished it

Re: [petsc-users] reproducibility

2021-05-28 Thread Stefano Zampini
Mark That line is obtained via git describe --match "v*" At configure time. The number after the g indicates the commit As Matt says, you can do git checkout to go back at the point were you configured PETSc > On May 28, 2021, at 4:33 PM, Matthew Knepley wrote: > > 1397235

Re: [petsc-users] adding calls before and after each iteration of snes

2021-05-25 Thread Stefano Zampini
I use https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetUpdate.html and https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESLineSearchSetPostCheck.html > On May

Re: [petsc-users] MatChop

2021-05-21 Thread Stefano Zampini
> On 21 May 2021, at 8:10 PM, Lawrence Mitchell wrote: > > > >> On 21 May 2021, at 17:53, Stefano Zampini wrote: >> >>> I see, anyway you do not need the check if the loop range [rStart,rEnd). So >>> now I don’t understand why the

Re: [petsc-users] MatChop

2021-05-21 Thread Stefano Zampini
> On 21 May 2021, at 7:49 PM, Matthew Knepley wrote: > > On Fri, May 21, 2021 at 12:33 PM Stefano Zampini <mailto:stefano.zamp...@gmail.com>> wrote: > > >> On 21 May 2021, at 7:17 PM, Pierre Jolivet > <mailto:pie...@joliv.et>> wrote: >>

Re: [petsc-users] MatChop

2021-05-21 Thread Stefano Zampini
> On 21 May 2021, at 7:17 PM, Pierre Jolivet wrote: > > > >> On 21 May 2021, at 6:03 PM, Stefano Zampini > <mailto:stefano.zamp...@gmail.com>> wrote: >> >> Emmanuel >> >> thanks for reporting this. >> I believe we have a r

Re: [petsc-users] MatChop

2021-05-21 Thread Stefano Zampini
Emmanuel thanks for reporting this. I believe we have a regression in MatChop from https://gitlab.com/petsc/petsc/-/commit/038df967165af8ac6c3de46a36f650566a7db07c (cc'ing Pierre) We call MatAssemblyBegin/End within the row loop. Also. I don't understand why we need to check for r < rend herre

Re: [petsc-users] Parallel TS for ODE

2021-05-04 Thread Stefano Zampini
Table entries > > I would be very happy to receive any advices to fix the code. > Best, > Francesco > > Il giorno 20 apr 2021, alle ore 21:35, Matthew Knepley > ha scritto: > > On Tue, Apr 20, 2021 at 1:17 PM Francesco Brarda < > brardafrance...@gmail.com> wrote:

Re: [petsc-users] Parallel TS for ODE

2021-04-29 Thread Stefano Zampini
uted > Array with 3 dofs and run the job with multiple procs regardless of > how many equations I have? Is it possible? > > If you plan in the end to use a structured grid, this is a great plan. If > not, this is not a good plan. > > Thanks, > > Matt > > Thank yo

Re: [petsc-users] Rather different matrix product results on multiple processes

2021-04-21 Thread Stefano Zampini
Here you have, https://gitlab.com/petsc/petsc/-/merge_requests/3903. We can discuss the issue on gitlab. Thanks Stefano Il giorno mer 21 apr 2021 alle ore 13:39 Stefano Zampini < stefano.zamp...@gmail.com> ha scritto: > Peder > > I have slightly modified your code and I

Re: [petsc-users] Rather different matrix product results on multiple processes

2021-04-21 Thread Stefano Zampini
Peder I have slightly modified your code and I confirm the bug. The bug is not with the MatMatTranspose operation; it is within the HDF5 reader. I will soon open an MR with the code and discussing the issues. Thanks for reporting the issue Stefano Il giorno mer 21 apr 2021 alle ore 12:22 Peder

Re: [petsc-users] Parallel TS for ODE

2021-04-20 Thread Stefano Zampini
r. > Do you think it is better to put the 3 equations into a 1d Distributed Array > with 3 dofs and run the job with multiple procs regardless of how many > equations I have? Is it possible? > > Thank you, > Francesco > >> Il giorno 20 apr 2021, alle ore 17:57,

Re: [petsc-users] Parallel TS for ODE

2021-04-20 Thread Stefano Zampini
It does not make sense to parallelize to 1 equation per process, unless that single equation per process is super super super costly. Is this work you are doing used to understand PETSc parallelization strategy? if so, there are multiple examples in the sourcetree that you can look at to populate

Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application

2021-04-09 Thread Stefano Zampini
==841883== Invalid write of size 4 ==841883==at 0x503E784: petscintview_ (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109) ==841883==by 0x40262C: all_stab_routines_mp_write_rows_to_petsc_matrix_

Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application

2021-04-09 Thread Stefano Zampini
This way you are running mpiexec.hydra under valgrind. You want to run instead mpiexec.hydra -n 1 valgrind --track-origins=yes --leak-check=full --fullpath-after= ./trashy.exe > On Apr 9, 2021, at 12:11 PM, dazza simplythebest wrote: > > valgrind --track-origins=yes --leak-check=full

Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application

2021-04-09 Thread Stefano Zampini
As the error message says, use valgrind https://www.valgrind.org/ to catch these kind of issues > On Apr 9, 2021, at 10:43 AM, dazza simplythebest wrote: > > Dear All, > I am getting a puzzling 'Segmentation Violation' error when I > try to > write

Re: [petsc-users] Parallel TS for ODE

2021-03-31 Thread Stefano Zampini
Are you trying to parallelize a 3 equations system? Or you just use your SIR code to experiment with TS? > On Mar 31, 2021, at 5:18 PM, Matthew Knepley wrote: > > On Wed, Mar 31, 2021 at 10:15 AM Francesco Brarda > wrote: > Thank you for your advices. > I

Re: [petsc-users] funny link error

2021-03-21 Thread Stefano Zampini
This looks like a CMAKE issue. Good luck Il giorno dom 21 mar 2021 alle ore 15:26 Mark Adams ha scritto: > We are having problems with linking and use static linking. > We get this error and have seen others like it (eg, lpetsc_lib_gcc_s) > > /usr/bin/ld: cannot find

Re: [petsc-users] DMPlex in Firedrake: scaling of mesh distribution

2021-03-07 Thread Stefano Zampini
> I want understand why calling CreateEmbeddedRootSF() would be an abuse. > It was just sarcasm to emphasize the number of new SFs created. Being a very general code, DMPlex does the right thing and uses the proper calls. > On Mar 7, 2021, at 10:01 PM, Barry Smith wrote: >> >> >>Mark, >>

Re: [petsc-users] DMPlex in Firedrake: scaling of mesh distribution

2021-03-07 Thread Stefano Zampini
Mark Being an MPI issue, you should run with -log_sync From your log the problem seems with SFSetup that is called many times (62), with timings associated mostly to the SF revealing ranks phase. DMPlex abuses of the embedded SF, that can be optimized further I presume. It should run

Re: [petsc-users] DMPlex in Firedrake: scaling of mesh distribution

2021-03-07 Thread Stefano Zampini
128^3 is the entire mesh. The blue line (1 phase) is with dmplexdistribute, the red line, with a two-stage approach. Il Dom 7 Mar 2021, 16:20 Mark Adams ha scritto: > Is phase 1 the old method and 2 the new? > Is this 128^3 mesh per process? > > On Sun, Mar 7, 2021 at 7:27 AM Ste

  1   2   3   >