Re: [petsc-users] [KSP] PETSc not reporting a KSP fail when true residual is NaN

2022-02-25 Thread Barry Smith
gmres.patch > make libs > > then rerun your code and see if it now handles the Inf/NaN correctly. If so > we'll patch our release branch with the fix. > Thank you for checking this, Barry. I applied the patch exactly the way you > instructed, however, the problem is still happening.

Re: [petsc-users] Questions regarding nested field split

2022-02-25 Thread Barry Smith
For parallel layouts generally each MPI rank (parallel process) will have roughly the same number of indices for each field. So you would not end up with entire fields on one or a small number of processes. This is done by using interlaced (check the docs) storage of variables rather by

Re: [petsc-users] [KSP] PETSc not reporting a KSP fail when true residual is NaN

2022-02-25 Thread Barry Smith
  Giovane,    Thanks for the complete report. It looks like we may be missing a check in our FGMRES implementation that allows the iteration to continue after a NaN/Inf.     I will explain how we handle the checking and then attach a patch that you can apply to see if it resolves the problem.  

Re: [petsc-users] Petsc support for BoomerAMG from PCHYPRE to run on Nvidia and AMD GPUs

2022-02-23 Thread Barry Smith
Answered in petsc-ma...@mcs.anl.gov Please do not post the same question in multiple venues, it is confusing and can result in no response. > On Feb 23, 2022, at 7:00 AM, Qi Yang wrote: > > To whom it may concern, > > Hope this email finds you well. >

Re: [petsc-users] Configuring with CMake

2022-02-22 Thread Barry Smith
Bruce, Can you please send the PkgConfig calls that you make to get the PETSc values? And then exactly what PETSc PkgConfig returns. Thanks Barry > On Feb 22, 2022, at 11:03 AM, Palmer, Bruce J via petsc-users > wrote: > > Hi, > > We recently switched the CMake configuration on

Re: [petsc-users] PCSetCoordinates does not set coordinates of sub PC (fieldsplit) objects

2022-02-21 Thread Barry Smith
ierr); > ierr = ISDestroy(_coords); CHKERRQ(ierr); > ierr = KSPGetPC(ilink_current->ksp, _current); CHKERRQ(ierr); > ierr = PCSetCoordinates(pc_current, dim, ndofs_block, coords_block); > CHKERRQ(ierr); > ierr = PetscFree(coords_block); CHKERRQ(ierr); >

Re: [petsc-users] Cray perftools

2022-02-21 Thread Barry Smith
Have any of the modules loaded changed? Or the shared libraries that are in any of the modules? > On Feb 21, 2022, at 5:38 PM, Adrian Croucher > wrote: > > hi, > > We have our PETSc-based code compiled on a Cray XC-50 machine, and it has > just recently started running about 2.5 times

Re: [petsc-users] Changes in SNES convergence criteria

2022-02-16 Thread Barry Smith
> On Feb 16, 2022, at 6:28 PM, Park, Heeho via petsc-users > wrote: > > Hi Petsc developers, > > I’m running into two issues related to SNES convergence criteria. First is > setting convergence criteria to a large value. This used to work to > effectively turn off RTOL, STOL, ATOL, and

Re: [petsc-users] Migrating to parallel PETSc

2022-02-15 Thread Barry Smith
MatCreateMPIAIJWithArrays() and MatUpdateMPIAIJWithArrays() may be suitable for your use case. This should also be much more efficient in moving the matrix from your code to PETSc's format. Barry > On Feb 15, 2022, at 4:13 PM, Bojan Niceno > wrote: > > Dear PETSc users, > > > I have

Re: [petsc-users] stopping KSPSolve and then restarting where it stopped

2022-02-09 Thread Barry Smith
Yes, in that situation you just need to call KSPSetInitalGuessNonzero() and then call KSPSolve again. Note that for GMRES and friends this will begin afresh by starting with a new Krylov space, it won't start from the partially built one. Be sure to reset KSPSetInitalGuessNonzero() for

Re: [petsc-users] Quasi newton SNES change variable

2022-02-09 Thread Barry Smith
It is odd that the columns are not sorted row 125: (125, 0.) (107, 0.) How was this matrix created? It is erroring because it compares the 125 column in the matrix to the 107 column requested and concludes there is no slot for 107 column. Barry > On Feb 9, 2022, at 10:33 AM, Yann Jobic

