Re: [petsc-users] Strange behavior of TS after setting hand-coded Jacobian

2021-10-27 Thread Barry Smith
gt; caused by this 0 diagonal element. But I'm wondering why it works > with jacobian matrix generated by finite-difference? Would employing > DMDA for discretization be helpful? > > Regards > > Yu Cang > > Barry Smith 于2021年10月25日周一 下午10:50写道: >> >> &

Re: [petsc-users] Convergence on Axisymmetric Poisson matrix

2021-10-25 Thread Barry Smith
quired? Usually we just stick with the heuristic that GAMG comes up with. Maybe Mark has some better advice. Barry > > Lionel > > De: "Barry Smith" > À: "cheng" > Cc: "petsc-users" > Envoyé: Lundi 25 Octobre 2021 19:52:26 > Objet:

Re: [petsc-users] Convergence on Axisymmetric Poisson matrix

2021-10-25 Thread Barry Smith
in the default PETSc > configuration and not specifying anything. How should I choose the number of > multi grid level depending on my problem? How does GAMG evaluate the number > of grid levels required? > > Lionel > > De: "Barry Smith" > À: "cheng"

Re: [petsc-users] [petsc-maint] PETSc () -- MPI -- Versions Conflict on Mac 1

2021-10-25 Thread Barry Smith
Send the output from otool -L libdeal_II.g.9.3.0.dylib otool -L libslepc.3.15.dylib otool -L libpetsc.3.15.dylib You will need to find the directories of these libraries and include them in the otool command. > On Oct 25, 2021, at 10:00 AM, Ahmed Galal wrote: > >

Re: [petsc-users] Strange behavior of TS after setting hand-coded Jacobian

2021-10-25 Thread Barry Smith
It is definitely unexpected that -snes_test_jacobian verifies the Jacobian as matching but the solve process is completely different. Please run with -snes_monitor -snes_converged_reason -ksp_monitor_true_residual -ksp_converged_reason -snes_test_jacobian and send all the output

Re: [petsc-users] Convergence on Axisymmetric Poisson matrix

2021-10-25 Thread Barry Smith
Are you running with -ksp_monitor_true_residual to track the b - A*x residual instead of just the preconditioned residual? GAMG definitely does not symmetrize the system but it is possible the preconditioner results in the solve "not seeing" the unsymmetry during the solution process

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

2021-10-23 Thread Barry Smith
ttps://petsc.org/main/docs/manualpages/Sys/PetscObjectRegisterDestroy.html >> <https://petsc.org/main/docs/manualpages/Sys/PetscObjectRegisterDestroy.html> >> >> Best regards, >> >> Jacob Faibussowitsch >> (Jacob Fai - booss - oh - vitch) >> >>> On Oct 22, 2021,

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

