Re: [petsc-users] Preconditioned BiCGStab in PETSC, formulas

2015-01-26 Thread Jed Brown
Kirill Voronin kvoro...@labchem.sscc.ru writes: But looking at http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/bcgs/bcgs.c, I see that there should be two for each iteration of do loop. Can this 3-d call happen due to the monitoring routines? Yes, -ksp_monitor_true_residual

Re: [petsc-users] segmentation error

2015-01-25 Thread Jed Brown
Dave May dave.mayhe...@gmail.com writes: This type of bizarre unexplainable behaviour usually indicates memory corruption. For example: an illegal read of write from an array. I suggest you run your code through valgrind to rule this out. Also, I would recommend you modify and annotate your

Re: [petsc-users] Two variants of PETSc, debugging on and off

2015-01-23 Thread Jed Brown
Luc Berger-Vergiat lb2...@columbia.edu writes: Configure once with $PETSC_ARCH=arch-dbg, --with-debugging=1 and once with $PETSC_ARCH=arch-opt, --with-debugging=0 Then you can switch environment variables approprately Note: the environment variables have to influence the way your program

Re: [petsc-users] Output matrix in CSR format

2015-01-20 Thread Jed Brown
Chung-Kan Huang ckhua...@gmail.com writes: Hi, I am trying to output the matrix but when I looked at PetscViewerSetFormat It doesn't seem to provide ways to output matrix in CSR format. Am I looking at the right place? It is a (binary) CSR format. There is no standard CSR file format.

Re: [petsc-users] Conversion between AIJ BAIJ

2015-01-20 Thread Jed Brown
Chung-Kan Huang ckhua...@gmail.com writes: Hi, Does PETSc provide means for conversion between AIJ BAIJ. Did you try MatConvert? My matrix is created as AIJ because it makes life easy for most part of the applications Why does the assembly code know what format it is assembling? All the

Re: [petsc-users] error

2015-01-13 Thread Jed Brown
siddhesh godbole siddhesh4godb...@gmail.com writes: hello, i am not able to initiate multiple processes through mpiexec , when i do that, i get following error on example problems in ksp iitm@iitm:~/Downloads/petsc-3.5.2/src/ksp/ksp/examples/tutorials$ mpiexec -n 3 ex1 Assuming ex1 does

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: Fieldsplit block preconditioners can be used on this type of matrix, but success obviously depends on the analytic character of the operators. In particular, if we assume that we have great PCs for the diagonal, then B is the most important variable,

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Jed Brown
Umut Tabak u.ta...@tudelft.nl writes: Thx for the swift reply, well, you mean directly or iteratively? I looked a bit more but I am not sure if that is possible iteratively or not, I guess it is not since the character of the blocks on the diagonal are not well suited to iterative solution

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: I don't like this business of ISes holding pointers to other ISes. This fundamentally changes the model. The hashing sounds workable. ISs are immutable and a reference would probably be held anyway, so I don't think it's evil. We also have to think

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Jed Brown
Colin McAuliffe cjm2...@columbia.edu writes: I'd be interested in implementing this, I think I should have some time to spend on it in a few weeks. I suppose the ISSubset function should determine which ISs were used to make up a third IS? Can this be done by having ISSum attach a list of

Re: [petsc-users] Recursive field split with MatNest

2015-01-11 Thread Jed Brown
Colin McAuliffe cjm2...@columbia.edu writes: Dear all, I have a four field problem with dof structure stored in a DM shell. The matrix is a MatNest. This works fine except for when I try to group fields. Colin, MatGetSubMatrix_Nest does not implement the case of unions of index sets. The

Re: [petsc-users] Lumped matrix

2015-01-06 Thread Jed Brown
Eric Chamberland eric.chamberl...@giref.ulaval.ca writes: Hi, We are asking ourselves what would be the most efficient way to create/do assembly/solve a problem involving a lumped matrix in PETSC? Lumping frequently comes from reduced quadrature, so you could simply use the reduced

Re: [petsc-users] PetscCommGetNewTag issue

2015-01-06 Thread Jed Brown
Fande Kong fd.k...@siat.ac.cn writes: Hi all, I make a very simple code, but run into some error messages. Code: #include petsc.h static char help[] = simple test.\n\n; #undef __FUNCT__ #define __FUNCT__ main int main(int argc,char **argv) { PetscMPIInt tag = 0;

