Re: [petsc-users] MatSolve_SeqAIJ_NaturalOrdering

2016-04-22 Thread Jed Brown
Randall Mackie writes: > After profiling our code, we have found that most of the time is spent in > MatSolve_SeqAIJ_NaturalOrdering, which upon inspection is just doing simple > forward and backward solves of already factored ILU matrices. > > We think that we should be

Re: [petsc-users] DMPlexCreateLocalVec Within a function

2016-04-16 Thread Jed Brown
SC ERROR: #2295 Element_Investigation_TEST() line 248 in > /Users/mkury/Documents/Code/petFEM/src/elementFunctions.c > > > > > > > thanks again, > > Matt > On Apr 16, 2016, at 1:21 AM, Jed Brown <j...@jedbrown.org> wrote: > >> Matthew Kury &l

Re: [petsc-users] DMPlexCreateLocalVec Within a function

2016-04-16 Thread Jed Brown
Matthew Kury writes: > Hello, > > I have done some reading and I have not been able to find out what the > proper way to create and use vectors within a function. > > If I have a function that passes in dm and V then: > +++ > DMPlexGetLocalVec(dm,

Re: [petsc-users] Ordering with MatCreateNest and MPI

2016-04-15 Thread Jed Brown
FRANCAVILLA MATTEO ALESSANDRO writes: > Dear Jed, > > thanks for the reply. Despite my efforts, I'm still unable to use the > information carried by the index set. I'm able to extract the IS through > MatNestGetISs but I don't really know how to interprete it and to exploit

Re: [petsc-users] Form Local function from global

2016-04-15 Thread Jed Brown
marco mavari writes: > However, I would like to do nonlinear domain decomposition ( similar to > NASM/ASPIN). > Is it possible to extract LocalEvaluation routines from GlobalFunctions? No, the global function is global, so you can't call "just the local part". Moreover,

Re: [petsc-users] Ordering with MatCreateNest and MPI

2016-04-08 Thread Jed Brown
_i),INSERT_VALUES,IERR) > > 1 MPI process correctly yields the 2nd column of A: > > Vec Object: 1 MPI processes > type: seq > 2 > 4 > 202 > 204 > > 2 MPI processes DO NOT YIELD the 2nd column, but the 3rd column (apart from > a permutation similarly to the previo

Re: [petsc-users] L1 or projection type regularization with PETSc

2016-04-07 Thread Jed Brown
Lingyun Qiu <qiu.ling...@gmail.com> writes: > On Thu, Apr 7, 2016 at 2:24 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Lingyun Qiu <qiu.ling...@gmail.com> writes: >> >> > Dear all, >> > >> > I am working an opt

Re: [petsc-users] L1 or projection type regularization with PETSc

2016-04-07 Thread Jed Brown
Lingyun Qiu writes: > Dear all, > > I am working an optimization problem as > min_x ||Ax - b||_2^2 + alpha ||x||_1 > > For the fidelity term, we use L2 norm. We use L1 norm for the > regularization term. Without regularization term, i.e., alpha=0, we > iteratively solve

[petsc-users] PDESoft 2016, UK, 4-8 Jul 2016 (abstract submission deadline extended)

2016-04-07 Thread Jed Brown
The abstract submission deadline has been extended to April 22. Please consider this small and interesting conference on your summer schedule. We are happy to announce that PDESoft 2016 will be held at the University of Warwick, UK. This main conference will run from 4-6 July and the remaining

Re: [petsc-users] Ordering with MatCreateNest and MPI

2016-04-07 Thread Jed Brown
Alessandro Francavilla writes: > Thanks for the reply; probably I've not been clear enough. I don't need to > separate out components, I just need to understand the underlying orderings. > > For instance, suppose that I want to multiply the matrix with a null vector

Re: [petsc-users] Prelloc: Get coordinates of local diagonal submatrix

2016-04-07 Thread Jed Brown
Florian Lindner writes: >Am I right to assume that nnz is to in the the PETSc ordering of rows and not >application ordering? Yes signature.asc Description: PGP signature

Re: [petsc-users] Ordering with MatCreateNest and MPI

2016-04-07 Thread Jed Brown
FRANCAVILLA MATTEO ALESSANDRO writes: > Hi, > > I'm trying to use a matrix composed of different sub-matrix blocks; I create > the matrix with MatCreateNest(). I'm finding it hard to understand the > ordering (in MPI applications) of the result of MatMult operations. >

Re: [petsc-users] question about the PetscFVLeastSquaresPseudoInverseSVD

2016-03-29 Thread Jed Brown
Rongliang Chen writes: > --- > Initialize the matrix A (is a 3 x 3 matrix): > 1.00 0.00 0.00 > 0.00 1.00 0.00 > 0.00 0.00 1.00 > > Initialize the matrix B: > 1.00 0.00 0.00 > 0.00

Re: [petsc-users] Real data structure with complex build

2016-03-27 Thread Jed Brown
Bikash Kanungo writes: > Hi, > > Is there a way to define the Mat(s) and Vec(s) to be real while working > with a complex build of PETSc? No, there is no supported way to do this. > I'm asking because part of my problem is real while the other part is > complex. SO I'll be

Re: [petsc-users] makefile for compiling multiple sources

2016-03-23 Thread Jed Brown
Satish Balay writes: > Not sure how ccache helps with header dependencies. It returns the cached version if all the dependencies (including headers) are unchanged. > One can add in the dependencies to the makefile > > femex1.o: femex1.cpp lists.h shapes.h > shapes.o:

Re: [petsc-users] Questions about ASM in petsc4py

2016-03-20 Thread Jed Brown
Chih-Hao Chen writes: > Hello Matt, > > > Thanks for the information. > After using -log_summary to print out for both cases, I found both of > them(openMpi and Mvapich2) give same performance. > > On the other hand, I still cannot get clear ideas how to get the

Re: [petsc-users] Questions about ASM in petsc4py

2016-03-19 Thread Jed Brown
Chih-Hao Chen writes: > Hello Jed, > > > Thanks for the information. > In ex8.c about ASM example, > we can use “FOR” loop to get the subKsp from each domain with : > ierr = PCASMGetSubKSP(kspPc, , , ) > where subksp can be accessed through its index like

Re: [petsc-users] CPU vs GPU for PETSc applications

2016-03-11 Thread Jed Brown
Justin Chang writes: > Matt, > > So what's an example of "doing a bunch of iterations to make sending the > initial datadown worth it"? CG/Jacobi for a high resolution problem. You pretty much have to have thrown in the towel on finding a good preconditioner, otherwise

Re: [petsc-users] AMG preconditioners

2016-03-09 Thread Jed Brown
Manav Bhatia writes: > Thanks! > > I am intrigued by this. > > I am solving a system of equations where the natural block size is > 2x2. This is obtained by rewriting a complex linear system of > equations in real numbers. What equations are you solving? Is this system

Re: [petsc-users] Neumann BC with non-symmetric matrix

2016-03-01 Thread Jed Brown
Mohammad Mirzadeh writes: > I am not familiar with the terminology used here. What does the refluxing > mean? The Chombo/BoxLib family of methods evaluate fluxes between coarse grid cells overlaying refined grids, then later visit the fine grids and reevaluate those fluxes.

Re: [petsc-users] Neumann BC with non-symmetric matrix

2016-03-01 Thread Jed Brown
Boyce Griffith writes: > Jed, can you also do this for Stokes? It seems like something like > RT0 is the right place to start. See, for example, Arnold, Falk, and Winther's 2007 paper on mixed FEM for elasticity with weakly imposed symmetry. It's the usual H(div)

Re: [petsc-users] Neumann BC with non-symmetric matrix

2016-03-01 Thread Jed Brown
Mark Adams writes: > I don't know. Chombo/Boxlib have a stencil for C-F and do F-C with > refluxing, which I do not linearize. PETSc sums fluxes at faces directly, > perhaps this IS symmetric? Depends on scaling. Refluxing versus evaluating fluxes once on the fine faces

Re: [petsc-users] Neumann BC with non-symmetric matrix

2016-03-01 Thread Jed Brown
Barry Smith writes: >>4-2) Another observation is that the true residual stagnates way >>earlier which I assume is an indication that the RHS is in fact >>not in the range of A. > >You can hope this is the case. > >Of course one cannot really know if the