2021-10-22 Thread Barry Smith
One technical reason is that PetscHeaderDestroy_Private() may call PetscCommDestroy() which may call MPI_Comm_free() which is defined by the standard to be collective. Though PETSc tries to limit its use of new MPI communicators (for example generally many objects shared the same

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-20 Thread Barry Smith
sts. > > If my emails made you think the other way, I apologize for that. > > Regards, > > Chang > > On 10/20/21 4:40 PM, Barry Smith wrote: >> Yes, but the branch can be used to do telescoping inside the bjacobi as >> needed. >>> On Oct 20, 2021, at

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-20 Thread Barry Smith
ctors): 1849788 >>>> INFOG(21) (size in MB of memory effectively used >>>> during factorization - value on the most memory consuming processor): 26 >>>> INFOG(22) (size in MB of memory effectively used &g

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-14 Thread Barry Smith
PM, Chang Liu wrote: > > Hi Barry, > > That is exactly what I was doing in the second example, in which the > preconditioner works but the GMRES does not. > > Chang > > On 10/14/21 5:15 PM, Barry Smith wrote: >> You need to use the PCTELESCOPE inside the

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-14 Thread Barry Smith
_threads because not only >>>> do the Mat needs to be redistributed, the secondary processes also need to >>>> be “converted” to OpenMP threads. >>>> Thus the need for specific code in mumps.c. >>>> Thanks, >>>> Pierre >>>>>

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-13 Thread Barry Smith
erstand it is ideal to do one MPI rank per GPU. However, I am >>working on an existing code that was developed based on MPI and the the >># of mpi ranks is typically equal to # of cpu cores. We don't want to >>change the whole structure of the code

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-13 Thread Barry Smith
e GPU and can use the GPU solver directly. If all the major computations of a subdomain can fit and be done on a single GPU then you would be utilizing all the GPUs you are using effectively. Barry > > Chang > > On 10/13/21 1:53 PM, Barry Smith wrote: >> Chang, >>

Re: [petsc-users] [External] Re: request to add an option similar to use_omp_threads for mumps to cusparse solver

2021-10-13 Thread Barry Smith
Chang, You are correct there is no MPI + GPU direct solvers that currently do the triangular solves with MPI + GPU parallelism that I am aware of. You are limited that individual triangular solves be done on a single GPU. I can only suggest making each subdomain as big as possible to

Re: [petsc-users] About hardware limitation/recommendation for PETSc (new user)

2021-10-13 Thread Barry Smith
This is a very complex question. But most PETSc simulations are memory bandwidth limited so to first order you want to purchase something that delivers the highest possible memory bandwidth for your price tag. For a pure CPU system it is the cumulative memory bandwidth you can utilize over

Re: [petsc-users] On QN + Fieldsplit

2021-10-12 Thread Barry Smith
SNESSetKSP() (and friends) was a mistake, it was originally introduced for symmetry reasons but doesn't seem to have a good reason to exist. Barry > On Oct 12, 2021, at 2:24 PM, Matthew Knepley wrote: > > On Tue, Oct 12, 2021 at 10:27 AM Nicolás Barnafi >

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

2021-10-12 Thread Barry Smith
ost memory would be reported right away, but now it isn't. > If I understand Barry's answer, this is because the memory block is large > ("1,636 bytes in 1 blocks") and valgrind gives up on this block tracing ? > Then out of curiosity, why is this block 8 bytes

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

2021-10-12 Thread Barry Smith
Do you have the valgrind output from 3.14 ? > 1,636 bytes in 1 blocks are still reachable in loss record 4 > > of 4 > > ==2036==at 0x4C2BE2D: memalign (vg_replace_malloc.c:858) > > ==2036==by 0x54AC0CB: PetscMallocAlign (mal.c:54) > > ==2036==by 0x54AFBA9: PetscTrMallocDefault

Re: [petsc-users] On QN + Fieldsplit

2021-10-12 Thread Barry Smith
So you removed ksp.setOperators(J_mat.mat()) and the problem went away? This could make sense, this is not an intended usage. I am not sure how cleanly we can provide an error checker for this inappropriate usage. Barry > On Oct 12, 2021, at 10:27 AM, Nicolás Barnafi wrote: > >

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

2021-10-12 Thread Barry Smith
I think that 4) is normal. PetscMalloc() is just a wrapper for malloc, PETSc does not free the space obtained with PetscMalloc() at PetscFinalize() so that memory is still available and usable after PetscFinalize() (Of course we do not recommend using it). PETSc has an option

Re: [petsc-users] TS initial guess

2021-10-11 Thread Barry Smith
For TSBEULER (the theta method) see https://petsc.org/release/docs/manualpages/TS/TSTHETA.html and look at the source code src/ts/impls/implicit/theta/teta.c for TSStep_Theta. You can use -snes_monitor_solution OPTIONS to see what

Re: [petsc-users] petsc4py - Spike in memory usage when loading a matrix in parallel

2021-10-07 Thread Barry Smith
massif option. However, I don't > know what to look for. I can send you the output file separately, if it helps. > > Best regards, > Michael > > On 07.10.21 16:09, Matthew Knepley wrote: >> On Thu, Oct 7, 2021 at 10:03 AM Barry Smith > <mailto:bsm...

Re: [petsc-users] petsc4py - Spike in memory usage when loading a matrix in parallel

2021-10-07 Thread Barry Smith
How many ranks are you using? Is it a sparse matrix with MPIAIJ? The intention is that for parallel runs the first rank reads in its own part of the matrix, then reads in the part of the next rank and sends it, then reads the part of the third rank and sends it etc. So there should not

Re: [petsc-users] Disconnected domains and Poisson equation

2021-10-06 Thread Barry Smith
> __ > Optimad Engineering Srl > Via Bligny 5, Torino, Italia. > +3901119719782 > www.optimad.it <http://www.optimad.it/> > > From: Barry Smith mailto:bsm...@petsc.dev>> > Sent: venerdì 1 ottobre 2021 16:56 > To: Marco Cisternino <mailto:m

Re: [petsc-users] (percent time in this phase)

2021-10-05 Thread Barry Smith
locks() is not logged so does not appear in the logging. > > Sometimes you may need to run in the debugger with break points on certain > functions to indicate if they are called and when > > Secondly how can I know, how many blocks are being setup? Is there a defaul

Re: [petsc-users] (percent time in this phase)