Re: [petsc-users] Debugging with valgrind

2022-02-08 Thread Barry Smith
Yes, these come from other packages or the OS so you cannot do anything about them. Barry > On Feb 8, 2022, at 1:08 PM, Medane TCHAKOROM > wrote: > > Hello , > > I have been debugging my code with valgrind, and found many memory leakage > that i removed so far. > > But i keep

Re: [petsc-users] The Matrix and Vector Format Convert between PETSc and HYPRE

2022-02-07 Thread Barry Smith
Sijie, Generally to use hypre from PETSc you just use PETSc matrices and vectors in your code and set the desired hypre solver with PC; you don't need to deal with hypre matrices and vectors directly at all. Barry > On Feb 6, 2022, at 12:34 AM, Sijie Tang wrote: > > I make a

Re: [petsc-users] 3.16.4 amd blis libflame linking problem

2022-02-04 Thread Barry Smith
> On Feb 4, 2022, at 12:38 PM, Satish Balay wrote: > > On Fri, 4 Feb 2022, Barry Smith wrote: > >> >> >>> On Feb 4, 2022, at 12:27 PM, Satish Balay wrote: >>> >>> Probably best if you can use the same version of gfortran to build both

Re: [petsc-users] 3.16.4 amd blis libflame linking problem

2022-02-04 Thread Barry Smith
-blas-lib= --with-lapack-lib= options]. > > Satish > > > On Fri, 4 Feb 2022, Barry Smith wrote: > >> >> Please do >> >> ldd -O /opt/amd/amd-libflame-3.1.0/lib/lp64/libflame.so >> >> You may need to list the gfortran library directory of

Re: [petsc-users] 3.16.4 amd blis libflame linking problem

2022-02-04 Thread Barry Smith
Please do ldd -O /opt/amd/amd-libflame-3.1.0/lib/lp64/libflame.so You may need to list the gfortran library directory of libgfortran.so.5 it needs to use in LDFLAGS passed to PETSc configure Barry Note: Even though you explicitly listed a static library of libflame to use our

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

2022-02-03 Thread Barry Smith
end finding a different sparse matrix test case which has an appropriate nonzero data structuring and partitioning that one can expect good performance on. > > Rohan > > On Thu, Feb 3, 2022 at 1:25 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > I suspect th

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

2022-02-03 Thread Barry Smith
.2967e+01 1.0 6.34e+11 1.1 6.0e+01 9.4e+07 > 0.0e+00 37100 86110 0 37100 86110 0 28598 920026 2 6.71e+03 30 > 8.73e+04 98 > ``` > The follow up log might be slightly different as well because I pushed a new > log stage as requested by Stefano. > > Rohan &g

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

2022-02-03 Thread Barry Smith
Mark, Good eye. Something is definitely very different between this run and the previous (options, code change?). In the previously sent runs it was about 98% on GPU. Barry > On Feb 3, 2022, at 12:29 PM, Rohan Yadav wrote: > > >Please send the code that builds the sparse B

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

2022-02-02 Thread Barry Smith
> On Feb 3, 2022, at 12:11 AM, Rohan Yadav wrote: > > Hi All, > > I'm trying to use the MatMatMult function with 1 sparse matrix B and two > dense matrices A, C. I'm computing A = B * C. > > My code is below: > > ``` > void spmm(Mat B, int warmup, int niter) { > Mat A, C; > PetscInt i,

Re: [petsc-users] Using Finite Difference Jacobian with TS

2022-02-02 Thread Barry Smith
For a big matrix the asii output is slow (especially parallel) Yes, this view will be called automatically on all matrix when they are assembled so if you are assembling a bunch of matrices it will output them all. You can attach a unique prefix to the matrix PetscObjectSetPrefix() and

Re: [petsc-users] Cannot eagerly initialize cuda, as doing so results in cuda error 35 (cudaErrorInsufficientDriver) : CUDA driver version is insufficient for CUDA runtime version

2022-01-25 Thread Barry Smith
bad has extra -L/apps/local/spack/software/gcc-7.5.0/cuda-10.1.243-v4ymjqcrr7f72qfiuzsstuy5jiajbuey/lib64/stubs -lcuda good does not. Try removing the stubs directory and -lcuda from the bad $PETSC_ARCH/lib/petsc/conf/variables and likely the bad will start working. Barry I never liked

Re: [petsc-users] Asking examples about solving DAE in python

2022-01-20 Thread Barry Smith
Hong Zhang can give you more correct details but I can get you started. Yes, you can use Petsc4py for this purpose. If you cannot provide a Jacobian then you should be able to use either a matrix-free solver for the Jacobian system or have PETSc build the Jacobian for you with

Re: [petsc-users] Finite difference approximation of Jacobian

2022-01-11 Thread Barry Smith
with zeros but that is asking a lot of him). Regarding Fande's needs. One could rig things so that later one could "flip" back the matrix to again use the hasher for setting values when the contacts change. > On Jan 12, 2022, at 2:48 AM, Barry Smith wrote: > > > >>