Re: [petsc-users] Example for FAS

2016-03-01 Thread Jed Brown
Cyrill Vonplanta writes: > Dear PETSc User-list, > > I am trying to use the FAS from PETSc in version 3.6.3. For other solvers > there would be usually an example or two on the documentation, but on >

Re: [petsc-users] how to get full trajectory from TS into petsc binary

2016-03-01 Thread Jed Brown
Ed Bueler writes: > Barry -- > > I am reading the resulting file successfully using > > import struct > import sys > f = open('timesteps','r') > while True: > try: > bytes = f.read(8) > except: > print "f.read() failed" > sys.exit(1) It seems

Re: [petsc-users] Variable wall times

2016-02-22 Thread Jed Brown
Phanisri Pradeep Pratapa writes: > @Jed: > There are no other jobs running on that node (and also no other jobs on the > queue). So could the noise be due to load balance issue or something else > in computing dot products and MatMults? Is this to be expected? If so, is > the

Re: [petsc-users] Variable wall times

2016-02-22 Thread Jed Brown
Phanisri Pradeep Pratapa writes: > Hi, > > I am trying to compare run times for a function in petsc using ksp solve. > When I run the code in parallel on a single node (64 processors), it seems > to take different wall time for each run, although run on exactly same >

Re: [petsc-users] Doubt in MPIPreallocation