2021-10-05 Thread Barry Smith
me taken by the first KSPSolve (in the above call sequence)? > Yes. When calls are nested, we just do not record the time for the nested > call in log_view. > > > What is the unit of measurement in flamegrah? > I believe it is microseconds, but I am not sure. > > Thanks,

Re: [petsc-users] (percent time in this phase)

2021-10-05 Thread Barry Smith
gt; > Matt > > > Thanks, > Karthik. > > From: Matthew Knepley mailto:knep...@gmail.com>> > Date: Friday, 1 October 2021 at 14:51 > To: "Chockalingam, Karthikeyan (STFC,DL,HC)" > <mailto:karthikeyan.chockalin...@stfc.ac.uk>>

Re: [petsc-users] Skipping data when reading from binary file

2021-10-04 Thread Barry Smith
To minimize code changes you could add a PETSc viewer format that caused skipping reading in an object. Then each object load would need a skip-read method that mimicked the reading but actually just skipped over the parts of the data of the object (using the correct sizes). For vectors this

Re: [petsc-users] (percent time in this phase)

2021-10-01 Thread Barry Smith
64e+10 1.004 1.760e+10 3.521e+10 > MPI Messages: 3.430e+02 1.000 3.430e+02 6.860e+02 > MPI Message Lengths: 7.134e+08 1.000 2.080e+06 1.427e+09 > MPI Reductions: 4.637e+03 1.000 > > Best, > Karthik. > > From: Barry Smith mailto:

Re: [petsc-users] (percent time in this phase)

2021-10-01 Thread Barry Smith
hmarking of various preconditioners and > comparing their performance on cpus and gpus, so this information is critical. > > Many thanks! > Karthik. > > From: Barry Smith mailto:bsm...@petsc.dev>> > Date: Thursday, 30 September 2021 at 15:47 > To: "Chockalingam,

Re: [petsc-users] Disconnected domains and Poisson equation

2021-10-01 Thread Barry Smith
difference as a symptom of something wrong? Yes, if the differences in the two solutions are order 1.e-14 that is very good, one cannot expect them to be identical. > > Thank you for your support. > > Marco Cisternino > > From: Barry Smith mailto:bsm...@petsc.dev>> > Sent:

Re: [petsc-users] Convergence rate for spatially varying Helmholtz system

2021-09-30 Thread Barry Smith
> On Sep 30, 2021, at 6:16 PM, Amneet Bhalla wrote: > > > >> If you want to solve systems accurately, you should non-dimensionalize the > >> system prior to discretization. This would mean that > your C and b have elements in the [1, D] range, where D is the dynamic range > of your

Re: [petsc-users] PC shell destroy

2021-09-30 Thread Barry Smith
Alfredo, I think the best approach for you to use is to have your own MATSHELL and your own PCSHELL. You will use your MATSHELL as the second matrix argument to TSSetIJacobian(). It should record the current x and the current shift. Your PCSHELL will then, in PCSetUp(), get access to

[petsc-users] PETSc 3.16 release

2021-09-30 Thread Barry Smith
; This release includes contributions from Albert Cowie Alexei Colin Barry Smith Blaise Bourdin Carsten Uphoff Connor Ward Daniel Finn Daniel Shapero Erik Schnetter Fande Kong Hong Zhang Jacob Faibussowitsch Jed Brown Jeremy Tillay Joe Wallwork Joseph Pusztay Jose Roman Junchao Zhang Koki Sag

Re: [petsc-users] (percent time in this phase)

2021-09-30 Thread Barry Smith
> To: "Chockalingam, Karthikeyan (STFC,DL,HC)" > > Cc: Barry Smith , "petsc-users@mcs.anl.gov" > > Subject: Re: [petsc-users] (percent time in this phase) > > On Thu, Sep 30, 2021 at 8:50 AM Karthikeyan Chockalingam - STFC UKRI > <mailto:k

Re: [petsc-users] Disconnected domains and Poisson equation

2021-09-30 Thread Barry Smith
7 true resid norm > 2.065082694477e-14 ||r(i)||/||b|| 4.633258453698e-01 > 10 KSP Residual norm 1.285788988203e-17 % max 1.007469033514e+00 min > 1.433291867068e-03 max/min 7.029057072477e+02 > 11 KSP unpreconditioned resid norm 5.490854431580e-19 true resid norm > 1.798071628

Re: [petsc-users] Convergence rate for spatially varying Helmholtz system