Re: [petsc-users] Finite difference approximation of Jacobian

2022-01-11 Thread Barry Smith
e MATHASH* implementations (written by different people) that would compete on speed and memory usage. So there could be MatSetType() and a new MatSetInitialType() where the initial type would be automatically set to some MATHASH if preallocation info is not provided. > >

Re: [petsc-users] Finite difference approximation of Jacobian

2022-01-11 Thread Barry Smith
-time-what-can-i-do-to-make-this-process-faster-or-matsetvalues-is-so-slow-what-can-i-do-to-speed-it-up > > Barry Smith writes: > >> I think the MATPREALLOCATOR as a MatType is a cumbersome strange thing and >> would prefer it was just functionality that Mat pro

Re: [petsc-users] A problem with MatFDColoringSetFunction

2022-01-11 Thread Barry Smith
> On Jan 11, 2022, at 8:04 PM, Jed Brown wrote: > > Barry Smith writes: > >> Thanks for the alternative. >> >> @jed does this mean we need to do our casting of functions like this >> everywhere? > > Whenever our interfaces acc

Re: [petsc-users] Finite difference approximation of Jacobian

2022-01-11 Thread Barry Smith
I think the MATPREALLOCATOR as a MatType is a cumbersome strange thing and would prefer it was just functionality that Mat provided directly; for example MatSetOption(mat, preallocator_mode,true); matsetvalues,... MatAssemblyBegin/End. Now the matrix has its proper nonzero structure of

Re: [petsc-users] PCSetCoordinates does not set coordinates of sub PC (fieldsplit) objects

2022-01-11 Thread Barry Smith
> On Jan 11, 2022, at 9:51 PM, Matthew Knepley wrote: > > On Tue, Jan 11, 2022 at 3:31 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Nicolas, > > For "simple" PCFIELDSPLIT it is possible to pass down the attached > coordinate inform

Re: [petsc-users] Loading DM binary data into 64-bit-integer PETSc