2016-02-19 Thread Jed Brown
John Albequerque writes: > So Jed, what you are suggesting is that I should set only the non-zero > elements while using > * MatSetValues(A,(high-low),**idxm,nc,idxn,values,INSERT_* > > *VALUES);* > And not mention the zero elements and for that I should loop over all

Re: [petsc-users] Doubt in MPIPreallocation

2016-02-19 Thread Jed Brown
John Albequerque writes: > I am really sorry Matthew but I am not able to get your point. It would be > very kind of you if you could show me the changes in the code. MatSetValues sets a logically dense block. It's not a list of values in COO format. So this is setting a

Re: [petsc-users] memory scalable AO

2016-02-17 Thread Jed Brown
Randall Mackie writes: > this leads to the error ‘bin/maint/generatefortranstubs.py’ …No such file. > > there is no maint directory under bin. Ah, I missed that you have a tarball, not a clone of the repository. Then you'll have to fix the file manually. I would start

Re: [petsc-users] memory scalable AO

2016-02-17 Thread Jed Brown
Randall Mackie writes: > So it seems to be ignoring the dmdasetaotype_ in > /src/dm/impls/da/ftn-custom/zdaindexf.c in favor of ../ftn-auto/daindexf.c Sounds like you need to generate your Fortran stubs so that the version in ftn-auto/daindexf.c is fixed. make

Re: [petsc-users] Inverse local to global mapping?

2016-02-16 Thread Jed Brown
Florian Lindner writes: > Hello, > > I want to build a global vector (and matrix) from local data. The local data > has a global index, which can be non-contiguous i.e. global index (0, 5, 2) > is on rank 0, (1, 4, 3) is on rank 1. To keep all local data on the local >

Re: [petsc-users] Extracting CSR format from matrices for CUDA

2016-02-12 Thread Jed Brown
Dave May writes: >> If so is there an example/source code showing this extraction? >> > > Not that I know of. > But there isn't much to it, the description on these webpages should be > sufficient. See also the CUSP and ViennaCL matrix classes, which can run on CUDA. But

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-10 Thread Jed Brown
Xiangdong writes: >> VecAXPY 1021815 1.0 2.2148e+01 2.1 1.89e+10 1.1 0.0e+00 0.0e+00 >> 0.0e+00 2 4 0 0 0 2 4 0 0 0 207057 >> VecMAXPY 613089 1.0 1.3276e+01 2.2 2.27e+10 1.1 0.0e+00 0.0e+00 >> 0.0e+00 1 4 0 0 0 1 4 0 0 0 414499 >>

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Hong Zhang writes: > There is one particular integration method that may make the life easier — > backward Euler. It has only one stage at each time step. > > To Francesco: which TS method are you using? Is it backward Euler or > the default theta method? Default is forward

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Francesco Magaletti writes: > First of all thank you everybody for the fast replies. > > Barry, > I think the solution 1 is a good suggestion but I confess I’m a bit scared of > going deep into the modification of the ODE integrator. > I’m now using TSCN, the

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Barry Smith <bsm...@mcs.anl.gov> writes: >> On Feb 10, 2016, at 4:19 PM, Jed Brown <j...@jedbrown.org> wrote: >> >> Barry Smith <bsm...@mcs.anl.gov> writes: >>> We do not currently have library code to do grid sequence within a >>> tim

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Francesco Magaletti writes: > Dear Jed and Emil, > your suggestion to use L-stable time integrators gave great results, since > the SNES now converges with higher timestep values. > The arkimex 2e performs very well, in particular with the extrapolation of >