Re: [petsc-users] Petsc installation with Elemental 0.85

2015-01-05 Thread Jed Brown
Ghosh, Swarnava sghosh2...@gatech.edu writes: Hello, I am trying to install petsc 3.4.5 with Elemental 0.85 using the following command: ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-f-blas-lapack=1 --download-mpich --download-cmake

Re: [petsc-users] no decrease in iteration counts of KSPCG during time stepping

2014-12-29 Thread Jed Brown
Alp Kalpalp alpkalp...@gmail.com writes: Thanks for the answers, Jed, PCPG stands for Preconditioned Acronyms like PCG were outdated before I was born, much like digital computer. All Krylov methods in PETSc are preconditioned; let's not contribute to meaningless acronyms. Conjugate

Re: [petsc-users] no decrease in iteration counts of KSPCG during time stepping

2014-12-28 Thread Jed Brown
Alp Kalpalp alpkalp...@gmail.com writes: Thanks for the answers, Please forgive me, I forgot to say that my stiffness matrix is not changing during time steps. I could not remember directly but just after a google search..I just hit this

Re: [petsc-users] no decrease in iteration counts of KSPCG during time stepping

2014-12-28 Thread Jed Brown
Umut Tabak u.ta...@tudelft.nl writes: Preconditioner side: my experience was that one should be really lucky to get a good preconditioner which is really really rare, as mentioned, especially for ill-conditioned problems, almost impossible. If my condition number estimate is above, say, 1e4

Re: [petsc-users] no decrease in iteration counts of KSPCG during time stepping

2014-12-28 Thread Jed Brown
Alp Kalpalp alpkalp...@gmail.com writes: In FETI, system is replaced with a coarse problem of dual variables Not a coarse problem (those are removed in the standard FETI-DP formulation), but the Lagrange multipliers defining an interface problem. BDDC is a primal version with the same

Re: [petsc-users] MatAXPY not working as expected

2014-12-21 Thread Jed Brown
Christoph Pohl metal-gear-...@web.de writes: Dear fellow PETSc users, I've been trying to subtract one matrix from another, i.e. Y = Y - X, using `call MatAXPY(Y, minus_one, X, SAME_NONZERO_PATTERN, ierr)`. You can only use SAME_NONZERO_PATTERN pattern if the matrices have the same nonzero

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: Dear petsc-users, I'm trying to setup matrices and data structures for use with MatGetLocalSubMatrix, but I'm rather lost in a world of ISes and block sizes. I have the layouts and so forth correct where all my fields have block

Re: [petsc-users] Why is PETSC_COMM_WORLD changed?

