Re: [petsc-users] MatCreateSBAIJ

2022-03-21 Thread Barry Smith
The "trick" is that though "more" communication is needed to complete the product the communication can still be done in a single VecScatter instead of two separate calls to VecScatter. We simply pack both pieces of information that needs to be sent into a single vector. /* copy x into

Re: [petsc-users] Null space and preconditioners

2022-03-21 Thread Barry Smith
Marco, I have confirmed your results. Urgg, it appears we do not have something well documented. The removal of the null space only works for left preconditioned solvers and FGMRES only works with right preconditioning. Here is the reasoning. The Krylov space for left

Re: [petsc-users] Problem running ex54f with GAMG

2022-03-18 Thread Barry Smith
mmetric > V-cycle built on smoothed aggregation that should be definite (and symmetric). > > Fabio > > Il 18/03/22 16:47, Barry Smith ha scritto: >> Run with -ksp_converged_reason to have it print why it has stopped the >> iteration. >> >> >>&g

Re: [petsc-users] Problem running ex54f with GAMG

2022-03-18 Thread Barry Smith
Run with -ksp_converged_reason to have it print why it has stopped the iteration. > On Mar 18, 2022, at 11:44 AM, Fabio Durastante > wrote: > > Hi everybody, > > I'm trying to run the rotated anisotropy example ex54f using CG and GAMG as > preconditioner, I run it with the command: >

Re: [petsc-users] Regarding the status of VecSetValues(Blocked) for GPU vectors

2022-03-17 Thread Barry Smith
We seem to be emphasizing using MatSetValuesCOO() for GPUs (can also be for CPUs); in the main branch you can find a simple example in src/mat/tutorials/ex18.c which demonstrates its use. Barry > On Mar 17, 2022, at 4:46 PM, Sajid Ali Syed wrote: > > Hi PETSc-developers, > > Is it

Re: [petsc-users] Two simple questions on building

2022-03-16 Thread Barry Smith via petsc-users
Hi Ernesto, I hope you are doing well. I agree with Satish. It would be best to resolve the issues with the pure MKL approach. Any "hack" that got the libraries to work mixing fblaslapack and MKL would be fragile and untrustworthy. Feel free to email to petsc-ma...@mcs.anl.gov

Re: [petsc-users] Problem building petsc +rocm variant

2022-03-11 Thread Barry Smith
Please send configure.log and make.log to petsc-ma...@mcs.anl.gov For some reason PETSc's configure does not detect that the MPI does provide MPI_Type_dup() even though it is prototyped in the MPI include file. > On Mar 11, 2022, at 3:34 PM, Roskop, Luke B

Re: [petsc-users] How to call MUMPS for general symmetric matrix?

2022-03-10 Thread Barry Smith
If you call the Cholesky matrix factorization it treats the matrix as general symmetric, if you call MatSetOption(mat,MAT_SPD,PETSC_TRUE); on the PETSc matrix before using it with MUMPS it will treat it as positive definite. > On Mar 10, 2022, at 6:27 PM, Sam Guo wrote: > > Dear PETSc

Re: [petsc-users] TSBDF prr-load higher order solution

2022-03-10 Thread Barry Smith
This seems completely reasonable. We should have a simple mechanism for multi-step methods to save the appropriate multisteps after an integration and to load them into a TS before a new integration. Barry > On Mar 10, 2022, at 11:05 AM, Alfredo J Duarte Gomez > wrote: > > Hello

Re: [petsc-users] Building with CMAKE_GENERATOR set

2022-03-10 Thread Barry Smith
.nl <mailto:m.d...@marin.nl> | > www.marin.nl <http://www.marin.nl/> > > <https://www.linkedin.com/company/marin> > <http://www.youtube.com/marinmultimedia> > <https://twitter.com/MARIN_nieuws> > <https://www.facebook.com/marin.wageningen> >

Re: [petsc-users] Building with CMAKE_GENERATOR set

2022-03-10 Thread Barry Smith
Would it be enough that PETSc's ./configure build of external packages that use cmake temporarily turns off the value of CMAKE_GENERATOR when it runs cmake for the external packages? Barry > On Mar 10, 2022, at 6:50 AM, Deij-van Rijswijk, Menno wrote: > > > Good morning, > > I

Re: [petsc-users] Arbitrary ownership IS for a matrix

2022-03-09 Thread Barry Smith
You need to do a mapping of your global numbering to the standard PETSc numbering and use the PETSc numbering for all access to vectors and matrices. https://petsc.org/release/docs/manualpages/AO/AOCreate.html provides one

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

2022-03-07 Thread Barry Smith
d. Please let me know if you need any other information. > > Kind regards, > > Giovane > > Em sex., 25 de fev. de 2022 às 18:22, Barry Smith <mailto:bsm...@petsc.dev>> escreveu: > > Hmm, this is going to be tricky to debug why it the Inf/Nan is not found

Re: [petsc-users] How to solve N-S equation with SIMPLE-like prediction-correction method?

2022-03-01 Thread Barry Smith
The PCFIELDSPLIT preconditioner provides a general framework for solving coupled systems by using inner solvers on individual fields. It can be used for some instances of SIMPLE-like algorithms but I do not know if it exactly handles your specific instance. src/snes/tutorials/ex70.c

Re: [petsc-users] set MUMPS OOC_TMPDIR

2022-02-28 Thread Barry Smith
alize only once at the beginning of my program. I want to change > MUMPS OOC_TMPDIR dynamically on the fly. > > Thanks, > Sam > > On Mon, Feb 28, 2022 at 1:34 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > You can call PetscOptionsSetValue("-mat_mumps_ooc_tm

Re: [petsc-users] set MUMPS OOC_TMPDIR

2022-02-28 Thread Barry Smith
You can call PetscOptionsSetValue("-mat_mumps_ooc_tmpdir","directory"); anytime before the KSP/PCSetUp() is called. If you have multiple uses of MUMPs solvers you can call this between each use so that a different directory is used for different MUMPS usage. Barry > On Feb 28, 2022, at

Re: [petsc-users] Fortran HDF5 Cannot be found in PETSc-3.16

2022-02-28 Thread Barry Smith
You need the additional configure option --download-hdf5-fortran-bindings Please make sure you have the latest 3.16.4 Barry > On Feb 28, 2022, at 12:42 PM, Danyang Su wrote: > > Hi All, > > Does anyone encounter the problem when HDF5 related fortran code cannot be > compiled in

Re: [petsc-users] Question about the performance of KSP solver

2022-02-27 Thread Barry Smith
writing the -log_view. > > Barry Smith writes: > >> This would be after the user code is complete, PETSc memory has all been >> freed and we can put a signal catch around the code to prevent such crashes. >> >>> On Feb 27, 2022, at 4:24 PM, Jed Brown wrot

Re: [petsc-users] Question about the performance of KSP solver

2022-02-27 Thread Barry Smith
; ranks? I'd be mildly concerned about allocating GPU memory because a crash > here would be really bad. > > Barry Smith writes: > >> At PetscLogView() the code could see how long the run was, if it was >> greater than n seconds it could automatically run a few levels of

Re: [petsc-users] Question about the performance of KSP solver

2022-02-27 Thread Barry Smith
seconds to get more useful information. > On Feb 27, 2022, at 3:41 PM, Jed Brown wrote: > > Probably not implied by -log_view alone, but -streams_view or some such doing > it automatically would save having to context switch elsewhere to obtain that > data. > > Barry Smi

Re: [petsc-users] Question about the performance of KSP solver

2022-02-27 Thread Barry Smith
We should think about have -log_view automatically running streams on subsets of ranks and using the resulting information to provide guidance to users on interpretating the -log_view output instead of expecting users to run streams themselves on their system and then figuring out what to

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 >

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