Re: [petsc-users] combine single and double precision

2016-02-09 Thread Jed Brown
albert gutiérrez writes: > Hello everyone, > > At times it can be useful to combine different data types in the same > problem. For example, there are parts of an algorithm which may be memory > bounded (requiring float) and operations where more precision is needed >

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-08 Thread Jed Brown
Xiangdong writes: > For these functions, the flop ratios are all 1.1, while the time ratio are > 1.5-2.2. So the amount of work are sort of balanced for each processes. > Both runs on Stampede and my group cluster gave similar behaviors. Given > that I only use 256 cores, do

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-08 Thread Jed Brown
Xiangdong writes: > iii) since the time ratios of VecDot (2.5) and MatMult (1.5) are still > high, I rerun the program with ipm module. The IPM summary is here: > https://drive.google.com/file/d/0BxEfb1tasJxhYXI0VkV0cjlLWUU/view?usp=sharing. > From this IPM reuslts,

Re: [petsc-users] Editor for PETSc

2016-02-05 Thread Jed Brown
Kaushik Kulkarni writes: > Hey Jed, > Thanks for your response. But a small doubt. > Am I supposed to add these two lines to the list of flags. > '-I$PETSC_DIR/include', > '-I$PETSC_DIR/$PETSC_ARCH/include', > > Because I did so, and still it was not working. The above

Re: [petsc-users] Editor for PETSc

2016-02-05 Thread Jed Brown
Kaushik Kulkarni writes: > The problem is not exactly with VIM. It is the plugins, I am using which > gives me suggestions( or the auto-complete feature ) as well as checks the > syntax. But, as it can be seen in the image attached it keeps on popping an > error. > > The

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-05 Thread Jed Brown
Matthew Knepley writes: >> I attached the full summary. At the end, it has >> >> Average time to get PetscTime(): 0 >> Average time for MPI_Barrier(): 8.3971e-05 >> Average time for zero size MPI_Send(): 7.16746e-06 >> >> Is it an indication of slow network? >> > > I think so.

Re: [petsc-users] petsc externalpackage directory

2016-02-03 Thread Jed Brown
Satish Balay writes: > My point here is - we haven't have problems with it. [if we had - then you > would be doing 'rm -rf PETSC_ARCH' 20 times every day..] I don't understand this logic. We tell users to do this several times every day. We might attribute it to having

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Satish Balay writes: > Or you can copy the whole '$PETSC_ARCH/externalpackages' dir over to > this other machine [and place in the same location - for any > PETSC_ARCH you plan to use..] This sounds unreliable. We used to have a unified externalpackages directory, but made it

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Barry Smith writes: >> I'd rather cache >> the tarballs (with checksum) or use git repositories (which can be >> reliably cleaned) > > Ok then you write the code to do this. It doesn't currently exist > (and I am not sure we want to be in the business of writing a full >

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Satish Balay writes: > Well my recommendation was for this use case of "same install on a different > machine" If you're installing to the same location on equivalently-configured machines, you can just copy $prefix (optionally by using DESTDIR to install to a temporary

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Barry Smith writes: >But in your previous email you seemed to advocate exactly that. You said > > I'd rather cache > the tarballs (with checksum) or use git repositories (which can be > reliably cleaned) > > isn't that adding "complicated features to facilitate" I'd

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Satish Balay writes: > On Tue, 2 Feb 2016, Barry Smith wrote: > >> How do the "firewalls" help if users scp over the EXACT same files that >> the firewall blocked? > > I'm not sure how things are setup - but I suspect: > > - one can ssh on to the net [perhaps using a

Re: [petsc-users] Understanding DMDAGetElements()

2016-02-02 Thread Jed Brown
Constantine Khroulev writes: > Hello PETSc developers, I recently discovered > DMDAGetElements()[1] and got excited about using it... but then I > realized that I don't understand what it does well enough to use > it. So, here is a question. Consider the four by four

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Jed Brown
Barry Smith <bsm...@mcs.anl.gov> writes: >> On Feb 2, 2016, at 7:00 PM, Jed Brown <j...@jedbrown.org> wrote: >> >> Satish Balay <ba...@mcs.anl.gov> writes: >>> Or you can copy the whole '$PETSC_ARCH/externalpackages' dir over to >>> this o

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > It seems that TSAdaptChoose_Basic only uses the local truncation error to > predict the next time step. Do you also include the number of snes > iterations in computing the next time step in some adapt option? TSAdaptChoose_Basic doesn't use the number of

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > Actually my problem is not that ill-conditioned. Here is my situation. Let > us say at time step n the snes_linesearch_basic failed. I have at least two > options now: i) cut the dt immediately, ii) switch to snes_linesearch_bt > with the same dt.

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > If I want to know how petsc computes the dt_next based on dt_current, > namely, dt_next = dt_current*func(snesits, etc), which function/file should > I look into? Check out TSAdapt, especially TSAdaptChoose_Basic and TSAdaptCheckStage. signature.asc