2014-12-19 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: Hello, I have a piece of code that looks like that: // PETSC_COMM_WORLD = MPI_COMM_WORLD; PetscBool petscIsInitialized; PetscInitialized(petscIsInitialized); if (not petscIsInitialized) { PetscErrorCode ierr; std::cout

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: What is ISSetBlockSize for then? Just hanging information on the IS for use elsewhere? The index set would need to be contiguous: static PetscErrorCode ISSetBlockSize_Stride(IS is,PetscInt bs) { IS_Stride *sub =

Re: [petsc-users] Trying to apply FieldSplitPC by reading bloc matrix

2014-12-19 Thread Jed Brown
Gilles Steiner gilles.stei...@epfl.ch writes: Hello Petsc Users, I have an issue trying to use FiledSplitPC in parallel. My goal : I want to get a linear system from petsc binary files and solve this in parallel with the FieldSplitPC. The problem I want to solve is an FE approximation of

Re: [petsc-users] PETSc and some external libraries configured with CMake?

2014-12-19 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Jed, I want to use CMake for a package that dependents on PETSc. It seems work this morning. Sounds like you're set. You can use my FindPETSc.cmake if you want. signature.asc Description: PGP signature

Re: [petsc-users] PETSc and some external libraries configured with CMake?

2014-12-17 Thread Jed Brown
UK paulhuaizh...@uky.edu writes: Hi All, Does anyone have the experience of using cmake to get some out-of-source libraries to work with PETSc? Your help is highly appreciated it. Can you be more precise? You built some package and you want PETSc to use it, or you want to use CMake for a

Re: [petsc-users] Checkpointing / restart

2014-12-14 Thread Jed Brown
Lisandro Dalcin dalc...@gmail.com writes: We can experiment in this code with some extra APIs to let users specify the initial derivative. What about TSAlphaSetSolution(ts,U,V) and TSAlphaGetSolution(ts,U,V), where U and V are the initial solution and derivative vectors? For multistep

Re: [petsc-users] Changing TSAdapt

2014-12-11 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Miguel, Thanks for reporting this, you have found a bug in our code. When we changed the adapt type we did not zero out the function pointers for the old basic adaptor hence they were improperly called when the object was finally destroyed at

Re: [petsc-users] reference, copy or constant view?

2014-12-10 Thread Jed Brown
Andrew Spott ansp6...@colorado.edu writes: In the slepc and petsc docs, is there a way to tell if a function is going to copy, modify, or just “look” at a petsc object that is a parameter? Specifically there are two examples that I’m curious about (I’m trying to chase down a bug):

Re: [petsc-users] reference, copy or constant view?

2014-12-10 Thread Jed Brown
Andrew Spott ansp6...@colorado.edu writes: Thanks for the help regarding etags.  I used to have them set up, I’ll have to reconfigure them. Actually, do call ESPSetOperators so that EPS knows…. Unfortunately this just confused me more.  Am I reading this correctly in that doing:

Re: [petsc-users] petsc solver

2014-12-08 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Hi all, I was wondering if PETSc has a point implicit method solver or similar implemented. -pc_type pbjacobi signature.asc Description: PGP signature

Re: [petsc-users] reconfigure after pull?

2014-12-06 Thread Jed Brown
Alp Kalpalp alpkalp...@gmail.com writes: Hi, How to understand that I should reconfigure after a git pull? It is usually not necessary, but may be necessary if changes in config/ are relevant to you. You can see the changes to config/ with $ git pull $ git log --stat ORIG_HEAD.. --

Re: [petsc-users] Question about preallocation and getOwnership functions

2014-12-04 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: After reading some documentation, I figured it out myself. MATAIJ can be MATSEQAIJ or MATMPIAIJ, depending on the number of processors involved. Thus, I need to include the command MatSeqAIJSetPreallocation as well, to cover both cases. Or call

Re: [petsc-users] Question about preallocation and getOwnership functions

2014-12-04 Thread Jed Brown
Young, Matthew, Adam m...@bu.edu writes: Is there an advantage to using MatXAIJSetPreallocation (as Jed suggested) or either of the SEQ/MPI preallocation routines (as Hui originally considered) instead of calling MatSetUp to cover all cases? If you don't preallocate, MatSetUp guesses:

Re: [petsc-users] Parallelization efficiency diagnose

2014-12-04 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: Estimation of possible speedup of MPI programs based on Streams benchmark. It appears you have 1 node(s) Does this result basically says that my MacBook only have one node? However, I know my computer has 4 cores, as I type sysctl -n hw.ncpu in bash, it

Re: [petsc-users] Parallelization efficiency diagnose

2014-12-04 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: Thank you Jed. I don't know how to use lstopo from the hwloc, A search engine will solve that problem. but I looked up the cores and memory from the hardware overview from my MAC, it has Number of Processors: 1 Total Number of Cores:2 Besides,

Re: [petsc-users] computation of Sp for fieldsplit schur preconditioner

2014-12-03 Thread Jed Brown
Luc Berger-Vergiat lb2...@columbia.edu writes: Hi all, I would like to know if there would be an easy way of computing the Sp preconditioner for a fieldsplit schur complement using the following formula: Sp=A11-A10*diag(inv(A00))*A01 instead of Sp=A11-A10*inv(diag(A00))*A01 Not in

Re: [petsc-users] how to use external solvers

2014-12-03 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: Hello, I try to use external packages such as umfpack or superlu, which are listed here: http://www.mcs.anl.gov/research/projects/petsc/documentation/linearsolvertable.html I have PETSc compiled and installed with those external packages. Presumably I

Re: [petsc-users] all eigen values

2014-12-02 Thread Jed Brown
Jose E. Roman jro...@dsic.upv.es writes: SLEPc is intended for large-scale eigenproblems, where you compute only part of the eigenvalue/eigenvector pairs because computing/storing all of them would be unaffordable. For small-medium problems use LAPACK or ScaLAPACK. Or Elemental

Re: [petsc-users] interpolate staggered grid values in parallel

2014-12-01 Thread Jed Brown
Bishesh Khanal bishes...@gmail.com writes: Ok, I now see that KSPGetSolution(ksp, x) gives a GLOBAL vector in x and not a local vector; hence the runtime memory error above since I can't access ghost values in indices such as [i-1] wth the global vec. Was there any reason not to make this

Re: [petsc-users] running error

2014-12-01 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Hi Jed, Does this mean I've passed the default test? It's an MPI test. Run this to see if PETSc solvers are running correctly: make PETSC_DIR=/home/hzh225/LIB_CFD/nP/petsc-3.5.2 PETSC_ARCH=linux-gnu-intel test Is the open matplotlib an issue?

Re: [petsc-users] running error

2014-12-01 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Hi Jed, Now I see PETSc is compiled correctly. However, when I attempted to call petscksp.h in my own program (quite simple one), it failed for some reason. Attached you can see two cases. The first is just the test of MPI, which is fine. The

Re: [petsc-users] can't find PETSc package

2014-12-01 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Some error messages attached. -- Detecting CXX compiler ABI info - done CMake Error at /share/cluster/RHEL5.4/x86_64/apps/cmake/2.8.4/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE): PETSc could not be found. Be sure to