2022-01-11 Thread Barry Smith
In general, no because the integer values inside the files will have different lengths. You can use the Python lib/petsc/bin/PetscBinaryIO.py or MATLAB share/petsc/matlab/*.m utilities to read the data from one format and save it in the other. Sorry for the inconvenience. Barry > On

Re: [petsc-users] PCSetCoordinates does not set coordinates of sub PC (fieldsplit) objects

2022-01-11 Thread Barry Smith
Nicolas, For "simple" PCFIELDSPLIT it is possible to pass down the attached coordinate information. By simple I mean where the splitting is done by fields and not by general lists of IS (where one does not have enough information to know what the coordinates would mean to the subPCS).

Re: [petsc-users] A problem with MatFDColoringSetFunction

2022-01-11 Thread Barry Smith
))SNESFormFunction, this); > > Thanks, > > -Ling > > From: petsc-users <mailto:petsc-users-boun...@mcs.anl.gov>> on behalf of Zou, Ling via > petsc-users mailto:petsc-users@mcs.anl.gov>> > Date: Monday, January 10, 2022 at 9:23 PM > To: Barry Smith mai

Re: [petsc-users] A problem with MatFDColoringSetFunction

2022-01-10 Thread Barry Smith
This is annoying. You need to pass in a compiler flag to turn off the error conditioner for casting a function pointer. It may be -Wnoerror=cast-function-type just google. Barry > On Jan 10, 2022, at 4:35 PM, Zou, Ling via petsc-users > wrote: > > Hi All, > > I would appreciate if

Re: [petsc-users] Is old ex10.c (separated matrix and rhs) deprecated?

2022-01-10 Thread Barry Smith
You can put them in different files or in the same file. If you put them in the same file you need to know which object comes first the matrix or the vector, this tells you if you should call MatLoad first or VecLoad. Barry > On Jan 10, 2022, at 2:33 PM, Danyang Su wrote: > > Hi All,

Re: [petsc-users] how do you calculate the relative tolerance

2022-01-06 Thread Barry Smith
This is discussed in https://petsc.org/release/docs/manual/ksp/ you can see the exact formulas in the code at https://petsc.org/release/src/ksp/ksp/interface/iterativ.c.html#KSPConvergedDefault

Re: [petsc-users] Nullspaces

2022-01-05 Thread Barry Smith
What do you get for the two eigenvectors ? > On Jan 5, 2022, at 11:21 AM, Marco Cisternino > wrote: > > Hello Jose and Stefano. > Thank you, Jose for your hints. > I computed the two smallest eigenvalues of my operator and they are tiny but > not zero. > The smallest 0 eigenvalue is =

Re: [petsc-users] Nullspaces

2021-12-24 Thread Barry Smith
I tried your code but it appears the ./gyroid_solution.txt contains a vector of all zeros. Is this intended? Actually VecDuplicateVecs() does not copy the values in the vector so your nsp[0] will contain the zero vector anyways. Would you be able to send the data that indicates what

Re: [petsc-users] Combining SUPERLU_DIST with CUDA fails

2021-12-21 Thread Barry Smith
hould not be the > problem. But I'll take a look if there are ways to fix that problem, or to > circumvent it without having to install superlu_dist separately. > > Thanks! > > Regards, > > Roland > > Am 21.12.2021 um 19:04 schrieb Barry Smith: >> >> I thi

Re: [petsc-users] Combining SUPERLU_DIST with CUDA fails

2021-12-21 Thread Barry Smith
_64-suse-linux/lib -L/usr/x86_64-suse-linux/lib > -Wl,-rpath,/opt/intel/oneapi/mpi/2021.5.0/lib/release > -Wl,-rpath,/opt/intel/oneapi/mpi/2021.5.0/lib -lgfortran -lm -lgcc_s > -lquadmath" -Denable_parmetislib=FALSE -DTPL_ENABLE_PARMETISLIB=FALSE > -DXSDK_ENABLE_Fortran=ON -Denab

Re: [petsc-users] Combining SUPERLU_DIST with CUDA fails

2021-12-20 Thread Barry Smith
les=0 -DMPI_C_COMPILE_FLAGS:STRING="" -DMPI_C_INCLUDE_PATH:STRING="" -DMPI_C_HEADER_DIR:STRING="" -DMPI_C_LIBRARIES:STRING="" > On Dec 20, 2021, at 2:59 PM, Roland Richter wrote: > > I introduced the changes from that patch directly, witho

Re: [petsc-users] Combining SUPERLU_DIST with CUDA fails

2021-12-20 Thread Barry Smith
ackages/git.superlu_dist/SRC/cublas_utils.h:22:10: > fatal error: cublas_v2.h: No such file or directory > > even though this header is available. I assume some header paths are not set > correctly? > > Thanks, > > regards, > > Roland > > Am 20.12.21 um 16:29

Re: [petsc-users] Combining SUPERLU_DIST with CUDA fails

2021-12-20 Thread Barry Smith
Please try the branch balay/slu-without-omp-3 It is in MR https://gitlab.com/petsc/petsc/-/merge_requests/4635 > On Dec 20, 2021, at 8:14 AM, Roland Richter wrote: > > Hei, > > I tried to combine CUDA with superlu_dist in petsc using the following > configure-line: > > ./configure

Re: [petsc-users] NVIDIA HPC SDK and complex data type

2021-12-18 Thread Barry Smith
Yes, Junchao deserves a bounty from NVIDIA for this find. > On Dec 18, 2021, at 8:22 PM, Matthew Knepley wrote: > > On Sat, Dec 18, 2021 at 7:03 PM Junchao Zhang > wrote: > I found it is a NVIDIA C/C++ compiler bug. I can reproduce it with > > Great find! >

Re: [petsc-users] --with-mpi=0

2021-12-18 Thread Barry Smith
-> mpi.mod at: > > https://gitlab.com/petsc/petsc/-/merge_requests/4662 > > [they are a bit hakey] > > Satish > > > > On Sat, 18 Dec 2021, Satish Balay via petsc-users wrote: > >> On Sat, 18 Dec 2021, Barry Smith wrote: >> >>> >>

Re: [petsc-users] --with-mpi=0

2021-12-18 Thread Barry Smith
tran mpi_comm_rank() etc - as they > would clash with similar uni impls. But I see that option no longer exists?] > > Satish > > On Sat, 18 Dec 2021, Barry Smith wrote: > >> >> Urg, this is pretty horrible. petscmpi? Why can't MPIUNI provide this as >&

Re: [petsc-users] --with-mpi=0

2021-12-18 Thread Barry Smith
Urg, this is pretty horrible. petscmpi? Why can't MPIUNI provide this as "standard" MPI modules? > On Dec 18, 2021, at 11:04 AM, Satish Balay via petsc-users > wrote: > > Ah - you need 'use petscmpi' > > For example: ksp/ksp/tutorials/ex44f.F90 > > Satish > > On Sat, 18 Dec 2021,

Re: [petsc-users] PCs and MATIS

2021-12-14 Thread Barry Smith
Do the "overlapping meshes" "match" in the overlap regions or are you connecting completely different meshes discretizations by boundary conditions along the edges of all the sub meshes? In other words, will your global linear system be defined by your overlapping meshes? If they

Re: [petsc-users] Tips on integrating MPI ksp petsc into my application?

2021-12-13 Thread Barry Smith
matrix. This would require a total re-write of my application which is > > not possible . I realize this may sounds confusing. If so, I'll see if I > > can create an example that shows the issue. > > > > > > > > > > > > On Tuesday, December 7, 202

Re: [petsc-users] KSPBuildResidual and KSPType compatibility

2021-12-07 Thread Barry Smith
both left and right preconditioning? Barry > On Dec 7, 2021, at 4:25 PM, Fischer, Greg A. > wrote: > > I’ve attached typical examples of “A” and “b”. Do these qualify as large > values? > > The two runs are with and without “-ksp_pc_side right”. > > F

Re: [petsc-users] KSPBuildResidual and KSPType compatibility

2021-12-07 Thread Barry Smith
it? What are the two runs? Left and right preconditioning with ibcgs or something else? > On Dec 7, 2021, at 12:44 PM, Fischer, Greg A. > wrote: > > Attached are outputs with these options. > > What should I make of these? > > From: Barry Smith mailto:bsm...@petsc

Re: [petsc-users] Nullspaces

2021-12-07 Thread Barry Smith
A side note: The MatNullSpaceTest tells you that the null space you provided is in the null space of the operator, it does not say if you have found the entire null space. In your case with two subdomains the null space is actually two dimensional; all constant on one domain (0 on the other)

Re: [petsc-users] How to read/write a HDF5 file using petsc4py ?

2021-12-07 Thread Barry Smith
iss-spelling or missing package: > https://petsc.org/release/install/install/#external-packages > <https://petsc.org/release/install/install/#external-packages> > [0] Unknown PetscViewer type given: hdf5 > > Quentin > > > > > > Quentin CHEVALIER – IA parcours

Re: [petsc-users] How to read/write a HDF5 file using petsc4py ?

2021-12-07 Thread Barry Smith
You can also just add --with-petsc4py to your PETSc configure command and it will manage automatically the petsc4py install. So ./configure --with-hdf5 --any-other --configure-flags --you-want --with-petsc4py Some people don't like this approach, I don't understand exactly why not; it

Re: [petsc-users] Tips on integrating MPI ksp petsc into my application?

2021-12-07 Thread Barry Smith
If you use MatLoad() it never has the entire matrix on a single rank at the same time; it efficiently gets the matrix from the file spread out over all the ranks. > On Dec 6, 2021, at 11:04 PM, Faraz Hussain via petsc-users > wrote: > > I am studying the examples but it seems all ranks

Re: [petsc-users] KSPBuildResidual and KSPType compatibility

2021-12-06 Thread Barry Smith
What do you get for -ksp_type ibcgs -ksp_monitor -ksp_monitor_true_residual with and without -ksp_pc_side right ? > On Dec 6, 2021, at 12:00 PM, Jed Brown wrote: > > "Fischer, Greg A. via petsc-users" writes: > >> Hello petsc-users, >> >> I would like to check convergence against the

Re: [petsc-users] KSPBuildResidual and KSPType compatibility

2021-12-06 Thread Barry Smith
This algorithm computes the residual norms indirectly (this is part of the "trick" of the algorithm to reduce the number of global reductions needed), thus they may not match the actual residual norm computed by || b - A x ||. How different are your values? Barry > On Dec 6, 2021, at

Re: [petsc-users] Communication in parallel MatMatMult

2021-12-01 Thread Barry Smith
PETSc uses Elemental to perform such operations. PetscErrorCode MatMatMultNumeric_Elemental(Mat A,Mat B,Mat C) { Mat_Elemental*a = (Mat_Elemental*)A->data; Mat_Elemental*b = (Mat_Elemental*)B->data; Mat_Elemental*c = (Mat_Elemental*)C->data; PetscElemScalar one = 1,zero

Re: [petsc-users] DMPlex shared node indexing

2021-11-27 Thread Barry Smith
f the local vector automatically > after calling DMPlexDistribute? Or additional function calling or setting is > needed? > > Yuan > > 2021年11月27日(土) 0:34 Barry Smith mailto:bsm...@petsc.dev>>: > >Actually, with DMPLEX the ghost vertices are not at the end of

Re: [petsc-users] How to check NULL pointer in Fortran

2021-11-26 Thread Barry Smith
value is a FORTRAN_NULL_INTEGER Barry > On Nov 24, 2021, at 3:19 AM, 袁煕 wrote: > > Thank you for the clarification. I am looking forward to this bug fix. > > Yuan > > 2021年11月22日(月) 23:17 Barry Smith mailto:bsm...@petsc.dev>>: > >The address of PETSC_NULL_IN

Re: [petsc-users] DMPlex shared node indexing

2021-11-26 Thread Barry Smith
Actually, with DMPLEX the ghost vertices are not at the end of the local vector, they can be anywhere within the list. But I have a work-in-progress branch https://gitlab.com/petsc/petsc/-/merge_requests/4542 that labels the ghost

Re: [petsc-users] How to set boundary conditions for a structured finite volume (FV) discretization when using TS/SNES?

2021-11-26 Thread Barry Smith
Could you be more specific in saying how it fails (can you share the actual prototype code?) Note here you seem to be missing a /dx term G[i] = (u[i+1] - u[i]) - q_A; //Neumann BC: du/dx(x=0.0) = q_A; Barry > On Nov 26, 2021, at 4:02 AM, zhfreewill wrote: > > Hi all, >

Re: [petsc-users] configure error with fftw and without mpi

2021-11-25 Thread Barry Smith
I have made a branch barry/2021-11-25/feature-fftw-seq https://gitlab.com/petsc/petsc/-/merge_requests/4604 that provides support for using FFTW without MPI, please let us know if you have difficulties with it. Barry > On Nov 25,

Re: [petsc-users] configure error with fftw and without mpi

2021-11-25 Thread Barry Smith
PETSc's install and use of fftw always requires MPI. The code in config/BuildSystem/config/packages/fftw.py and src/mat/impls/fft/fftw/fftw.c could relatively easily be "fixed" to also support building and using FFTW without MPI. Just change the fftw.py to conditionally pass in

Re: [petsc-users] Issues with log_view on windows

2021-11-22 Thread Barry Smith
I meant the separator in PATH, on Unix one has "/usr/bin:/usr/local/bin" is Windows "\something;\somethingelse"? Barry > On Nov 22, 2021, at 11:59 AM, Pilhwa Lee wrote: > > I weakly recall there is a difference of “\” and “/“ between Mac and Windows.

Re: [petsc-users] Issues with log_view on windows

2021-11-22 Thread Barry Smith
What does Windows use for a path separator? > On Nov 22, 2021, at 11:19 AM, Satish Balay via petsc-users > wrote: > > Well our build tools use cygwin - but the library is built with MS/Intel > compilers - they use paths in windows notation. > > I'm not sure if there is a way to get

Re: [petsc-users] Issues with log_view on windows

2021-11-22 Thread Barry Smith
> On Nov 22, 2021, at 10:36 AM, Milan Pelletier via petsc-users > wrote: > > Matt, > Thanks for the answer. I could fix my issue regarding unbalanced events - and > so SNES ex5 does work well too. > By the way, such imbalance does not trigger errors when log_view is using > plain ascii

Re: [petsc-users] How to check NULL pointer in Fortran

2021-11-19 Thread Barry Smith
it is very possible there is a bug in the Fortran interface for this function. It looks like whoever wrote the Fortran interface did not think through the special case of contiguous entries. PETSC_EXTERN void petscsfgetgraph_(PetscSF *sf,PetscInt *nroots,PetscInt *nleaves, F90Array1d

Re: [petsc-users] Doubt about BT and BASIC NEWTONLS

2021-11-17 Thread Barry Smith
ng affect the convergence of the > NEWTONLS with "bt" line-search? Without any scaling we can solve this example > with "basic" (with a very reasonable convergence rate), but not with "bt" > line-search. > > Regards, > Francesc. > > On Tue, No

Re: [petsc-users] Doubt about BT and BASIC NEWTONLS

2021-11-16 Thread Barry Smith
ine-search would scale the factor > "jacobian^{-1} * residual", so it would scale equally both internal and > external forces. > > Regards, > Francesc. > > On Tue, Nov 16, 2021 at 5:38 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Perhaps thi

Re: [petsc-users] Doubt about BT and BASIC NEWTONLS

2021-11-16 Thread Barry Smith
Perhaps this behavior is the result of a "scaling" issue in how various terms affect the residual? In particular perhaps the terms for enforcing boundary conditions are scaled differently than terms for the PDE enforcement? > On Nov 16, 2021, at 11:19 AM, Francesc Levrero-Florencio >

Re: [petsc-users] Unable to Install Kokkos and Find Cuda Compiler

2021-11-14 Thread Barry Smith
You need to send configure.log to petsc-ma...@mcs.anl.gov so we can see why the PETSc configure CUDA checks failed. Once we have that we can either make configure more robust for the type of system you are working on or tell you what to change to get the

Re: [petsc-users] How to compute the condition number of SchurComplementMat preconditioned with PCSHELL.

2021-11-11 Thread Barry Smith
to converge when reaching rtol(S)=1e-6, > but then, with a further decrease of rtol(S), it begins to diverge slightly > though. > > I will try generalised EVP. > > Thanks, > Vlad > > От: Barry Smith mailto:bsm...@petsc.dev>> > Отправлено: 10 ноября 2021 г. 17:45:

Re: [petsc-users] How to compute the condition number of SchurComplementMat preconditioned with PCSHELL.

2021-11-10 Thread Barry Smith
> P is a diffusion matrix, which itself is inverted by KSPCG) This worries me. Unless solved to full precision the action of solving with CG is not a linear operator in the input variable b, this means that the action of your Schur complement is not a linear operator and so iterative

Re: [petsc-users] Error running make on MUMPS

2021-11-09 Thread Barry Smith via petsc-users
This version of MUMPS has a bug in its build system; it does not have all the dependencies on Fortran modules properly listed so Fortran files can get compiled too early causing "random" failures during some builds, especially on machines with lots of cores for compiling. I think you

Re: [petsc-users] Error loading vectors from files : Too many open files.

2021-11-09 Thread Barry Smith
The code is likely creating many viewers each for its own file and not destroying the viewers resulting all the files remaining open. If you are explicitly creating viewers with PetscViewerBinaryOpen() make sure to destroy it with PetscViewerDestroy() after loading from it. Barry >

Re: [petsc-users] Problem with using make

2021-11-09 Thread Barry Smith
at went wrong here? > > Thank you > > Yours sincerely > Yaswanth > > From: Barry Smith > Sent: Tuesday, November 9, 2021 8:46 AM > To: Yaswanth Narayana > Cc: petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] Problem with using make > > > It se

Re: [petsc-users] The exact Jacobian for ASPIN

2021-11-08 Thread Barry Smith
Lulu, Sorry for not responding quicker. This question will take a little research to figure out exactly what is needed, I am not sure it is possible. I note below you have a J_{I} is that intentional? If so what does it mean, or is a typo that should be J_{j} as in the next

Re: [petsc-users] Problem with using make

2021-11-08 Thread Barry Smith
It seems you missed $ in front of $PETSC_DIR somewhere along the line. I suggest deleting the PETSc directory completely, recloning PETSc and follow the instructions at https://petsc.org/release/install/ very careful to insure there are no typos or

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

2021-11-07 Thread Barry Smith
l difficulty is caused by the zero-element in diagonal. > >> In this regard, I've performed some trial and test. It seems that several > >> methods have been worked out for this pivot issue: > >> a) By setting '-pc_type svd', PETSC does not panic any more with my >

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

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