Re: [petsc-users] PETSc interface to MueLu

2016-01-29 Thread Jed Brown
victor.ma...@dicea.unipd.it writes: > I suppose that MueLu would give a cleaner implementation of ML's > features and possibly give a faster code. Last I heard, the MueLu implementation was slower. I don't know if that has been fixed more recently, but we would be more motivated to write the

Re: [petsc-users] repartition for dynamic load balancing

2016-01-27 Thread Jed Brown
Xiangdong writes: > I have a question on dynamic load balance in petsc. I started running a > simulation with one partition. As the simulation goes on, that partition > may lead to load imbalance since it is a non-steady problem. If it is worth > to perform the load balance,

Re: [petsc-users] Preconditioners for KSPSolveTranspose() in linear elasticity

2016-01-21 Thread Jed Brown
"Salazar De Troya, Miguel" writes: > I write the boundary conditions using their DirichletBoundary class, not > the penalty term. > The options I¹m using are ones that I found in the libMesh mail list > from a user who suggested them for elasticity problems. The idea

Re: [petsc-users] [petsc-maint] Preconditioners for KSPSolveTranspose() in linear elasticity

2016-01-20 Thread Jed Brown
"Salazar De Troya, Miguel" writes: > I am not 100% confident because I am not sure how libMesh handles the > Dirichlet boundary conditions, How are you using libmesh? Normally you write the boundary conditions. Many of the examples use penalty conditions, which

Re: [petsc-users] external packages

2016-01-19 Thread Jed Brown
Tabrez Ali writes: > Hello > > W.r.t. to external packages, does "--download-xyz=yes" implicitly means > "--with-xyz=1" Yes. > Also, is "--download-xyz=yes" exactly same as "--download-xyz" Yes, though --download-xyz=/path/to/xyz.tar.gz has semantic meaning.

Re: [petsc-users] Why use MATMPIBAIJ?

2016-01-18 Thread Jed Brown
Hoang Giang Bui writes: > Why P2/P2 is not for co-located discretization? Matt typed "P2/P2" when me meant "P2/P1". signature.asc Description: PGP signature

Re: [petsc-users] Profile a matrix-free solver.

2016-01-15 Thread Jed Brown
Matthew Knepley writes: > The way I read this, you are taking about 23 iterates/solve, and most of > your work is residual computation which should > be highly parallelizable/vectorizable. This seems great to me. This in the sense that it's up to you to determine whether your

Re: [petsc-users] Amortizing calls to PetscOptionsFindPair_Private()

2016-01-15 Thread Jed Brown
"Bhalla, Amneet Pal S" writes: > Hi Barry, > > In our code at each timestep we build MG level smoothers using PETSc > KSP solvers. Do you need to create new objects versus merely resetting them? I suspect that calling KSPReset() between timesteps instead of creating a

Re: [petsc-users] Why use MATMPIBAIJ?