Re: [petsc-users] can't find PETSc package

2014-12-01 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Like this? still in trouble though... CMAKE_MINIMUM_REQUIRED(VERSION 2.8) set(PETSC_DIR /home/hzh225/LIB_CFD/nP/petsc-3.5.2) If you're going to manually set local paths in your build files, then CMake is definitely a waste of time. These are

Re: [petsc-users] can't find PETSc package

2014-12-01 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Sounds like a warning, is it serious? No, as explained in the message. -- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes -- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes - Success -- PETSc requires extra include paths, but

Re: [petsc-users] running error

2014-11-30 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Hello, I compiled the newest version of petsc-3.5.2 and tried to test an example code with it. I could managed the compilation, but as I ran the sample, some error popped out. Could you please have a check? (files attached. I did search the issue

Re: [petsc-users] running error

2014-11-30 Thread Jed Brown
Please keep the discussion on-list. paul zhang paulhuaizh...@gmail.com writes: I set some breakpoints, which shows the code breaks down at the PetscInitialize(argc,argv,(char *)0,help); Run in a debugger and send a stack trace. This is most likely due to a misconfigured environment/MPI.

Re: [petsc-users] wrong no of nonzeros

2014-11-29 Thread Jed Brown
Derek Gaston fried...@gmail.com writes: I am changing the stencil of my preconditioning matrix in the middle of a solve a solve... and I'm running into this: Can you PCReset() after changing the stencil? The implementation of MatGetSubMatrices_MPIAIJ caches some intermediate structures to

Re: [petsc-users] wrong no of nonzeros

2014-11-29 Thread Jed Brown
Derek Gaston fried...@gmail.com writes: BTW: Ignore Jed's gibberish about PCReset(), you've got no business messing with that. Hah - will do. :-) Yeah, my reply was premature and crappy. This should be handled correctly without shenanigans. signature.asc Description: PGP signature

Re: [petsc-users] User-defined residual norm calculation in PETSC solvers

2014-11-27 Thread Jed Brown
Kirill Voronin kvoro...@labchem.sscc.ru writes: Hello! Thanks Matthew Knepley and Barry Smith for the answers to my previous questions! I am solving Ax = b with PETSC BiCGStab with user-defined preconditioner and want to compare it with other iteration process. The question is 1) Is

Re: [petsc-users] Problem with PETSc + HDF5 VecView

2014-11-27 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: The only concern is that the user might not exceed that depth, so why should they have to set an arbitrary and excessively big value? We could check the value of the environmental variable and print the error message when the error occurs and is

Re: [petsc-users] Problem with PETSc + HDF5 VecView