2021-09-30 Thread Barry Smith
> On Sep 29, 2021, at 5:37 PM, Ramakrishnan Thirumalaisamy > wrote: > > Hi all, > > I am trying to solve the Helmholtz equation for temperature T: > > (C I + Div D grad) T = f > > in IBAMR, in which C is the spatially varying diagonal entries, and D is the > spatially varying

Re: [petsc-users] Disconnected domains and Poisson equation

2021-09-29 Thread Barry Smith
run with -ksp_view and send the output on the solver details. > I had divergence using BCGS and GMRES setting the null space with only one > constant. > Thanks > > Marco Cisternino > > From: Marco Cisternino > Sent: mercoledì 29 settembre 2021 17:54 > To: Barry S

Re: [petsc-users] Disconnected domains and Poisson equation

2021-09-29 Thread Barry Smith
The problem actually has a two dimensional null space; constant on each domain but possibly different constants. I think you need to build the MatNullSpace by explicitly constructing two vectors, one with 0 on one domain and constant value on the other and one with 0 on the other domain and

Re: [petsc-users] %T (percent time in this phase)

2021-09-28 Thread Barry Smith
nd then KSPSolve() will always include the total time of the solve plus all setup time. PCApply will contain all the time to apply the preconditioner but may also include some setup time. Barry > > Best, > Karthik. > > > > > From: Barry Smith > Date

Re: [petsc-users] %T (percent time in this phase)