2016-01-14 Thread Jed Brown
Hoang Giang Bui writes: > One more question I like to ask, which is more on the performance of the > solver. That if I have a coupled problem, says the point block is [u_x u_y > u_z p] in which entries of p block in stiffness matrix is in a much smaller > scale than u (p~1e-6,

Re: [petsc-users] METIS without C++ compiler

2016-01-11 Thread Jed Brown
Tabrez Ali writes: > Hello > > I just wanted to point that configure fails when "--with-metis=1 > --download-metis=1" options are used and a C++ compiler is not installed. > > After changing "project(METIS)" to "project(METIS C)" in >

Re: [petsc-users] PETSC_i

2016-01-11 Thread Jed Brown
"Jin, Shuangshuang" writes: > Hi, I have the following codes (The version of Petsc installed on my machine > has PetscScalar set to be complex number): Looks like you're trying to compile with a different PETSc. Check PETSC_DIR and PETSC_ARCH. signature.asc

Re: [petsc-users] Calling MatDestroy on MatGetDiagonalBlock

2016-01-05 Thread Jed Brown
Matthew Knepley writes: > How devastating would it be for Deal.II if we renamed them > MatCreateSubMatrix()? ;) I know it's consistent with respect to reference counting semantics, but it might be harder for new users to find when searching the docs. I have no data either

Re: [petsc-users] LP solvers based on PETSc ?

2015-12-29 Thread Jed Brown
Marco Zocca writes: > Is anyone here aware of linear program solvers, of any form, being > implemented on top of PETSc ? I'm not aware of dedicated LP solvers, but you could use TAO's Interior Point methods. See src/tao/constrained/examples/tutorials/toy.c for example.

Re: [petsc-users] Support of NetCDF

2015-12-28 Thread Jed Brown
Chao Yang writes: > Thanks, Fande. But it is NetCDF that I need, not HDF5, for some specific > reason, though they are somehow connected. There is no raw NetCDF, but Exodus is a NetCDF-based format. >> 在 2015年12月29日,上午2:10,Fande Kong 写道: >> >>

Re: [petsc-users] Release canditate?

2015-12-14 Thread Jed Brown
Eric Chamberland writes: > I see. In fact, I was thinking of 3.6.4.rc1, 3.6.4.rc2, then 3.6.4, > followed by 3.6.5.rc1, 3.6.5.rc2, then 3.6.5, etc... Those patch releases are only bug fixes, not new features. I'm not aware of PETSc having a problem of

Re: [petsc-users] Solving/creating SPD systems

2015-12-11 Thread Jed Brown
Justin Chang writes: > Pardon me for my apparent lack of understanding over what may be simple > concepts, but why is div[u]*div[v] singular in the context of LSFEM? The corresponding strong form is grad(div(u)). If u has n*d entries (in d dimensions -- it is a vector),

Re: [petsc-users] Release canditate?

2015-12-11 Thread Jed Brown
Éric Chamberland writes: > Hi, > > we just waited since petsc 3.5.4 until 3.6.3 to retrieve a working petsc > for our usages (got bugs with 3.6.1, 3.6.2) > > Now, just discovered 3.6.3 have a bug with mkl_pardiso... :/ v3.6.0 is now 6 months old, but the

Re: [petsc-users] Solving/creating SPD systems

2015-12-11 Thread Jed Brown
Justin Chang writes: > So I am wanting to compare the performance of various FEM discretization > with their respective "best" possible solver/pre conditioner. There > are saddle-point systems which HDiv formulations like RT0 work, but then > there are others like LSFEM that

Re: [petsc-users] possible to save direct solver factorization for later use

2015-12-09 Thread Jed Brown
Randall Mackie writes: > Is it possible to save a direct solver factorization (like Mumps) for use in > later parts of a code? > > In general, I’m thinking of a scenario like this: > > mat A - do lots of solves using Mumps > > mat B - do lots of solves using Mumps > > >

Re: [petsc-users] Vector Vector Multiply to get a Matrix

2015-12-07 Thread Jed Brown
Bibrak Qamar writes: > I am in a situation where I have to multiply two vectors of size nx1 to get > a matrix of size nxn. Well that's just silly. What do you want to do with this rank-1 matrix? signature.asc Description: PGP signature

Re: [petsc-users] Recommended DOF/processor for direct solver

2015-12-02 Thread Jed Brown
Alex Lindsay writes: > I've read on your FAQ page that a good rule of thumb for parallelization > is 20k DOF/processor. Does this apply equally to direct solves as well > as iterative? May be a dumb question... Depends on dimension and discretization, but no simple rule of

Re: [petsc-users] Weighted Jacobi