2014-11-26 Thread Jed Brown
Håkon Strandenes haa...@hakostra.net writes: My local HPC group have found a solution to this problem: On MPT it is possible to set an environment variable MPI_TYPE_DEPTH with default value 8. The MPI_TYPE_DEPTH variable limits the maximum depth of derived datatypes that an application can

Re: [petsc-users] Convergence of transposed linear system.

2014-11-26 Thread Jed Brown
Gaetan Kenway gaet...@gmail.com writes: The untransposed system converges about 6 orders of magnitude with GRMES(100), ASM (overlap 1) and ILU(1) with RCM reordering. The test is run on 128 processors. There are no convergence difficulties. However, when I try to solve the transpose of the

Re: [petsc-users] Problem with PETSc + HDF5 VecView

2014-11-26 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: On Nov 26, 2014, at 3:35 PM, Håkon Strandenes haa...@hakostra.net wrote: Is it really PETSc's taks to warn about this? PETSc should trust HDF5 to just work and HDF5 should actually print sensible warnings/error messages. Shouldn't it? Yes, but

Re: [petsc-users] Viewing solution of unstructured grid

2014-11-25 Thread Jed Brown
Orxan Shibliyev orxan.shi...@gmail.com writes: Hi I have an unstructured grid formed with DMPLEX. There are several DOFs associated with the grid such as density, pressure and so on. I would like to view the densities (preferably with Tecplot) on each node. How can I do that? View with

Re: [petsc-users] Indefinite PC

2014-11-24 Thread Jed Brown
Anush Krishnan k.an...@gmail.com writes: And is it possible to generate an indefinite preconditioner from a matrix that is symmetric positive definite (I remember seeing a thread about this recently)? See, for example, Kershaw's matrix in src/ksp/pc/examples/tutorials/ex1.c. signature.asc

Re: [petsc-users] PCFieldSplit field ksp diverging - kill outer ksp

2014-11-23 Thread Jed Brown
Welland, Michael J. mwell...@anl.gov writes: I'm using PCFieldSplit with 2 fields, and sometimes the ksp solver for one of those fields diverges. Is it possible to have it immediately kill the outer ksp solver when this happens? I can't think of a nice way. You could set a convergence test

Re: [petsc-users] AIJ asembly from AIJs

2014-11-23 Thread Jed Brown
Dave May dave.mayhe...@gmail.com writes: PETSc team, seems the webpages http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqAIJGetArray.html http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqAIJRestoreArray.html both contain a typo. The input matrix

Re: [petsc-users] Pipelined solvers PIPECG etc fail

2014-11-20 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: These are very new, so there could be bugs lurking. It would help our testing if this is reproducuble on a standard example. Does this happen if you try to solve KSP ex2 or SNES ex5 with PIPECG? I can reproduce. PIPECG has evidently been broken

Re: [petsc-users] Pipelined solvers PIPECG etc fail

2014-11-20 Thread Jed Brown
Sascha Schnepp m...@saschaschnepp.net writes: The issue could be related to this code in KSPCreate_PIPECG ierr = KSPSetSupportedNorm(ksp,KSP_NORM_UNPRECONDITIONED,PC_LEFT,2);CHKERRQ(ierr); ierr = KSPSetSupportedNorm(ksp,KSP_NORM_PRECONDITIONED,PC_LEFT,2);CHKERRQ(ierr); ierr =

Re: [petsc-users] Custom line search for predictor-corrector

2014-11-19 Thread Jed Brown
Harshad Sahasrabudhe hsaha...@purdue.edu writes: Hi, I want to implement a Predictor-Corrector algorithm for solving a coupled Schrödinger-Poisson system using SNES. I can calculate the next step using my predictor algorithm and don't want PETSc to calculate the next step. I only need PETSc

Re: [petsc-users] matrix assembly

2014-11-17 Thread Jed Brown
Fande Kong fd.k...@siat.ac.cn writes: Hi all, If I do a matrix assembly with the flag MAT_FLUSH_ASSEMBLY, will it involve any communications across processors? Yes, that's the point of this assembly mode. You call it to flush the stash of values that need to be sent to other processes, to

Re: [petsc-users] MatSolve in CG