2021-09-28 Thread Barry Smith
> On Sep 28, 2021, at 10:55 AM, Karthikeyan Chockalingam - STFC UKRI > wrote: > > Hello, > > I ran ex45 in the KPS tutorial, which is a 3D finite-difference Poisson > problem. I noticed from the output from using the flag -log_summary that for > various events their respective %T (percent

Re: [petsc-users] Using MATLAB on Windows with PETSc on WSL

2021-09-28 Thread Barry Smith
> On Sep 28, 2021, at 11:33 AM, Lucas Banting wrote: > > Hello, > > My overall goal is to send a sparse matrix to PETSc (in WSL)from MATLAB (in > Windows) so I can use SLEPc for some eigenvalue routines, and send those > eigenvectors back to MATLAB, as the MATLAB eigs() struggles with my

Re: [petsc-users] Interaction between petsc4py and application Fortran library

2021-09-27 Thread Barry Smith
Nathan, Yes, you can call PetscInitializeFortran() from your Fortran library. Barry > On Sep 27, 2021, at 11:59 AM, WUKIE, NATHAN A DR-02 USAF AFMC AFRL/RQVC via > petsc-users wrote: > > How should petsc initialization be handled for a python application utilizing > petsc4py and a

Re: [petsc-users] Petsc memory consumption keep increasing in my loop

2021-09-24 Thread Barry Smith
But the example i wrote -- even if you do not that into account //SOME CODE > HERE .. part -- give me , by using PetscMallocDump, some informations about > memory that was not freed. > > Based on the example code i sent, i was expecting that PetscMallocDump give > no output. > &

Re: [petsc-users] Petsc memory consumption keep increasing in my loop

2021-09-24 Thread Barry Smith
The code you sent looks fine, it should not leak memory. Perhaps the /// SOME CODE HERE is doing something that prevents the matrix from being actually freed. PETSc uses reference counting on its objects so if another object keeps a reference to the matrix then the memory of the matrix

Re: [petsc-users] New error on Summit

2021-09-23 Thread Barry Smith
Not really fixed, the problem is still there. You just bypassed the problem that BuildSystem has. > On Sep 23, 2021, at 10:16 AM, Mark Adams wrote: > > This is fixed now. I did not have a gcc module loaded so it was picking up > some default. > > On Thu, Sep 23, 2021 at 8:56 AM Mark

Re: [petsc-users] Is this a bug? MatMultAdd_SeqBAIJ_11

2021-09-21 Thread Barry Smith
Daniel, Thanks for the update. We can patch the release version of PETSc (normally we don't have a way to patch previous release versions) There is no direct option to always use the _N version. (For smaller blocks using _N is very slow). Barry > On Sep 21, 2021, at 9:51

Re: [petsc-users] Solving two successive linear systems

2021-09-17 Thread Barry Smith
> On Sep 17, 2021, at 12:21 PM, Samuel Estes wrote: > > Hi, > > I have two related questions about the best way to use the KSP solver: > > First, I have an adaptive FEM code which solves the same linear system at > each iteration until the grid is refined at which point, obviously, the

Re: [petsc-users] MatZeroRows and full assembly

2021-09-13 Thread Barry Smith
Sorry, my mistake. It is MatZeroRowsColumns() that ignores the MAT_KEEP_NONZERO_PATTERN option. Barry > On Sep 13, 2021, at 4:04 PM, Junchao Zhang wrote: > > From

Re: [petsc-users] MatZeroRows and full assembly

2021-09-13 Thread Barry Smith
> On Sep 13, 2021, at 3:34 PM, Anthony Paul Haas wrote: > > Hello, > > Is it allowed after a MatZeroRows to insert more values in the row that was > just zeroed with MatSetValues and then perform another full assembly of the > matrix? Yes, if you are replacing previously zeroed values it

Re: [petsc-users] p4est error at NERSC

2021-09-12 Thread Barry Smith
You seem to have too many inconsistent modules loaded at the same time. It is picking up /usr/common/software/sles15_cgpu/hpcsdk/20.11/Linux_x86_64/20.11/compilers/lib/libgomp.so when it started with /usr/common/software/sles15_cgpu/gcc/8.3.0/lib/../lib64/libgomp.so Since you are

Re: [petsc-users] DMDA matrices with one sided stencils

2021-09-10 Thread Barry Smith
I think the following should work for you. Create a "wide" DMDA and then call DMSetMatrixPreallocateOnly() on it, use this DMDA to create your matrix, this will ensure that only the entries you enter into the matrix are stored (so the extra "layers" of zeros will not appear in the

Re: [petsc-users] Petsc with Visual Studio

2021-09-10 Thread Barry Smith
Please let us know of any difficulties that arose, we may be able to improve the process or the documentation of make the process less painful. Barry > On Sep 10, 2021, at 11:55 AM, Hamid wrote: > > Hi everybody, > > I already compiled Petsc (without MUMPS) with Intel compilers under

Re: [petsc-users] Ainsworth formula to solve saddle point problems / preconditioner for shell matrices

2021-09-10 Thread Barry Smith
k forward to hearing from you! > > Best regards, > Olivier > > On 08/09/2021 20:56, Barry Smith wrote: >> >> Olivier, >> >> I'll refresh my memory on this and see if I can finish it up. >> >> Barry >> >> >>> On

Re: [petsc-users] Redirecting petsc output

2021-09-08 Thread Barry Smith
Philip, There a variety of techniques. Some of the command line options take an optional viewer name where the output can be redirected. For example -ts_monitor ascii:filename or -ts_view ascii:filenamesee

Re: [petsc-users] petsc_with_c++_python

2021-09-08 Thread Barry Smith
This should be possible, not really different than using C (instead of C++). Please send the example by Aron group and we may have suggestions. Barry > On Sep 8, 2021, at 6:27 AM, govind sharma wrote: > > Hi, > > I need a 2d poisson solver such that I can use petsc objects between

Re: [petsc-users] Mat preallocation for SNES jacobian [WAS Re: Mat preallocation in case of variable stencils]

2021-09-06 Thread Barry Smith
Matteo, I think it might be best if you simply took our "standard" DMCreateMatrix for DMDA routine and modified exactly for your needs. You can find the source code in src/dm/impls/da/fdda.c There are a variety of routines such as DMCreateMatrix_DA_2d_MPIAIJ_Fill()

Re: [petsc-users] Slow convergence while parallel computations.

2021-09-06 Thread Barry Smith
You can use -mat_null_space_test to check it the null space you provide is within the null space of the operator. There is no practical way to test if the null space you provide is exactly the full null space of the operator but at least the check ensures that you are not providing something

Re: [petsc-users] runtime error on Summit with nvhpc21.7

2021-08-27 Thread Barry Smith
> On Aug 27, 2021, at 5:05 PM, Mark Adams wrote: > > > > On Fri, Aug 27, 2021 at 5:03 PM Junchao Zhang > wrote: > I don't understand the configure options > > --with-cc=/gpfs/alpine/world-shared/phy122/lib/install/summit/kokkos/nvhpc21.7/bin/nvcc_wrapper >

Re: [petsc-users] Parallelize in the y direction

2021-08-20 Thread Barry Smith
Trying to solve many "one-dimensional" problems each in parallel on different subset of ranks will be massive pain to do specifically. I recommend just forming a single matrix for all these systems and solving it with KSPSolve and block Jacobi preconditioning or even a parallel direct

Re: [petsc-users] Reaching limit number of communicator with Spectrum MPI

2021-08-19 Thread Barry Smith
With a couple of new PETSc utility functions we could use this approach generically to provide communicators to all external packages instead of directly use the dup and free specifically for each external package as we do now. > On Aug 20, 2021, at 12:33 AM, Barry Smith wr

Re: [petsc-users] Reaching limit number of communicator with Spectrum MPI

2021-08-19 Thread Barry Smith
It sounds like maybe the Spectrum MPI_Comm_free() is not returning the comm to the "pool" as available for future use; a very buggy MPI implementation. This can easily be checked in a tiny standalone MPI program that simply comm dups and frees thousands of times in a loop. Could even be a

Re: [petsc-users] Sparse Matrix Matrix Multiply

2021-08-12 Thread Barry Smith
I don't understand. Why do you wish the new matrix-matrix product vector to have the same nonzero pattern as the basic dm matrix? If you multiple two dm matrices together it will generally have a larger stencil then the dm matrix but this is normal and the new product matrix handles it

Re: [petsc-users] use of undeclared identifier PetscViewerHDF5Open - in Petsc 3.12

2021-08-10 Thread Barry Smith
Likely your install of PETSc was not configured for HDF5. Use ./configure --download-hdf5 > On Aug 10, 2021, at 8:23 AM, Matthew Knepley wrote: > > On Tue, Aug 10, 2021 at 5:35 AM Armando Coco > wrote: > Hello, > > I am trying to compile a petsc program

Re: [petsc-users] PCFIELDSPLIT and Block Matrices

2021-08-06 Thread Barry Smith
> On Aug 6, 2021, at 5:26 PM, Alfredo J Duarte Gomez > wrote: > > Good morning, > > I am currently working on a PETSC application that will require a > preconditioner that uses several block matrices. > > For now, I have a simple problem that I am solving with a dmda structured > grid

Re: [petsc-users] from Petsc 3.7.4.0 to 3.13.3.0

2021-08-02 Thread Barry Smith
It is find to use such conditional checks if needed. > On Aug 2, 2021, at 4:06 PM, Anthony Paul Haas wrote: > > Hello, > > I recently updated our code from Petsc 3.7.4.0 to 3.13.3.0. Among other > things I noticed is that all the includes (such as #include > ) have now to be accompanied

Re: [petsc-users] Is PetscSFBcast deterministic (just checking, I assume it is)

2021-07-30 Thread Barry Smith
We might consider having a universal reproduce flag that fixes everything to be reproducible (for debugging purposes) instead of operation specific ones like -matstash_reproduce. > On Jul 29, 2021, at 11:45 AM, Jed Brown wrote: > > Provided it's the same SF, yes. (We use MPI_Waitall

Re: [petsc-users] is PETSc's random deterministic?

2021-07-28 Thread Barry Smith
The default PETSc random number generator (on CPUs) PETSCRANDER48 is deterministic and should return the same random numbers independent of the underlying hardware and software. The manual page for PETSCRANDER48 indicates this. As we are moving the PETSc docs to petsc.org

Re: [petsc-users] Question about MatGetSubMatrix

2021-07-23 Thread Barry Smith
lto:tan...@msu.edu>>: >>>> >>>> Hi, >>>> As a part of implementing this process by ourself, we would like to >>>> eliminate boundary dofs. By reading DMStag code, we guess we can use >>>> DMStagStencilToIndexLocal >>>> Mat

Re: [petsc-users] parallel HDF5 output of DMDA data with dof>1

2021-07-23 Thread Barry Smith
data and in the visualization tool indicate the dof you wish to visualize. Barry > > Matteo > > Il 23/07/21 01:25, Barry Smith ha scritto: >>I have run your code and looked at the output in Matlab and then looked >> at your code. >> >

Re: [petsc-users] parallel HDF5 output of DMDA data with dof>1

2021-07-22 Thread Barry Smith
I have run your code and looked at the output in Matlab and then looked at your code. It seems you expect the output to be independent of the number of MPI ranks? It will not be because you have written > ierr = VecGetSubVector(U0,is[0],); CHKERRQ(ierr); >

Re: [petsc-users] Question about MatGetSubMatrix

2021-07-16 Thread Barry Smith
Zakariae, MatGetSubMatrix() was removed a long time ago, the routine is now MatCreateSubMatrix() but it does not work in way you had hoped. There is currently no mechanism to move values you put into the sub matrix back into the original larger matrix (though perhaps there should be?).

Re: [petsc-users] error on Spock

2021-07-13 Thread Barry Smith
The expected behavior on Cray systems is you load "appropriate" modules and then run ./configure without needing to provide compiler and MPI information and it "just works". So one should not need to provide --with-cc=cc --with-cxx=CC --with-fc=ftn on Cray systems. Loading "appropriate"

Re: [petsc-users] Does petsc duplicate the users communicator?

2021-07-08 Thread Barry Smith
Whenever PETSc is handed a communicator it looks for an attribute inside of the communicator that contains the "PETSc" version of that communicator. If it does not find the attribute it adds an attribute with a new communicator in, if it does find one it increases its reference count by

Re: [petsc-users] download zlib error

2021-07-07 Thread Barry Smith
; ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined >> reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined] >> ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined >> reference to hsa_iterate_agents [

Re: [petsc-users] download zlib error

2021-07-06 Thread Barry Smith
> > On Tue, Jul 6, 2021 at 6:42 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Mark, > >You can try what the configure error message should be suggesting (it is > not clear if that is being printed to your screen or no). > > ERROR: Unable to do

Re: [petsc-users] download zlib error

2021-07-06 Thread Barry Smith
Mark, You can try what the configure error message should be suggesting (it is not clear if that is being printed to your screen or no). ERROR: Unable to download package ZLIB from: http://www.zlib.net/zlib-1.2.11.tar.gz * If URL specified manually - perhaps there is a typo? * If your

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

2021-07-06 Thread Barry Smith
Stefano has mentioned this before. He reported cuSparse matrix-matrix vector products use a very amount of memory. > On Jul 6, 2021, at 4:33 PM, Mark Adams wrote: > > I am running out of memory in GAMG. It looks like this is from the new > cuSparse RAP. > I was able to run Hypre with twice

Re: [petsc-users] PetSc and CrayPat: MPI assertion errors

2021-07-06 Thread Barry Smith
> On Jul 6, 2021, at 8:30 AM, Vijay S Kumar wrote: > > Hello all, > > By way of background, we have a PetSc-based solver that we run on our > in-house Cray system. We are carrying out performance analysis using > profilers in the CrayPat suite that provide more fine-grained >

Re: [petsc-users] HDF5 DM and VecView with MPI :: Crash

2021-07-05 Thread Barry Smith
Please send the error message that is printed to the screen. Also please send the exact PETSc version you are using. If possible also a code that reproduces the problem. Can you view other simpler things with HDF5? Like say just a vector? Barry > On Jul 5, 2021, at 11:50

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

2021-07-02 Thread Barry Smith
> On Jul 2, 2021, at 10:03 AM, Stefano Zampini > wrote: > > Patrick > > Should this be fixed in PETSc build system? > https://github.com/JuliaPackaging/Yggdrasil/blob/master/P/PETSc/bundled/patches/petsc_name_mangle.patch This line worries me. How does the get work here? If the

Re: [petsc-users] MatNest with Shell blocks for multipysics

2021-07-01 Thread Barry Smith
Barry! > > I can now see a way forward. > > Il 01/07/21 21:42, Barry Smith ha scritto: >>> I do not understand how creating a DMDA with n0+n1 dofs will let me easily >>> reuse my shell preconditioner code on the top-left block. >>PCFIELDSPLIT (and friends

Re: [petsc-users] MatNest with Shell blocks for multipysics

2021-07-01 Thread Barry Smith
> On Jul 1, 2021, at 11:44 AM, Matteo Semplice > wrote: > > Il 01/07/21 17:52, Jed Brown ha scritto: >> I think ex28 is better organization of code. You can DMCreateMatrix() and >> then set types/preallocation for off-diagonal blocks of the MatNest. I think >> the comment is unclear and

Re: [petsc-users] Any workarounds for TAO in a complex scalar type code?

2021-06-24 Thread Barry Smith
th complex. > On Jun 24, 2021, at 10:11 PM, Barry Smith wrote: > > > $ git grep requiresscalar > bound/makefile:#requiresscalarreal > complementarity/makefile:#requiresscalarreal > constrained/makefile:#requiresscalarreal > leastsquares/makefile:#require

Re: [petsc-users] Any workarounds for TAO in a complex scalar type code?

2021-06-24 Thread Barry Smith
$ git grep requiresscalar bound/makefile:#requiresscalarreal complementarity/makefile:#requiresscalarreal constrained/makefile:#requiresscalarreal leastsquares/makefile:#requiresscalarreal linesearch/impls/makefile:#requiresscalarreal pde_constrained/makefile:#requiresscalar

Re: [petsc-users] Copy stiffness matrix to jacobian matrix in form jacobian

2021-06-14 Thread Barry Smith
y jacobian using MatGetValue and MatSetValue, the above error > disappears > > formjacobian() > { > > my_ctx* ptr = (my_ctx*) ctx; // cast the pointer to void into pointer to > struct > > ierr = MatGetOwnershipRange(jac,,); > ierr = MatGetSize(ptr->K,,); CHKERRQ(ierr)

Re: [petsc-users] Copy stiffness matrix to jacobian matrix in form jacobian

2021-06-14 Thread Barry Smith
processor run. > "[0]PETSC ERROR: - Error Message > -- > [0]PETSC ERROR: Object is in wrong state > [0]PETSC ERROR: Matrix is missing diagonal entry 0" > > > Thanks > Kaushik > > On

Re: [petsc-users] Change Amat in FormJacobian

2021-06-13 Thread Barry Smith
Anton, -pc_mg_galerkin pmat Though it seems simple, there is some subtly in swapping out matrices with SNES. When using multigrid with SNES there are at least five distinct uses of the Jacobian operator. Perform matrix-vector product in line search to check Wolf sufficient decrease

Re: [petsc-users] Copy stiffness matrix to jacobian matrix in form jacobian

2021-06-11 Thread Barry Smith
LY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(jac,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > } > > When I execute this I get a Petsc error, object in wrong state missing > diagonal entry. > > I am not sure what I am missing here? > > Thanks > Kaushik > > > O

Re: [petsc-users] Copy stiffness matrix to jacobian matrix in form jacobian

2021-06-10 Thread Barry Smith
> On Jun 10, 2021, at 3:29 PM, Kaushik Vijaykumar wrote: > > Hi everyone, > > I am trying to copy the stiffness matrix that I generated in form function to > the jacobian matrix jac in form jacobian. The piece of code for that: > > If you have created jac and B in your main program and

Re: [petsc-users] aijcusparse error

2021-06-08 Thread Barry Smith
You need to set the type before calling the preallocation routines. Otherwise when you set to a new type all the previous information is essentially removed when the new type is created. Barry A slightly more clever MatCreate_MPIAIJCUSPARSE() could check if the matrix was already of the

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

2021-05-31 Thread Barry Smith
Everybody is correct. Using the extremely sparse, nearly diagonal MPI matrix will have a bit more overhead than doing the rotations on the elements due to the needed MPI check and general use of a sparse-sparse-sparse matrix vector product. But if a code does not have support for the

Re: [petsc-users] Collect Trajectories components

2021-05-31 Thread Barry Smith
d be more helpful if you could provide some background about > what you want to achieve. > > Hong (Mr.) > >> >> Francesco >> >> >>> Il giorno 28 mag 2021, alle ore 18:04, Barry Smith >> <mailto:bsm...@petsc.dev>> ha scritto: >

Re: [petsc-users] Collect Trajectories components

2021-05-31 Thread Barry Smith
k 1, then rank 2 etc.) Barry > Does the vector U need to have specific requirements in terms of dofs or > stencil width? > > Francesco > > >> Il giorno 28 mag 2021, alle ore 18:04, Barry Smith > <mailto:bsm...@petsc.dev>> ha scritto: >> >> >&g

Re: [petsc-users] CUDA MatSetValues test

2021-05-30 Thread Barry Smith
if you would like me to do the rebase and testing of your Landau mass matrix branch. I can get it ready to work with the results of barry/2020-11-11/cleanup-matsetvaluesdevice and then hand it back to you for further development. Barry > On May 29, 2021, at 11:32 AM, Barry Smith wr

Re: [petsc-users] building with PGI and Kokkos

2021-05-29 Thread Barry Smith
Something you might check. https://forums.developer.nvidia.com/t/c-14/135887/7 > On May 29, 2021, at 4:43 PM, Mark Adams wrote: > > Good idea, thanks, > no luck. > > Kokkos requires C++14 but the CUDAcompiler only supports C++11 > >

Re: [petsc-users] strange segv

2021-05-29 Thread Barry Smith
I don't see why it is not running the Kokkos check. Here is the rule right below the CUDA rule that is apparently running. check_build: -@echo "Running check examples to verify correct installation" -@echo "Using PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"

Re: [petsc-users] CUDA MatSetValues test

2021-05-29 Thread Barry Smith
it. I'll let you know as I progress. Barry > On May 28, 2021, at 10:53 PM, Barry Smith wrote: > > > I have rebased and tried to fix everything. I am now fixing the issues of > --download-openmpi and cuda, once that is done I will test, rebase with main > again if

Re: [petsc-users] CUDA MatSetValues test

2021-05-28 Thread Barry Smith
on cuda.py in that, if cuda is present, configures using >> cuda. MPI.py or MPICH.py do not depend on cuda.py (MPICH, only weakly, it >> adds a print if cuda is present) >> Since eventually the MPI distro will only need a hint to be configured with >> CUDA, why not rem

<    3   4   5   6   7   8   9   10   11   12   >