Re: [petsc-users] Make stream

2020-06-12 Thread Jed Brown
Jed Brown writes: > Fande Kong writes: > >>> There's a lot more to AMG setup than memory bandwidth (architecture >>> matters a lot, even between different generation CPUs). >> >> >> Could you elaborate a bit more on this? From my understanding, one b

Re: [petsc-users] Parallel writing in HDF5-1.12.0 when some processors have no data to write

2020-06-12 Thread Jed Brown
Danyang Su writes: > Hi Jed, > > Thanks for your double check. > > The HDF 1.10.6 version also works. But versions from 1.12.x stop working. I'd suggest making a reduced test case in order to submit a bug report. This was the relevant change in PETSc for hdf5-1.12.

Re: [petsc-users] Parallel writing in HDF5-1.12.0 when some processors have no data to write

2020-06-11 Thread Jed Brown
Danyang Su writes: > Hi Barry, > > The HDF5 calls fail. I reconfigure PETSc with HDF 1.10.5 version and it works > fine on different platforms. So, it is more likely there is a bug in the > latest HDF version. I would double-check that you have not subtly violated a collective requirement in

Re: [petsc-users] TAO STCG initial perturbation

2020-06-11 Thread Jed Brown
"Dener, Alp via petsc-users" writes: > About Levenberg-Marquardt: a user started the branch to eventually contribute > an LM solver, but I have not heard any updates on it since end of April. For > least-squares type problems, you can try using the regularized Gauss-Newton > solver (-tao_type

Re: [petsc-users] L infinity norm convergence tests

2020-06-11 Thread Jed Brown
Matthew Knepley writes: > On Wed, Jun 10, 2020 at 9:02 AM Mark Lohry wrote: > >> Hi all, is there a built-in way to use L-infinity norms for the SNES and >> KSP convergence tests, or do I need to write a manual KSPSetConvergenceTest >> function? >> > > You need to write a custom test. Note

Re: [petsc-users] Make stream

2020-06-09 Thread Jed Brown
Fande Kong writes: > Thanks so much, Barry, > > On Tue, Jun 9, 2020 at 3:08 PM Barry Smith wrote: > >> >>You might look at the notes about MPI binding. It might give you a bit >> better performance. >> https://www.mcs.anl.gov/petsc/documentation/faq.html#computers >> > > I am using

Re: [petsc-users] Make stream

2020-06-09 Thread Jed Brown
much better than POWER9 at MatPtAP despite POWER9 having similar bandwidth as EPYC and thus being significantly faster than Skylake for MatMult/smoothing. Jed Brown writes: > I'm attaching a log from my machine (Noether), which is 2-socket EPYC > 7452 (32 cores each). Each socket

Re: [petsc-users] Make stream

2020-06-09 Thread Jed Brown
Fande Kong writes: > Hi All, > > I am trying to interpret the results from "make stream" on two compute > nodes, where each node has 48 cores. > > If my calculations are memory bandwidth limited, such as AMG, MatVec, > GMRES, etc.. There's a lot more to AMG setup than memory bandwidth

Re: [petsc-users] Regarding DM Labels

2020-06-08 Thread Jed Brown
e in the >> repo? >> >> Regards, >> >> Mukkund >> >>> On 8 Jun 2020, at 22:02, Jed Brown wrote: >>> >>> MUKKUND SUNJII writes: >>> >>>> Greetings, >>>> >>>> I am working on modify

Re: [petsc-users] Regarding DM Labels

2020-06-08 Thread Jed Brown
MUKKUND SUNJII writes: > Greetings, > > I am working on modifying the shallow water model in ex11 for the purpose of > my thesis. > > I wish to run a specific dam break scenario using this model. In the > scenario, the velocity fields of certain cells must be constrained. That is I > want

[petsc-users] Two positions (RSE and Postdoc) at CU Boulder: Extreme-scale simulation of composite inelastic media

2020-06-07 Thread Jed Brown
We have two openings with similar descriptions. For the Research Software Engineer (funded for 5-years, renewable): CU Boulder's PSAAP Multidisciplinary Simulation Center has an opening for a *Research Software Engineer* to co-lead development of robust, extensible open source software for

Re: [petsc-users] Agglomeration for Multigrid on Unstructured Meshes

2020-06-01 Thread Jed Brown
I assume you're talking about repartitioning of coarse grids in geometric multigrid -- that hasn't been implemented. https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCTELESCOPE.html But you can use an algebraic multigrid that does similar communicator reduction, and can be

Re: [petsc-users] matsetvaluesblocked4_

2020-05-28 Thread Jed Brown
Mark Adams writes: >> >> >> > >> > *if (rp[low] == col) high = low+1;else * if (rp[t] > col) high = t; >> > else low = t; >> >> Replacing a single comparison per bsearch iteration with two doesn't >> seem like a good choice to me. >> >> > It forces the bisection search and the

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
Mark Adams writes: > The existing code seems to have *a line (low=i+1) *that seems to be > trying to exploit consecutive indices but it is not quite right, I don't > think, > > This is the existing code fragment (this code has been cloned many times > and there are several instances of this

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
Mark Adams writes: >> >> >> Note that some DMPlex stuff might run faster if you just make one field >> with num_species components instead of num_species fields with one >> component each. It'll also make the block structure more exploitable. >> > > Humm, I assumed fields should be vectors

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
Mark Adams writes: >> >> >>> I think I may know what your problem is. Plex evaluates the blocksize by >> looking for an equal number of dofs >> on each point. This is sufficient, but not necessary. If you are using >> higher order methods, there is block structure >> there that I will not see.

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
Mark Adams writes: > Nvidias's NSight with 2D Q3 and bs=10. (attached). Thanks; this is basically the same as a CPU -- the cost is searching the sorted rows for the next entry. I've long thought we should optimize the implementations to fast-path when the next column index in the sparse matrix

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
Matthew Knepley writes: > On Wed, May 27, 2020 at 7:09 PM Mark Adams wrote: > >> >> Matt: Could I use BAIJ with Plex? >>> >>> Plex does this automatically if you have blocks. >>> >> >> I use DMCreateMatrix with forest or plex and I seem to get AIJ matrices. >> Where does Plex get

Re: [petsc-users] matsetvaluesblocked4_

2020-05-27 Thread Jed Brown
What did you profile to determine that expanding indices is significant? matsetvaluesblocked4_ was made specially for PETSc-FUN3D with BAIJ matrices. I take it you can't use BAIJ because you use GAMG? Mark Adams writes: > Is there a Mat AIJSeq method For MatSetValuesBlocked, > like

Re: [petsc-users] Correct Usage of MatDiagonalSet

2020-05-25 Thread Jed Brown
Edoardo alinovi writes: > Dear Guys, > > I have quick question for you. Can anyone tell me if MatDiagonalSet needs > also MatAssemblyBegin/MatAssemblyEnd to be called afterwards or not? It's called internally so you don't have to call again. > Basically, I am trying to compute: sum

Re: [petsc-users] make check vs make test

2020-05-20 Thread Jed Brown
`make check` has been a synonym for `make test` for several releases, and we used `make -f gmakefile test` for the comprehensive suite. We recently made it so that if you have a sufficiently recent GNU Make, you can `make test` without the `-f gmakefile` verbosity. If you want the simple test,

Re: [petsc-users] Sanitize Options Passed "Through" Petsc

2020-05-19 Thread Jed Brown
Namespace the PETSc options or use something other than the command line (e.g., PETSC_OPTIONS env variable or a file). There is no way to know in advance all the options that could be requested through the PETSc options system. If the other app has a well-defined list of allowed options, you

Re: [petsc-users] Alternate mesh partitioners to METIS/ParMETIS

2020-05-06 Thread Jed Brown
METIS is (since 5.0.3) Apache 2.0, and thus should be usable by anyone. The most direct substitute for ParMETIS is PTScotch, which is CeCILL-C (compatible with LGPL). "Hammond, Glenn E via petsc-users" writes: > PETSc Users, > > We have many PFLOTRAN users outside the US who cannot use

Re: [petsc-users] Performance of SLEPc's Krylov-Schur solver

2020-05-01 Thread Jed Brown
"Jose E. Roman" writes: > Comments related to PETSc: > > - If you look at the "Reduct" column you will see that MatMult() is doing a > lot of global reductions, which is bad for scaling. This is due to MATNEST > (other Mat types do not do that). I don't know the details of MATNEST, maybe >

Re: [petsc-users] makefile changes since release 12

2020-04-24 Thread Jed Brown
Satish Balay writes: >> Crossing over to dev discussion, I wish we could make these names more >> standard, like the following predefined ones (see `make -p`). >> >> COMPILE.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c >> %.o: %.F >> # recipe to execute (built-in): >> $(COMPILE.F)

Re: [petsc-users] makefile changes since release 12

2020-04-24 Thread Jed Brown
I'd say yes, that's the right thing. These are vestigial remnants of the legacy make system. I believe PETSc doesn't use this anywhere internally, and thus can be removed. I don't know if the following patch would break any existing correct usage. diff --git i/lib/petsc/conf/variables

Re: [petsc-users] Ignoring PETSC_ARCH for make check?

2020-04-18 Thread Jed Brown
It's intentional and been like this for ages. Prefix installs have only PETSC_DIR (just a path, like other packages), and *must not* set PETSC_ARCH. san.tempo...@gmail.com writes: > Hi all, > > I have just successfully compiled 3.13.0. But with install this is what I > get > > $ make

Re: [petsc-users] Converting complex PDE to real for KNL performance ?

2020-04-14 Thread Jed Brown
We'd have complex values in vectors that contain the likes of gradients with respect to (real-valued) parameters so there would likely need to be lots of PetscRealPart() within TAO. It won't just compile if we turn on complex, but these changes should be feasible and is surely a better solution

Re: [petsc-users] J^T J p calculation

2020-04-09 Thread Jed Brown
"Park, Heeho via petsc-users" writes: > Hi PETSc developers, > > > I am trying to formulate > > > p^T J^T J p > > > where p is a solution vector length n, J is Jacobian n-by-n matrix. > > > Ref: https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm under > Large-scale optimization > > >

Re: [petsc-users] Construct Matrix based on row and column values

2020-04-08 Thread Jed Brown
onstruct alpha which I made with > a VecScatterToAll. However I guess this will slow down my overall > program quite significant. Any Ideas? > > Best regards > > Elias > > On 23/03/2020 15:53, Jed Brown wrote: >> Thanks; please don't drop the list. >> >>

Re: [petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Jed Brown
Mark Adams writes: > On Mon, Apr 6, 2020 at 3:47 PM Jed Brown wrote: > >> This typically happens when your model is discontinuous or you activate >> some fast transitien. You have a really aggressive lower bound on your >> time step so its hard to tell here. >&g

Re: [petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Jed Brown
This typically happens when your model is discontinuous or you activate some fast transitien. You have a really aggressive lower bound on your time step so its hard to tell here. Mark Adams writes: > I have a problem that is fairly smooth and when it decreases the time step > it just keeps

Re: [petsc-users] How to set an initial guess for TS

2020-04-03 Thread Jed Brown
me step but > from the previous Picard iteration. Use \bar{U}_{n}) instead of U_{n-1} as > the initial guess for SNES will have a better convergence for me. > > Thanks, > > Fande, > > > On Fri, Apr 3, 2020 at 1:10 PM Jed Brown wrote: > >> This sounds like you're ta

Re: [petsc-users] false negatives ontests

2020-04-03 Thread Jed Brown
Testing basically ignores numeric values (too many false positives), but when a test fails, it shows the whole diff. Mark Adams writes: > I run this test and it passes. But I know it's wrong so I* change a 6 to a > 7 in output/ex11_0.out *and I get this diff AND all the rest. > Any idea what

Re: [petsc-users] How to set an initial guess for TS

2020-04-03 Thread Jed Brown
This sounds like you're talking about a starting procedure for a DAE (or near-singular ODE)? Fande Kong writes: > Hi All, > > TSSetSolution will set an initial condition for the current TSSolve(). What > should I do if I want to set an initial guess for the current solution that > is different

Re: [petsc-users] Speed of KSPSolve using Matshell vs. regular matrix

2020-03-28 Thread Jed Brown
If the number of iterations is (significantly) different, then you'd have to debug why your code doesn't implement the same linear operator. You can use MatComputeOperator or -ksp_view_mat_explicit to help reveal differences. If the number of iterations is the same but your code is slower, then

Re: [petsc-users] About the interpolation and restriction matrix for cell-centered multigrid.

2020-03-24 Thread Jed Brown
Xiaodong Liu writes: > Thanks, Mark and Jed. It is very helpful. > So, for present, Petsc doesn't support Q1 interperpolation for > cell-centered multigrid, right? DMDA does not, though you can create your own interpolation matrix, and patches are certainly welcome.

Re: [petsc-users] About the interpolation and restriction matrix for cell-centered multigrid.

2020-03-24 Thread Jed Brown
Mark Adams writes: > Good question. It does look like there is Q1: > > src/dm/impls/da/da.c:- ctype - DMDA_Q1 and DMDA_Q0 are currently the only > supported forms > > And in looking at a cell centered > example src/snes/examples/tutorials/ex20.c, it looks like only DMDA_Q1 > works. I get an

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Jed Brown
> Yes the Matrix A comes from assembling a FEM-convection-diffusion > operator over a tetrahedral mesh. So my matrix graph should be > symmetric. Thanks for the snippet > > On 23/03/2020 15:42, Jed Brown wrote: >> Elias Karabelas writes: >> >>> Dear Users, >>

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Jed Brown
Elias Karabelas writes: > Dear Users, > > I want to implement a FCT (flux corrected transport) scheme with PETSc. > To this end I have amongst other things create a Matrix whose entries > are given by > > L_ij = -max(0, A_ij, A_ji) for i neq j > > L_ii = Sum_{j=0,..n, j neq i} L_ij > > where

Re: [petsc-users] vertices on the boundary of a DMPLEX mesh

2020-03-21 Thread Jed Brown
Swarnava Ghosh writes: > Dear PETSc team, > > I had the following question related to DMPLEX. > I have a dmplex mesh created through DMPlexCreateFromCellList. I want to > find out all the vertices that are on the mesh boundary. What is the best > way to do this? DMLabelCreate(PETSC_COMM_SELF,

Re: [petsc-users] HDF5 errors

2020-03-20 Thread Jed Brown
HDF5-1.12 changed some interfaces. This works in 'master' and we have a release coming this week. Is that okay for you or do you need the fixes backported? Boyce Griffith writes: > Homebrew just updated my hdf5, and now I am getting some errors from the HDF5 > viewer in maint: > >

Re: [petsc-users] Rebuilding libmesh

2020-03-18 Thread Jed Brown
ything you need: compiler, mpi, > and petsc. > > You could home-brew uninstall your mpi, and retry. > > Thanks, > > Fande, > > On Wed, Mar 18, 2020 at 5:57 PM Jed Brown wrote: > >> Alexander Lindsay writes: >> >> > Does anyone have

Re: [petsc-users] Rebuilding libmesh

2020-03-18 Thread Jed Brown
Alexander Lindsay writes: > Does anyone have a suggestion for this compilation error from petscconf.h? > Sorry this is with a somewhat old PETSc version: > > configure:34535: checking whether we can compile a trivial PETSc program > configure:34564: mpicxx -c -std=gnu++11 What do you get with

Re: [petsc-users] GAMG parameters for ideal coarsening ratio

2020-03-16 Thread Jed Brown
Sajid Ali writes: > Hi PETSc-developers, > > As per the manual, the ideal gamg parameters are those which result in > MatPtAP time being roughly similar to (or just slightly larger) than KSP > solve times. The way to adjust this is by changing the threshold for > coarsening and/or squaring the

Re: [petsc-users] Using DMDA with regular matrices

2020-03-16 Thread Jed Brown
Yuyun Yang writes: > Hello team, > > Hope you're staying healthy amid the coronavirus craziness. > > Just want to ask a basic question: if my grid is managed by DMDA, then > do matrices in all my intermediate steps have to be compatible with > DMDA and formed in a special way, or can I just form

Re: [petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Jed Brown
Please check out these resources. https://cmake.org/cmake/help/latest/module/FindPkgConfig.html https://gitlab.com/petsc/petsc/-/merge_requests/2367 Yann Jobic writes: > Hi all, > > I solved my problem, but i don't know if it's the right way to do it. > Libs.private is used in case of static

Re: [petsc-users] Product of nonsymmetric matrices is symmetric

2020-03-05 Thread Jed Brown
The place for this to go would be MatPtAP() for matrix D of SBAIJ matrix type (thus producing A of type SBAIJ), but we don't have an implementation of that. You can do the product with an AIJ matrix and then MatConvert to SBAIJ. f...@rzg.mpg.de writes: > Dear PETSc team, > I have a linear

Re: [petsc-users] -ts_adapt_clip .5,1.25

2020-03-04 Thread Jed Brown
Mark Adams writes: > On Wed, Mar 4, 2020 at 4:03 PM Jed Brown wrote: > >> See -ts_adapt_scale_solve_failed. ' > > > That's it. No C interface for this so no doc. Sorry, too much boilerplate makes us sloppy. It'd be great if you could add an interface.

Re: [petsc-users] -ts_adapt_clip .5,1.25

2020-03-04 Thread Jed Brown
See -ts_adapt_scale_solve_failed. The clip provides bounds on step shortening as a result of the error indicator, but a solve failing can be more severe. The default clip allows more aggressive shortening, but I don't think we want clip to be a lower bound on solver-failure shortening. And if

Re: [petsc-users] Inquiry about the preconditioner setup of KSP.

2020-03-03 Thread Jed Brown
src/ksp/ksp/impls/gmres/gmres.c: ksp->ops->solve= KSPSolve_GMRES; > > Xiaodong Liu, PhD > X: Computational Physics Division > Los Alamos National Laboratory > P.O. Box 1663, > Los Alamos, NM 87544 > 505-709-0534 > > > On Tue,

Re: [petsc-users] Inquiry about the preconditioner setup of KSP.

2020-03-03 Thread Jed Brown
Is it possible that Julia is transferring the matrix to PETSc as a dense matrix (storing the nonzeros) instead of preserving sparsity? If you store the zeros, then ILU will be allowed to fill those entries, thereby becoming LU. Xiaodong Liu writes: > I am trying to use Julia to call Petsc. >

Re: [petsc-users] Scraping MPI information from PETSc conf

2020-03-01 Thread Jed Brown
ay. Our >> prior check was deemed too strict - for ex: when linux distros updated >> MPI packages with a bug fixed version [without API change] - our prior >> check flagged this as incompatible - so we had to change it. >> >> Satish >> >>> On Thu, 27 Feb 2020

Re: [petsc-users] Correct use of VecGetArray with std::vector

2020-02-28 Thread Jed Brown
Matthew Knepley writes: > On Fri, Feb 28, 2020 at 2:12 PM Zane Charles Jakobs < > zane.jak...@colorado.edu> wrote: > >> Hi PETSc devs, >> >> I'm writing some C++ code that calls PETSc, and I'd like to be able to >> place the result of VecGetArray into an std::vector and then later call >>

Re: [petsc-users] Scraping MPI information from PETSc conf

2020-02-27 Thread Jed Brown
If determining mpicc is sufficient, this will work pkg-config --var=ccompiler PETSc We also define $ grep NUMVERSION mpich-optg/include/petscconf.h #define PETSC_HAVE_MPICH_NUMVERSION 30302300 or $ grep OMPI_ ompi-optg/include/petscconf.h #define PETSC_HAVE_OMPI_MAJOR_VERSION 4 #define

Re: [petsc-users] Guidance on using Tao for unconstrained minimization

2020-02-26 Thread Jed Brown
Could you share output for your current configuration with -tao_monitor -tao_ls_monitor -tao_view? "Ellen M. Price" writes: > Hello PETSc users! > > I am using Tao for an unconstrained minimization problem. I have found > that CG works better than the other types for this application. After >

Re: [petsc-users] DMDAVecGetArrayDOF for read-only vectors

2020-02-25 Thread Jed Brown
Claudio Tomasi writes: > Dear all, > I would like to ask whether there's an analogous of the routine > DMDAVecGetArrayDOF for read-only vectors. https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMDA/DMDAVecGetArrayDOFRead.html I see it's missing links to/from related pages, so

Re: [petsc-users] Behavior of PetscViewerVTKOpen

2020-02-24 Thread Jed Brown
Emmanuel Ayala writes: > Hi everyone, > > I think VTK is not the best option to save files, but I just want a quick > way to visualize a structured grid generated with DMDACreate3d. I visualize > the vts file with ParaView. > > The situation is, If I change the number global dimension in each

Re: [petsc-users] static libs

2020-02-20 Thread Jed Brown
Victor Eijkhout writes: > On , 2020Feb20, at 15:26, Junchao Zhang via petsc-users > mailto:petsc-users@mcs.anl.gov>> wrote: > > The main disadvantage of dynamic shared libraries is the runtime performance > costs of dynamic linking. Every time the program is executed it has to > perform a

Re: [petsc-users] static libs

2020-02-20 Thread Jed Brown
Yeah, this startup is typically not bad for normal compiled programs, but can be substantial if you have many libraries or are using a language like Python, which may search hundreds or thousands of paths. In any case, it's mainly a filesystem metadata scalability stress, and one reason some

Re: [petsc-users] Efficiently move matrix from single processor to multiple

2020-02-18 Thread Jed Brown
Hector E Barrios Molano writes: > Dear PETSc Experts! > > Do you know if there is an efficient way to move a matrix from a single > processor (MatCreateSeqBAIJ) to a matrix contained in all processors? How did you create the original SeqBAIJ? Could you just call MatSetValues on a parallel

Re: [petsc-users] Matrix-free method in PETSc

2020-02-15 Thread Jed Brown
Take most any example, say in src/ts/examples/tutorials/, and run with -ts_type beuler -snes_mf The -snes_mf says to run the nonlinear solver (Newton by default) with an unpreconditioned Krylov method for which the action of the Jacobian is given by matrix-free finite differencing of the

Re: [petsc-users] TSMonitorSolutionVTK

2020-02-13 Thread Jed Brown
still has the problem but for the 3.12 the problem is > solved. > Thanks, > Sepideh > ________ > From: Jed Brown > Sent: Thursday, February 13, 2020 4:06 PM > To: Sepideh Kavousi ; petsc-users@mcs.anl.gov > > Subject: Re: [petsc-users] TSMonitorSol

Re: [petsc-users] TSMonitorSolutionVTK

2020-02-13 Thread Jed Brown
Sepideh Kavousi writes: > Dear Petsc users, > I am trying to write VTK output file every few steps. When I was using the > petsc 3.7 I used the following lines: > if (user->ts_write % 500 ==0) { > ierr= >

Re: [petsc-users] Iterative solvers, MPI+GPU

2020-02-11 Thread Jed Brown
The short answer is yes, this works great, and your vectors never need to leave the GPU (except via send/receive buffers that can hit the network directly with GPU-aware MPI). If you have a shell preconditioner, you're all set. If you want to use PETSc preconditioners, we have some that run on

Re: [petsc-users] Implementing the Sherman Morisson formula (low rank update) in petsc4py and FEniCS?

2020-02-10 Thread Jed Brown
Olek Niewiarowski writes: > Barry, > Thank you for your help and detailed suggestions. I will try to implement > what you proposed and will follow-up with any questions. In the meantime, I > just want to make sure I understand the use of SNESSetPicard: > r - vector to store function

Re: [petsc-users] Condition Number and GMRES iteration

2020-02-07 Thread Jed Brown
Fande Kong writes: > Thanks, Matt, > > It is a great paper. According to the paper, here is my understanding: for > normal matrices, the eigenvalues of the matrix together with the > initial residual completely determine the GMRES convergence rate. For > non-normal matrices, eigenvalues are NOT

Re: [petsc-users] PETSc scaling for solving system of equations

2020-02-06 Thread Jed Brown
As a first step, please run with -log_view and send results. What is the size of your problem and what preconditioner are you using? Amin Sadeghi writes: > Hi, > > Recently, I've been playing around with petsc4py to solve a battery > simulation, which takes too long to solve using scipy

Re: [petsc-users] Product of matrix row times a vector

2020-01-30 Thread Jed Brown
"Smith, Barry F. via petsc-users" writes: > MatGetSubMatrix() and then do the product on the sub matrix then VecSum If you're only doing it once or the relevant rows are changing, it may be cheaper to multiply the whole matrix by a vector instead of creating a submatrix. If you have many of

Re: [petsc-users] Problem in using TS objects

2020-01-27 Thread Jed Brown
Yingjie Wu writes: > Hi Jed, > Thank you very much for your detailed answer. It helps me a lot. > I'm going to use the "chain rule" method to solve my problem first, and may > continue to try different ways later. > For your reply, I have the following questions: > 1. The method of

Re: [petsc-users] Problem in using TS objects

2020-01-27 Thread Jed Brown
Yingjie Wu writes: > Dear PETSc developers > Hi, > Recently, I am using PETSc to write a one-dimensional hydrodynamics solver. > At present, I use SNES object to complete the development of steady-state > (excluding time term) program, and the result is very good. I want to > continue with the

Re: [petsc-users] Internal product through a matrix norm

2020-01-22 Thread Jed Brown
Jeremy Theler writes: > Sorry for the basic question, but here it goes. > Say I have a vector u and a matrix K and I want to compute the scalar > > e = u^T K u > > (for example the strain energy if u are displacements a K is the > stiffness matrix). > > Is there anything better (both in

Re: [petsc-users] Choosing VecScatter Method in Matrix-Vector Product

2020-01-22 Thread Jed Brown
Stefano Zampini writes: >> On Jan 22, 2020, at 6:11 PM, Felix Huber >> wrote: >> >> Hello, >> >> I currently investigate why our code does not show the expected weak scaling >> behaviour in a CG solver. Therefore I wanted to try out different >> communication methods for the VecScatter in

Re: [petsc-users] Choosing VecScatter Method in Matrix-Vector Product

2020-01-22 Thread Jed Brown
Victor Eijkhout writes: > On , 2020Jan22, at 09:11, Felix Huber > mailto:st107...@stud.uni-stuttgart.de>> wrote: > > weak scaling behaviour in a CG solver > > Norms and inner products have Log(P) complexity, so you’ll never get perfect > weak scaling. Allreduce is nearly constant time with

Re: [petsc-users] Compiling lists all the libraries

2020-01-21 Thread Jed Brown
PETSc normally removes duplicates from its library link lines, but there are some contexts (with static linking) where it's hard to show that it's safe because some projects ship library sets with circular dependencies. This is generally harmless unless you have a specific need to avoid

Re: [petsc-users] error handling

2020-01-21 Thread Jed Brown
Jeremy Theler writes: > Dear Sam > > Probably you are already aware of the following paragraph, but just in > case. Quote from > https://www.gnu.org/prep/standards/standards.html#Memory-Usage > > > Memory analysis tools such as valgrind can be useful, but don’t > complicate a program merely to

Re: [petsc-users] TS (arkimex) question

2020-01-19 Thread Jed Brown
"Constantinescu, Emil M." writes: > On 1/19/20 11:38 AM, Mark Adams wrote: > Can you recommend a higher order method that I might try? > > > Mark, all of 2e, 3, 4, 5 are high order with really good properties. They > have error estimators that are cheaper but less reliable (most of the time >

Re: [petsc-users] TS (arkimex) question

2020-01-19 Thread Jed Brown
Use -ts_adapt_monitor to see the rationale. Note that 1bee is backward Euler with an extrapolation error estimator (for adaptive control). It's still only first order accurate, and the longer step may be part of your SNES issues. You can set a maximum time step (-ts_adapt_dt_max) or be more

Re: [petsc-users] DMPlex: Mapping cells before and after partitioning

2020-01-09 Thread Jed Brown
"'Bisht, Gautam' via tdycores-dev" writes: >> Do you need to rely on the element number, or would coordinates (of a >> centroid?) be sufficient for your purposes? > > I do need to rely on the element number. In my case, I have a mapping file > that remaps data from one grid onto another

Re: [petsc-users] set petsc matrix using input array

2020-01-09 Thread Jed Brown
Note that PETSc's formats are more space-efficient and faster than the COO (triplet) format. If you can produce triplet chunks instead of the full matrix, you can add them incrementally to reduce the peak memory usage. Note that many preconditioners use storage similar to (or greater than) a

Re: [petsc-users] CMake error in PETSc

2019-12-05 Thread Jed Brown
Yingjie Wu writes: > Hi, > > I installed the latest version of petsc, and compiled the example using > cmke as described above. Compilation can be done, but there is a new > problem while the program is running, as if the program could not find the > shared library libpetsc.so.3.12. How can I

Re: [petsc-users] CMake error in PETSc

2019-12-05 Thread Jed Brown
Yingjie Wu writes: > I'm so sorry that I've ignored your previous advices. > > I added a global variable that seems works: > > > export > LD_LIBRARY_PATH=/home/lerui/petcs-3.12.2/arch-linux2-c-debug/lib:$LD_LIBRARY_PATH > > > How should I make petsc in a standard position?This eliminates the

Re: [petsc-users] Updating TS solution outside PETSc

2019-12-05 Thread Jed Brown
"Smith, Barry F." writes: >Let's look at the 1d case with vertex centered differencing > > | | > u-1*u0 u1... > > > u-1* is the ghost value, u0 the edge value etc. > >Say you are solving

Re: [petsc-users] Updating TS solution outside PETSc

2019-12-05 Thread Jed Brown
"Ellen M. Price" writes: > I think I'm still unclear on exactly how this should work. Suppose, in > my RHS function for TS, I'm processing the grid to compute its time > derivative and get to an edge. What do I do? > > If I set the derivative there to zero, the value will never change, but > it

Re: [petsc-users] dof of DMDA & DMPlex

2019-12-05 Thread Jed Brown
I don't understand the question. There has never been a limit to the number of dofs per grid point. Was the email thread referring to spatial dimension? Yann Jobic writes: > Hello, > I read in the email archive (from 2016) that, at that time, the number > of synchronized dof (in MPI/ghost

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Jed Brown
Yingjie Wu writes: > Hi, > I tried to use PKG to find the library file of PETSc, but there were some > errors. Because I am not very familiar with cmake, I refer to different PKG > tutorials. My CMakeList.txt is as follows. I don't know how to solve this > error message, please give me some

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Jed Brown
BRARIES}) > > target_link_includes(testapp ${PETSC_INCLUDE_DIRS}) > > Since I just came into contact with cmake, I really need some help. > > > Thanks, > > Yingjie > > > Jed Brown 于2019年12月4日周三 下午11:31写道: > >> Yingjie Wu writes: >> >> > Dear

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Jed Brown
Yingjie Wu writes: > Dear Petsc developers > Hi, > Because I use some external library files, I want to compile the PETSc > program with CMake. I follow the library search program > https://github.com/CoolProp/CoolProp/blob/b493de51a44078e4f5bbb8712e89305fd91f8b85/CMakeLists.txt > recommended >

Re: [petsc-users] (no subject)

2019-12-01 Thread Jed Brown
Mark Adams writes: > FM matrices are slow and meant for debugging mostly (I thought, > although the docs just give this warning if coloring is not available). > > I would check the timings from -log_view and verify that the time is spent > in MatFDColoringApply. Running with -info should print

Re: [petsc-users] Including Implementations in my code

2019-11-14 Thread Jed Brown via petsc-users
Ritwik Saha via petsc-users writes: > Hi All, > > PETSc provides various implementations of functions like VecAXPY() in CUDA. > I am talking specifically about VecAXPY_SeqCUDA() in > src/vec/vec/impls/seq/seqcuda/veccuda2.cu . How to I include these > functions in my C code? I'm not sure I

Re: [petsc-users] quick question on MatXAIJSetPreallocation

2019-10-30 Thread Jed Brown via petsc-users
Xiangdong via petsc-users writes: > Hello everyone, > > It seems that to use MatXAIJSetPreallocation, one has to pass the array of > the number of nonzero blocks per row, even if this number is same across > all the local rows. > > For the other preallocation functions (say,

Re: [petsc-users] DMCompositeSetCoupling -- simple example?

2019-10-28 Thread Jed Brown via petsc-users
Its purpose is to preallocate off-diagonal blocks, but unless you're hard up against your memory capacity, I would skip that clumsy code and use MatPreallocator. "Ellen M. Price via petsc-users" writes: > Hello again! > > For my multiphysics problem, I think a DMComposite might make the most >

Re: [petsc-users] R: AMG Variable block preconditioner

2019-10-28 Thread Jed Brown via petsc-users
Smoothed aggregation mostly just cares about the near-null space (MatSetNearNullSpace), which is a global property. Classical AMG uses block size directly (number of dofs per C-point), but I'm not aware of any implementation that supports variable block size. This would be a research topic.

Re: [petsc-users] TS_SSP implementation for co-dependent variables

2019-10-23 Thread Jed Brown via petsc-users
technical notes on your present formulation? I think it just amounts to performing the integration and then evaluating the differential operator using results of that integral. > Thanks, > > On Wed, Oct 9, 2019 at 4:18 PM Jed Brown wrote: > >> Manuel Valera writes: >> >

Re: [petsc-users] Block preconditioning for 3d problem

2019-10-14 Thread Jed Brown via petsc-users
Dave Lee writes: > Thanks Jed, > > I will reconfigure my PETSc with MUMPS or SuperLU and see if that helps. > (my code is configured to only run in parallel on 6*n^2 processors (n^2 > procs on each face of a cubed sphere, which is a little annoying for > situations like these where a serial LU

Re: [petsc-users] Block preconditioning for 3d problem

2019-10-11 Thread Jed Brown via petsc-users
tried using the pressure multiplied by the mass > matrix as a preconditioner for the inner linear problem, but this didn't > help. Perhaps some sort of scaling is the way to go though. > > Cheers, Dave. > > On Fri, Oct 11, 2019 at 2:45 PM Jed Brown wrote: > >> Why a

Re: [petsc-users] Block preconditioning for 3d problem

2019-10-10 Thread Jed Brown via petsc-users
lves, if the true residual is of the same scale and *all* >> of the slabs converge well then you should be OK on scaling. If this works >> then start adding stuff back in and see what breaks it. >> >> On Thu, Oct 10, 2019 at 11:01 AM Jed Brown via petsc-users < >> petsc

Re: [petsc-users] Block preconditioning for 3d problem

2019-10-10 Thread Jed Brown via petsc-users
Dave Lee via petsc-users writes: > Hi PETSc, > > I have a nonlinear 3D problem for a set of uncoupled 2D slabs. (Which I > ultimately want to couple once this problem is solved). > > When I solve the inner linear problem for each of these 2D slabs > individually (using KSPGMRES) the convergence

Re: [petsc-users] TS_SSP implementation for co-dependent variables

2019-10-09 Thread Jed Brown via petsc-users
are not viable, it turns unstable quickly. > > On Wed, Oct 9, 2019 at 3:58 PM Jed Brown wrote: > >> Is it a problem with the spatial discretization or with the time >> discretization that you've been using thus far? (This sort of problem >> can occur for either reason.)

Re: [petsc-users] TS_SSP implementation for co-dependent variables

2019-10-09 Thread Jed Brown via petsc-users
velocity become unphysical in the zones of high slope of the > grid. This is very specific of our model and probably will be solved by > updating the equations transformation, but that's not nearly close to > happening right now. > > On Wed, Oct 9, 2019 at 3:47 PM Jed Brown wr

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