2014-11-15 Thread Jed Brown
De Groof, Vincent Frans Maria vincent.de-gr...@uibk.ac.at writes: Dear all, I am writing a few variations on the PCG algorithm. Starting with my own PCG implementation, I noticed that my routine is quite a bit slower (~20%). I think I tracked it down to the MatSolve calls in PCApply. I am

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-12 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: So is the problem that the nullspace belongs to the appropriate operator, but at the point you tell the solver, you don't necessarily have all the operators to hand? Moreover, depending on the PC choice, the nullspaces of the operator

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-12 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Perhaps we need a generic way of attaching null spaces to parts of matrices and to parts of matrices in different basis (which is what a Schur complement is). So (and this is likely overly simplistic) one could supply a null space, an index

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-12 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Indeed it could. Perhaps we could start by unifying the concept of a sub matrix and a Schur complement of the same part of the matrix? I'm not sure how to do that. We can certainly define an interface that works this way, but I'm not sure it's

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-12 Thread Jed Brown
Dmitry Karpeyev karp...@mcs.anl.gov writes: I think the problem-specific solver configuration can be carried out by an additional user-specified callback (attached, e.g., using PCSetUserSetUp()) called from PCSetUp(). The problem of propagating it down the hierarchy can be solved by using DMs

Re: [petsc-users] PETSC for symmetric SLAE

2014-11-11 Thread Jed Brown
Kirill Voronin kvoro...@labchem.sscc.ru writes: Hello everyone! Can anyone help with the following question - if I am solving a symmetric SLAE (both structure and values), is it possible to store only the upper trinagular part of the matrix and apply all PETSC routines like KSPsolve etc.?

Re: [petsc-users] Multiple solves with PCMG fail

2014-11-11 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: I'm stupid: somehow I was in master and didn't notice that. Sorry for the confusion. The branch 'mark/ksp-zero-eig' has been merged to 'master' now. signature.asc Description: PGP signature

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-11 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: OK, so it's sounds like this is probably a deliberate choice. I note that the code currently does this: fieldsplit.c:703 ierr = MatSetFromOptions(jac-schur);CHKERRQ(ierr); ierr = MatGetNullSpace(jac-pmat[1],

Re: [petsc-users] Nullspaces for schur complement PCs

2014-11-10 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: at which point the nullspace is not attached, no? Crap, that is right. I think we should propagate the nullspace from pmat[1]. Uh, there is no reason pmat[1] can be expected to have the same null space. pmat[1] is the zero matrix in some important

Re: [petsc-users] Matrix Create

2014-11-07 Thread Jed Brown
吕超 luc...@mail.iggcas.ac.cn writes: Dear all, Now, I need create a big matrix, but only some rows have values, other rows are all 0. The spy of the matrix looks like the figure below. You can create a matrix like this, but the default distribution is for balancing rows.

Re: [petsc-users] Using a Matrix Shell with SLEPc

2014-11-07 Thread Jed Brown
Miguel Arriaga miguelarriagaecu...@gmail.com writes: Hi there, I have a matrix shell where the Mult operation looks like this: y=1/2(K+K*) x with K=M^-1 A and K* its transpose. 1- For setting-up the operation MatMult, since I need to do a KSPSolve on M, should I set-up the KSP on the

Re: [petsc-users] Using a Matrix Shell with SLEPc

2014-11-07 Thread Jed Brown
Miguel Arriaga miguelarriagaecu...@gmail.com writes: Hi, Thank you so much for your reply. 1 One note that I forgot to mention is that I'm using FORTRAN (sorry!). Is it possible to set up the context to pass M and the ksp for M? I also try to avoid common blocks but in this case it seemed

Re: [petsc-users] Speed up KSPSolve of dense matrix

2014-11-06 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: I'm more or less aware of that, but I'm surprised that the performance is such poor. If you've ever written a naive triply-nested loop dgemm, you'd know that it gives up orders of magnitude. I changed the format of matrixC to dense now, but the

Re: [petsc-users] Error message of nnz cannot be greater than block row length from MatSetValues()

2014-11-06 Thread Jed Brown
Evan Um eva...@gmail.com writes: Dear PETSC users, I hope that I can have a comment about errors I got during sparse symmetric matrix construction. In this example, I used three processes. The size of a test matrix is 52105-by-52105. The length of array d_nnz and o_nnz is 17461 at rank 0,