2015-12-01 Thread Jed Brown
Timothée Nicolas writes: > I meant > > X^{k+1} = omega*D^{-1}*(b - (A-D)*X^k) + (1-omega)*X^k Let's rearrange: X^{k+1} = omega*D^{-1}*(b - A*X^k) + omega*D^{-1}*D*X^k + (1-omega)*X^k = omega*D^{-1}*(b - A*X^k) + omega*X^k - omega*X^k + X^k =

Re: [petsc-users] [petsc-maint] Memory usage function: output for all ranks

2015-11-30 Thread Jed Brown
Andrey Ovsyannikov writes: > Thanks for your quick response. I like Massif tool and I have been using it > recently. However, I was not able to run Valgrind for large jobs. I am > interested in memory analysis of large scale runs with more than 1000 MPI > ranks.

Re: [petsc-users] adding mat rows

2015-11-20 Thread Jed Brown
Carles Bona writes: > Hello again, > > MatMatMult not supported for B of type mpibaij (where A*B = C). Can A be of > type mpibaij? Will C be of type mpibaij if A is but B is not? Use MPIAIJ for this. signature.asc Description: PGP signature

Re: [petsc-users] Debugging failed solve (what's an acceptable upper bound to the condition number?)

2015-11-20 Thread Jed Brown
Alex Lindsay writes: > I'm almost ashamed to share my condition number because I'm sure it must > be absurdly high. Without applying -ksp_diagonal_scale and > -ksp_diagonal_scale_fix, the condition number is around 1e25. When I do > apply those two parameters, the condition

Re: [petsc-users] adding mat rows

2015-11-19 Thread Jed Brown
Carles Bona writes: > Let's say I want to modify the first equation, but I don't want to lose the > information there, 1. The operation you describe still loses information. 2. Consider expressing your row operations as matrix-matrix multiplication. signature.asc

Re: [petsc-users] adding mat rows

2015-11-19 Thread Jed Brown
Carles Bona writes: > Sorry, yes, I meant losing less information than I would lose without > adding beforehand. That's not true either (as described). You're replacing two equations with one equation, so no matter how you do it, you're opening a 1D space. signature.asc

Re: [petsc-users] DMPlex for high order elements

2015-11-18 Thread Jed Brown
Alejandro D Otero writes: > Hi, I am trying to define a spectral element mesh in the frame of DMPlex > structure. > To begin with I am thinking of quadrilateral 2d elements. Lets say I have a > 16 node element with 2 nodes on each edge besides the 2 corners and 4 nodes > inside

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-16 Thread Jed Brown
Mark Adams writes: >> Yikes! I did not check that. Why do we have PRECONDITIONED as the default >> for CG? That is the preconditioned norm of the residual. I.e., || M^{-1} (A x - b) ||_2 > The two norm of the residual (ie, natural, right?) is not monotone either > in CG.

Re: [petsc-users] On the edge of 2^31 unknowns

2015-11-16 Thread Jed Brown
Barry Smith <bsm...@mcs.anl.gov> writes: >> On Nov 16, 2015, at 2:41 PM, Jed Brown <j...@jedbrown.org> wrote: >> >> Barry Smith <bsm...@mcs.anl.gov> writes: >>> Out goal is that if something won't fit in a 32 bit int we use a 64 >>> bit i

Re: [petsc-users] On the edge of 2^31 unknowns

2015-11-16 Thread Jed Brown
Barry Smith writes: > Out goal is that if something won't fit in a 32 bit int we use a 64 > bit integer when possible or at least produce a very useful error > message instead of the horrible malloc error you get. The more > crashes you can give us the quicker we can

Re: [petsc-users] On the edge of 2^31 unknowns

2015-11-16 Thread Jed Brown
Eric Chamberland writes: > int main() { >int a=1741445953; // my number of unknowns... >int b=2*(a+2); >unsigned long int c = b; >std::cout << " a: " << a << " b: " << b << " c: " << c <return 0; > } > > and it gives: > > a:

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-13 Thread Jed Brown
r<#secure method=pgpmime mode=sign> Matthew Knepley writes: > Yikes! I did not check that. Why do we have PRECONDITIONED as the default > for CG? So we can do an extra reduction on each iteration? I mean, who doesn't want that? ;-)

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-13 Thread Jed Brown
Matthew Knepley writes: > Something very strange is happening here. CG should converge monotonically, > but above it does not. What could be happening? Are you use -ksp_norm_type natural? CG is not monotone in other norms. Also, if boundary conditions are enforced using a

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-11 Thread Jed Brown
David Knezevic writes: > Do you have any further thoughts about what might cause the "strange > blocking" that you referred to? If there's something non-standard that > libMesh is doing with the blocks, I'd be interested to look into that. I > can send over the matrix

Re: [petsc-users] MUMPS with symmetric matrices

2015-11-04 Thread Jed Brown
Gianluca Meneghello writes: > Dear all, > > I am trying to solve a linear system for a symmetric matrix with MUMPS. > > Is there a way to tell MUMPS that the matrix is indeed symmetric? > > The way I build the matrix is > > Mat A,AT,ATA >

Re: [petsc-users] MUMPS with symmetric matrices

2015-11-04 Thread Jed Brown
Gianluca Meneghello writes: > That is correct... I will try with -pc_type cholesky and use > MatTransposeMatMult. > > Using cholesky I do not need to specify mumps as a solver, am I right? Of course you do. > A is a linearization of the Navier Stokes equation. Of the

Re: [petsc-users] Setting/creating Mats for SNES use

2015-11-02 Thread Jed Brown
Justin Chang writes: > Hi all, > > In my DMPlex program, I have these lines: > > Mat A,J; > > ... > > ierr = DMSetMatType(dm, MATAIJ); CHKERRQ(ierr); > ierr = DMCreateMatrix(dm, ); CHKERRQ(ierr); > A = J; > > ierr = DMSNESSetFunctionLocal(dm, ...); CHKERRQ(ierr); > ierr =

Re: [petsc-users] Setting/creating Mats for SNES use

2015-11-02 Thread Jed Brown
Justin Chang writes: > So when would I use one over the other? > > - If I wanted to solve a problem using a direct solver or an iterative > solver without a preconditioner, I would use A = J? > > - The documentation for SNESSetJacobian() says that AMat and PMat are > usually

Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Jed Brown
Matthew Knepley writes: > On Thu, Oct 22, 2015 at 9:37 AM, Marco Zocca wrote: > >> Thank you, but this is not really helping; >> >> why are there two slots to supply the Jacobian of the same function, i.e. >> Amat and J ? >> > > Amat is just the

Re: [petsc-users] mathematics formula of DMPlexProjectFunction

2015-10-20 Thread Jed Brown
Fande Kong writes: > Jed, Thanks. > > It means that the inner product against basis "n_i" is just the function > value at the point "x_i" if the function is sufficiently regular, e.g., > sin(x) or cos(x). Yes. > The basis function at x_i is "x-x_i" which is not the one we

Re: [petsc-users] mathematics formula of DMPlexProjectFunction

2015-10-20 Thread Jed Brown
Fande Kong writes: > Any body knows the mathematics formula corresponding to the function > DMPlexProjectFunction? I already went through the code, but I do not > understand quite well. I will appreciate any help. The definition of a finite element involves a dual space (the

Re: [petsc-users] MatPtAP for involving MPIDENSE and MPIAIJ matrices

2015-10-16 Thread Jed Brown
Hong writes: > Jed: >> >> >> > I plan to implement MatTransposeMatMult_MPIDense_MPIDense via >> > >> > 1. add MatTransposeMatMult_elemental_elemental() >> > 2. C_dense = P_dense^T * B_dense >> > via MatConvert_dense_elemental() and MatConvert_elemental_dense() >> >> The

Re: [petsc-users] MatPtAP for involving MPIDENSE and MPIAIJ matrices

2015-10-15 Thread Jed Brown
r<#secure method=pgpmime mode=sign> Hong writes: > I plan to implement MatTransposeMatMult_MPIDense_MPIDense via > > 1. add MatTransposeMatMult_elemental_elemental() > 2. C_dense = P_dense^T * B_dense > via MatConvert_dense_elemental() and MatConvert_elemental_dense()

Re: [petsc-users] MatPtAP for involving MPIDENSE and MPIAIJ matrices

2015-10-15 Thread Jed Brown
Matthew Knepley writes: > I do not understand "unrelated". My understanding was that TAIJ could be > used (with T = I) > to get the action of A on a set of vectors, which I think would be A P. Why > specifically would > you not use it? MAIJ is enough for that; it would involve

<    5   6   7   8   9   10   11   12   13   14   >