Re: [petsc-users] Error message of nnz cannot be greater than block row length from MatSetValues()

2014-11-06 Thread Jed Brown
Evan Um eva...@gmail.com writes: Dear Jed, Thanks for your help many times. These numbers mean the total number of elements to be added using MatSetValues(). For example, at process 0, 148767+5821 elements are added to matrix B. In other words, the length of arrays (i.e.

Re: [petsc-users] Error message of nnz cannot be greater than block row length from MatSetValues()

2014-11-06 Thread Jed Brown
Evan Um eva...@gmail.com writes: Dear Jed, In my problem, each process has a part of contiguous rows of matrix B. In this partitioned matrix, locations of non-zero elements are irregular because it is a part of unstructured matrix. It is hard to define the distribution of a vector that the

Re: [petsc-users] Multiple solves with PCMG fail

2014-11-04 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: Sorry for the late update. I tested the code with the branch: ksp-zero-eig But the problem seems to still be there, also tried: -ksp_chebyshev_estimate_eigenvalues_random but does not change. These are probably on levels, like

Re: [petsc-users] VecView in Ascii VTK mode

2014-11-04 Thread Jed Brown
Norihiro Watanabe norihir...@gmail.com writes: as far as I read http://www.vtk.org/VTK/img/file-formats.pdf, there is no comment marker in ASCII VTK format. Note that for any use beyond the simplest debugging, you should use the VTK XML formats of PETSCVIEWERVTK. Write to *.vtr or *.vts for

Re: [petsc-users] Speed up KSPSolve of dense matrix

2014-11-04 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: I've tried to use a direct solver like suggested on pp 72, but: ./petBench 600 1 -ksp_type preonly -pc_type lu You cannot use LU with SBAIJ format. Only Cholesky. So use -pc_type cholesky And using a sparse matrix format for a dense matrix is a

Re: [petsc-users] TS_SUNDIALS/TS_PSEUDO overshoots the final time

2014-10-31 Thread Jed Brown
Gautam Bisht gbi...@lbl.gov writes: Hi Jed, On Thu, Oct 30, 2014 at 9:22 PM, Jed Brown j...@jedbrown.org wrote: Gautam Bisht gbi...@lbl.gov writes: All, While running src/ts/examples/tutorials/ex8.c (in PETSc 3.5.1) for TSTYPE sundials and pseudo, I noticed that the solver

Re: [petsc-users] TS_SUNDIALS/TS_PSEUDO overshoots the final time

2014-10-30 Thread Jed Brown
Gautam Bisht gbi...@lbl.gov writes: All, While running src/ts/examples/tutorials/ex8.c (in PETSc 3.5.1) for TSTYPE sundials and pseudo, I noticed that the solver overshoots the final time. Is this what you're looking for?

Re: [petsc-users] How to use PETSc4py/SLEPc4py to solve an eigenvalue problem in parallel

2014-10-29 Thread Jed Brown
Mengqi Zhang joll...@gmail.com writes: It seems that the parallel running doesn't work, the elapsed time is roughly the same. http://www.mcs.anl.gov/petsc/documentation/faq.html#computers You see that in the process of assembling the matrix in the parallel case, the two cores are working

Re: [petsc-users] Creating a symmetric matrix with the upper triangular elements

2014-10-29 Thread Jed Brown
Evan Um eva...@gmail.com writes: PETSC users, As memory is at a premium in my problem, I want to compute only the upper triangular elements of a matrix and then construct a parallel sparse symmetric matrix. In this case, do I have to use MatSetOption

Re: [petsc-users] Multiple solves with PCMG fail

2014-10-28 Thread Jed Brown
Mark Adams mfad...@lbl.gov writes: OK, so the first time there is no RHS and so not eigen estimate and the next solves do not check to see if a valid eigen estimate has been created. I think so. I'm hoping Filippo will confirm. Jed: could we just check for zero iterations in the eigen

Re: [petsc-users] Adaptive controllers in TS

2014-10-28 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Sorry to be pushy, but could anyone help me on this? Your last email didn't have a specific question, so I'm not sure how to answer. What you want to do is possible, but not trivial and might require library modifications to avoid

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Tue, Oct 28, 2014 at 10:34 AM, Rongliang Chen rongliang.c...@gmail.com wrote: Hello, I have a very elementary question. I am trying to learn the PETSc finite volume method codes. Can you tell me which book did you refer to for the PETSc FVM?

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen rongliang.c...@gmail.com writes: Thanks Matt and Jed, I am trying to write a parallel FVM code on unstructured grid for compressible NS equations. I found that the finite volume code on the structured mesh is easy to write but for the unstructured mesh, it is really

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
Tabrez Ali st...@geology.wisc.edu writes: Matt and Jed But it does appear to work well in practice (as in I get the correct solution). Your correct solution has a residual seven orders of magnitude bigger than the initial guess. Does that not give you pause? signature.asc Description:

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen rongliang.c...@gmail.com writes: Hi Jed, I am solving the 3D compressible Navier-Stokes equations. I have read the ex11.c for several days and still do not fully understand this. I will look at the older version as you suggested. Maybe I need to go to your office to ask

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
Tabrez Ali st...@geology.wisc.edu writes: Jed You're right and it is precisely what I am trying to understand as well. I am attaching the comparison to the analytical solution. As you can see the agreement is almost perfect, except at the discontinuity (y=0 in the analytical solution).

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen rongliang.c...@gmail.com writes: Yes. I am at CU Boulder. I will read the Berger paper first, and then if possible, I will go to your office to talk with you when you are free. I can meet before 5pm this afternoon or tomorrow any time other than 12-1pm. Note that the example

Re: [petsc-users] TSSetIJacobian is never called

2014-10-27 Thread Jed Brown
Sharp Stone thron...@gmail.com writes: Hi Matt, Thank you very much for your reply. The ts_view output is attached below. I found my code results say SNES has not been set up, and PC has not been set up. Does this cause the problem? If so I do not see example ex17 explicitly set up the

Re: [petsc-users] Multiple solves with PCMG fail

2014-10-27 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: On Oct 23, 2014, at 1:32 AM, Filippo Leonardi filippo.leona...@sam.math.ethz.ch wrote: Tested on this branch: the program no longer crashes, but the solution is actually still wrong. Yes, we never said that this fixed the problem. Jed ?

Re: [petsc-users] TSSetIJacobian is never called

2014-10-27 Thread Jed Brown
Sharp Stone thron...@gmail.com writes: Hi Matt, That is why we asked this. We do not think the calculation of DAE F-functions are wrong. But even if the F-functions are not accurate, we expect the TS solver would still call TSSetIJacobian(), but actually it does not call TSSetIJacobian()

Re: [petsc-users] Multiple solves with PCMG fail

2014-10-27 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: -ksp_chebyshev_estimate_eigenvalues_random Can try this but the problem, to me, seems deeper (because inherited from each solve afterwards). Are you changing the operator between solves? Or just solving different right-hand sides?

Re: [petsc-users] Handling dense matrices in RBF interpolation

2014-10-24 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: Hello, I am redoing an radial basis function interpolation algorithm using petsc in our software. Using basis function with compact carrier is blazingly fast. These basis function result in sparse matrices. ierr = MatSetType(matrixC,

Re: [petsc-users] unreliable AMG in PETSc

2014-10-23 Thread Jed Brown
Arne Morten Kvarving arne.morten.kvarv...@sintef.no writes: thanks for educating me! i wasn't aware richardson could break definiteness. This is usually caused by the Richardson parameter being too aggressive. An analogous breakdown occurs with Chebyshev when the eigenvalue estimate is too

Re: [petsc-users] unreliable AMG in PETSc

2014-10-23 Thread Jed Brown
Arne Morten Kvarving arne.morten.kvarv...@sintef.no writes: On 23/10/14 15:53, Jed Brown wrote: hi jed, Arne Morten Kvarving arne.morten.kvarv...@sintef.no writes: Do you mean if the matrix is _not_ marked SPD? Interestingly, CG is no i mean to warn if the matrix is marked SPD, main KSP

Re: [petsc-users] unreliable AMG in PETSc

2014-10-23 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: It is any interesting question if there is anything one can “do” to a preconditioner to insure that it is SPD or detect if it may not be BEFORE actually running the CG with that preconditioned. You can use an eigensolver for the extreme

<    8   9   10   11   12   13   14   15   16   17   >