Re: [petsc-users] [SLEPc] Get convergence metrics

2014-11-07 Thread Alexander Grayver
Jose, thank you. I will use a custom monitor.AlexOn Thu, 6 Nov 2014 18:23:58 +0100 "Jose E. Roman" wrote:> > El 06/11/2014, a las 17:48, Alexander Grayver escribió:> >> Dear all,>> >> I'm wondering if there is a way in SLEPc to get >>different con

[petsc-users] [SLEPc] Get convergence metrics

2014-11-06 Thread Alexander Grayver
Dear all,I'm wondering if there is a way in SLEPc to get different convergence metrics for EPS/SVD.In particular, I was thinking about plotting "# matrix-vector products" versus "# converged eigenpairs". But how to get this information?I want to test different methods and what interests me is how

[petsc-users] KSPSolve crashes with petsc-3.5.1

2014-08-11 Thread Alexander Grayver
Dear PETSc devs,I am getting the following error with petsc-3.5.1:[0]PETSC ERROR: - Error Message --[0]PETSC ERROR: Null argument, when expecting valid pointer[0]PETSC ERROR: Null Object: Parameter # 1[0]PETSC ERROR: Se

[petsc-users] copy vector between communicators

2014-02-10 Thread Alexander Grayver
Hello, I need to have a copy of a vector created on the communicator COMM to another vector created on the communicator SUBCOMM (which is a subset of the COMM processes). Are there any standard functions that can help here? I assume VecScatter could help, but I am not sure how to use it here?

[petsc-users] LU factorization and solution of independent matrices does not scale, why?

2012-12-21 Thread Alexander Grayver
Thomas, I'm missing one point... You run N sequential factorizations (i.e. each has its own matrix to work with and no need to communicate?) independently within ONE node? Or there are N factorizations that run on N nodes? Jed, > MUMPS uses MPI_Iprobe on MPI_COMM_WORLD (hard-coded). Any reas

[petsc-users] valgrind complains about string functions

2012-12-04 Thread Alexander Grayver
Jed, Satish, suppression file is a nice option, thanks. On 03.12.2012 17:53, Satish Balay wrote: > On Mon, 3 Dec 2012, Alexander Grayver wrote: > >> Hello, >> >> I'm using PETSc-3.3-p4 compiled with ICC 12.0 + IntelMPI 4.0.3 and getting a >> bunch of the err

[petsc-users] valgrind complains about string functions

2012-12-03 Thread Alexander Grayver
Hello, I'm using PETSc-3.3-p4 compiled with ICC 12.0 + IntelMPI 4.0.3 and getting a bunch of the errors related to the string functions: ==22020== Conditional jump or move depends on uninitialised value(s) ==22020==at 0x4D3109: __intel_sse2_strcpy (in /home/main) ==22020==by 0xE87D51D: P

[petsc-users] Does PETSc take advantage of symmetry in iterative solvers

2012-11-12 Thread Alexander Grayver
On 12.11.2012 13:40, Jed Brown wrote: > The option does not change the format, but it does change some > defaults (e.g., it makes ASM symmetric instead of using RASM). If you > want to use a symmetric _format_, use MATSBAIJ. Jed, Thanks. Does it make sense that in fortran one has to call MatCre

[petsc-users] Does PETSc take advantage of symmetry in iterative solvers

2012-11-12 Thread Alexander Grayver
Hello, I remember similar question has been asked long time ago, but I can not find it. If I set MatSetOption(A,MAT_SYMMETRIC,PETSC_TRUE), does PETSc take this into account when doing MatMult or similar operations? As far as I can see it does not (I'm not sure I look at the right place though)

[petsc-users] How rto use multigrid?

2012-10-29 Thread Alexander Grayver
On 29.10.2012 13:49, w_ang_temp wrote: > Hello, Jed > I use the command: > mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type gamg -pc_gamg_agg_nsmooths > 1 -ksp_rtol 1.0e-15 -ksp_converged_reason > The error is as follows: > [0]PETSC ERROR: - Error Message > -

[petsc-users] Setting up MUMPS in PETSc

2012-10-24 Thread Alexander Grayver
Jinquan, As a rule of thumb, you should always try to run MUMPS on as few nodes as possible which have as much memory as possible. Given the same matrix, MUMPS requires more memory when run with, for instance, 4 process than with 2. You gain nothing trying thousands of processes without even l

[petsc-users] MatMatSolve for MUMPS disappeared?

2012-09-19 Thread Alexander Grayver
On 19.09.2012 13:17, Jed Brown wrote: > On Wed, Sep 19, 2012 at 2:52 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Is MatSolve in any way more efficient than KSPSolve? > As far as I understand for both cases one ends up with a loop over

[petsc-users] Problem with -pc_type gamg

2012-09-19 Thread Alexander Grayver
Randall, I can add few more practical notes on EM problem. GAMG doesn't work efficiently on curl curl problems because of mentioned (Jed's message) reasons. One would need to consider null-space explicitly as in [1] or [2]. Furthermore, even mild grid stretching slows down convergence thus sem

[petsc-users] MatMatSolve for MUMPS disappeared?

2012-09-19 Thread Alexander Grayver
On 18.09.2012 20:14, Hong Zhang wrote: > MatMatSolve_MUMPS() is never been supported. > It seems mumps support multiple rhs now. > If you need it, we can implement MatSolve_MUMPS(). Hi Hong, Thanks for reply. Is MatSolve in any way more efficient than KSPSolve? As far as I understand for both c

[petsc-users] MatMatSolve for MUMPS disappeared?

2012-09-18 Thread Alexander Grayver
Hello, Trying to use MatMatSolve in petsc-3.3-p3 results in: [0]PETSC ERROR: No support for this operation for this object type! [0]PETSC ERROR: MatMatSolve_MUMPS() is not implemented yet! The point is that in petsc-3.3-p2 it works like clocks. There was one issue with it for sequential mode tha

[petsc-users] MatMatSolve in sequential call

2012-08-22 Thread Alexander Grayver
On 22.08.2012 13:47, Jed Brown wrote: > On Wed, Aug 22, 2012 at 2:40 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > PARDISO can do this as well. > > > You are welcome to write an interface. I'm not interested in doing > that

[petsc-users] MatMatSolve in sequential call

2012-08-22 Thread Alexander Grayver
On 21.08.2012 22:37, Matthew Knepley wrote: > I was wrong, this is not nonsense. However, for curl curl the null > space grows with matrix dimension, and > as far as I can tell from the slides, the null space determination is > not scalable (Jack correct me if I am wrong). > Also, they gave no ti

[petsc-users] MatMatSolve in sequential call

2012-08-21 Thread Alexander Grayver
On 21.08.2012 18:32, Matthew Knepley wrote: > > MUMPS takes only several minutes and 6 GB of memory to factorize it. > This factorization gives residual on the order of 10e-12 and > solution is indeed correct. > > Nevertheless, you're right, there is numerical null-space in this >

[petsc-users] MatMatSolve in sequential call

2012-08-21 Thread Alexander Grayver
On 21.08.2012 18:14, Hong Zhang wrote: > Alexander : > > Testing your matrix A.dat > using petsc-3.3/src/ksp/ksp/examples/tutorials/ex10.c, > I find that A is numerically singular: Hong, Sorry, but I forgot to mention that this is double complex symmetric matrix. Did you load and treat it like

[petsc-users] Composite shell preconditiner

2012-08-18 Thread Alexander Grayver
Barry, This was my original idea before I started trying pccomposite stuff. I will stick to it, thank you for pointing it out. On 17.08.2012 22:34, Barry Smith wrote: > On Aug 17, 2012, at 8:54 AM, Alexander Grayver > wrote: > >> you want to compute c? >> I was pla

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
Jed, I do see the drawbacks of this method, but it seems to have good scalability. That I want to test. Thank you. On 17.08.2012 16:32, Jed Brown wrote: > On Fri, Aug 17, 2012 at 9:23 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Right. >

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
On 17.08.2012 16:03, Jed Brown wrote: > > Fine, sounds like you are doing divergence cleaning for an > incompatible spatial discretization. Since the change lies within the > null space of the intended continuous operator, you should be okay. > But note that this procedure is fragile and will ha

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
On 17.08.2012 15:45, Jed Brown wrote: > > > What I would like to do is very simple: every N iterations I want > to take current solution vector *x*_i from KSP and calculate: > *x*_i = *x*_i + *c*, > where *c* is a correction vector. > > > How do you want to compute c? I was plannin

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
On 17.08.2012 15:30, Jed Brown wrote: > > Sorry, I misinterpreted what you want. PC_COMPOSITE_MULTIPLICATIVE > re-evaluates the residual after applying the first stage of the > preconditioner. Do you _really_ want to just apply one preconditioner > after the next? You can use PC_COMPOSITE_SPECIA

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
On 17.08.2012 14:52, Jed Brown wrote: > > See this *ADDITIVE*? You are preconditioning with I+P_{SOR}. You > probably want multiplicative. Jed, It didn't work. -pc_type composite -pc_composite_pcs shell,sor -pc_composite_type multiplicative -> Linear solve did not converge due to DIVERGED_I

[petsc-users] Composite shell preconditiner

2012-08-17 Thread Alexander Grayver
Hello petsc team! I would like to apply some sort of correction during Krylov process every N iterations. So I decided to use composite preconditioner like that: -pc_type composite -pc_composite_pcs shell,sor/icc/gamg I've started to test with the simplest shell preconditioner that does nothin

[petsc-users] MatMatSolve in sequential call

2012-08-14 Thread Alexander Grayver
On 13.08.2012 19:01, Hong Zhang wrote: > Alexander : > I need a simple code from you to reproduce the error for debugging. Hong, Attached you will find test.c that should reproduce this behavior with petsc-3.3-p2. Just run it with 1 and 2 procs as following: ./mpirun -n 1 test -ksp_type preonly

[petsc-users] MatMatSolve in sequential call

2012-08-13 Thread Alexander Grayver
On 13.08.2012 17:23, Hong Zhang wrote: > Alexander : > Hmm, isrow is a matrix ordering, likely a bug :-( > Can you send us a stand-alone code that reproduces this error? Hong, I can try to pull it out, but this may be tricky. > Do you use an external package for MatMatSolve()? Yes, MUMPS. I use

[petsc-users] MatMatSolve in sequential call

2012-08-13 Thread Alexander Grayver
On 13.08.2012 16:54, Hong Zhang wrote: > On Mon, Aug 13, 2012 at 8:17 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Hello, > > Trying to call this routine on 1 proc: > > call MatMatSolve(F,B,solutions,ierr);CHKERRQ(ierr)

[petsc-users] MatMatSolve in sequential call

2012-08-13 Thread Alexander Grayver
Hello, Trying to call this routine on 1 proc: call MatMatSolve(F,B,solutions,ierr);CHKERRQ(ierr) I get following crash: [0]PETSC ERROR: - Error Message [0]PETSC ERROR: Null argument, when expecting valid pointer! [0]PETSC ERROR: Null Obj

[petsc-users] ubuntu default mpich gives error with parmetis

2012-07-18 Thread Alexander Grayver
.2012 11:49, Alexander Grayver wrote: > Hello PETSc team, > > Trying to configure petsc on ubuntu with installed mpich (apt-get > install mpich2) like that: > > ./configure --with-petsc-arch=mpich-gcc-double-debug-f > --with-fortran-interfaces=1 --download-mumps --download-met

[petsc-users] ubuntu default mpich gives error with parmetis

2012-07-18 Thread Alexander Grayver
Hello PETSc team, Trying to configure petsc on ubuntu with installed mpich (apt-get install mpich2) like that: ./configure --with-petsc-arch=mpich-gcc-double-debug-f --with-fortran-interfaces=1 --download-mumps --download-metis --download-scalapack --download-blacs --with-scalar-type=real --d

[petsc-users] Ambiguity of KSPCGNE

2012-06-22 Thread Alexander Grayver
Hi Barry, >> In this case the application of the method is quite restricted since all >> practical least squares problems formulated in form of normal equations are >> solved with regularization, e.g.: >> >> (A'A + \lamba I)x = A'b > Yes it is restrictive. There is no concept of lambda in CGNE i

[petsc-users] Ambiguity of KSPCGNE

2012-06-20 Thread Alexander Grayver
Hello, I'm a bit confused about the KSPCGNE. First of all, is CGLS^1 and implemented CGNE are the same (or I mix it up with CGNR)? I don't know what notation is more classical, but CGLS seems to be more common. It is claimed: */Applies the preconditioned conjugate gradient method to the normal

[petsc-users] -log_summary for MatMult

2012-06-15 Thread Alexander Grayver
On 15.06.2012 14:46, Matthew Knepley wrote: > On Fri, Jun 15, 2012 at 8:31 PM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Matt, > > According to that code: > > 486:*PetscErrorCode MatMult_MPIDense(Mat mat,Vec xx,V

[petsc-users] -log_summary for MatMult

2012-06-15 Thread Alexander Grayver
c,INSERT_VALUES,SCATTER_FORWARD); 494: MatMult_SeqDense(mdn->A,mdn->lvec,yy); 495: return(0); 496:} Each process has its own local copy of the whole vector vectors? On 15.06.2012 14:27, Matthew Knepley wrote: > On Fri, Jun 15, 2012 at 8:22 PM, Alexander Grayver > mailto:agrayve

[petsc-users] -log_summary for MatMult

2012-06-15 Thread Alexander Grayver
Hello, When I call MatMult with MPIDENSE matrix in log summary I see: EventCount Time (sec) Flops --- Global --- --- Stage --- Total Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %f %M %L %R %T %f %M

[petsc-users] Computation to communication ratio for PETSc's routines

2012-06-14 Thread Alexander Grayver
On 14.06.2012 13:14, Matthew Knepley wrote: > On Thu, Jun 14, 2012 at 3:09 AM, Barry Smith > wrote: > > > > Is there total amount of flops given for different operations > separately (I see max flops over all processes only)? > > Sadly no. My original pl

[petsc-users] Computation to communication ratio for PETSc's routines

2012-06-13 Thread Alexander Grayver
On 13.06.2012 13:24, Matthew Knepley wrote: > On Wed, Jun 13, 2012 at 6:45 PM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Hello, > > As stated, I would like to estimate computation to communication > ratio for PETSc's linear alge

[petsc-users] Computation to communication ratio for PETSc's routines

2012-06-13 Thread Alexander Grayver
Hello, As stated, I would like to estimate computation to communication ratio for PETSc's linear algebra routines (e.g. MatMult{Transpose}, MatPtAP, MatMatMult etc.) As far as I understand the ratio depends on particular implementation and number of processes one runs application on. So I guess

[petsc-users] Error message "Row/Column is too large"

2012-06-06 Thread Alexander Grayver
Hi, In case of SeqDense matrix the message if very usefull since prints the maximum and actual indices: MatSetValues_SeqDense() line 750 in /lib/petsc-dev1/src/mat/impls/dense/seq/dense.c if (indexn[j] >= A->cmap->n) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Column too large: col %D

[petsc-users] MatSetValues and values cache

2012-06-06 Thread Alexander Grayver
On 06.06.2012 13:06, Jed Brown wrote: > On Wed, Jun 6, 2012 at 5:22 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > In my program I assemble huge matrix (~500 millions of double > complex nnz) and all MatSetValues calls are done before >

[petsc-users] MatSetValues and values cache

2012-06-06 Thread Alexander Grayver
Hi, In my program I assemble huge matrix (~500 millions of double complex nnz) and all MatSetValues calls are done before MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY). I'm wondering if it makes sense to use MatAssemblyBegin(A, MAT_FLUSH_ASSEMBLY) in between? In docs it is said: >> MatSetValues

[petsc-users] mumps solve with same nonzero pattern

2012-04-28 Thread Alexander Grayver
This is not quite normal. Right now I'm dealing with 0.65 million problem and it takes 15 secs for symbolic factorization to be done using 64 cores (four 16x cores nodes). As Hong suggested you should try different ordering techniques. Usually metis is among the best (-mat_mumps_icntl_7 5). And

[petsc-users] mumps get stuck with parmetis

2012-04-24 Thread Alexander Grayver
t sure if this is related, but Parmetis+Mumps+PETSc 3.2 on BlueGene/P was causing similar behavior without even setting any options. ?The only way I was able to get a direct solver going was by switching over to SuperLU. A On Tue, Apr 24, 2012 at 10:01 PM, Alexander Grayver wrote: Can you set:

[petsc-users] mumps get stuck with parmetis

2012-04-24 Thread Alexander Grayver
Can you set: -mat_mumps_icntl_4 1 And send mumps output? Also do you use lu or ilu? How large is your matrix? Regards, Alexander - Reply message - From: "Wen Jiang" To: Subject: [petsc-users] mumps get stuck with parmetis Date: Tue, Apr 24, 2012 19:43 Hi, My code will hang at the sol

[petsc-users] PetscBinaryRead in matlab

2012-04-19 Thread Alexander Grayver
2012 17:12 On Thu, Apr 19, 2012 at 06:41, Alexander Grayver wrote: You're right, it is undefined. Your variant works. http://petsc.cs.iit.edu/petsc/petsc-dev/rev/71a0e13876ec -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/

[petsc-users] PetscBinaryRead in matlab

2012-04-19 Thread Alexander Grayver
On 19.04.2012 15:39, Jed Brown wrote: > Does replacing linspace with (1:2:2*m*n-1) work without floor? > > There isn't a guarantee that whatever rounding error committed by > linspace always rounds away from zero (so that floor sends it in the > right direction). You're right, it is undefined. Y

[petsc-users] PetscBinaryRead in matlab

2012-04-19 Thread Alexander Grayver
Trying to read double complex matrix output from PETSc using matlab function PetscBinaryRead I encountered a problem that is related to the rounding problem inside linspace function: These are sizes of a matrix: n = 1776; m = 54400; Trying to execute the code: iReal = linspace(1,n*m*2-1,n*m); i

[petsc-users] Separate MatAssemblyBegin/MatAssemblyEnd

2012-04-19 Thread Alexander Grayver
Is it used somewhere in PETSc? On 19.04.2012 12:10, Matthew Knepley wrote: > On Thu, Apr 19, 2012 at 6:07 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > I'm wondering what is the main idea behind making > XXXAssemblyBegin/XXXAss

[petsc-users] Separate MatAssemblyBegin/MatAssemblyEnd

2012-04-19 Thread Alexander Grayver
I'm wondering what is the main idea behind making XXXAssemblyBegin/XXXAssemblyEnd separate routines? I've never used and seen any example where these routines don't follow each other. -- Regards, Alexander

[petsc-users] MKL BLAS interface inconsistency

2012-04-05 Thread Alexander Grayver
against the > MKL libraries? > > > Dang, this is a bug with specifying --with-blas-lapack-lib, since it > all gets dumped in > self.lapackLib, then self.blasLib is empty. Pushed a fix to > BuildSystem. Testing now. > >Matt > > > Barry > > On

[petsc-users] MKL BLAS interface inconsistency

2012-04-05 Thread Alexander Grayver
On 05.04.2012 14:42, Matthew Knepley wrote: > On Thu, Apr 5, 2012 at 7:22 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > On 05.04.2012 14:13, Jed Brown wrote: >> On Thu, Apr 5, 2012 at 04:54, Alexander Grayver >> mailto:agra

[petsc-users] MKL BLAS interface inconsistency

2012-04-05 Thread Alexander Grayver
On 05.04.2012 14:13, Jed Brown wrote: > On Thu, Apr 5, 2012 at 04:54, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > The inconsistency is still there. I pulled petsc-dev today and > came across with the same problem: > > src/vec/vec/

[petsc-users] MKL BLAS interface inconsistency

2012-04-05 Thread Alexander Grayver
the mailing list discussions it was said there is now check for that. This check didn't work for me apparently. Any ideas why? Regards, Alexander On 19.01.2012 17:55, Alexander Grayver wrote: > This (dirty) patch solves the problem: > > diff -r a3e9ca59ab58 src/vec/vec/impls/seq/bv

[petsc-users] Convergence behavior of different solvers

2012-03-21 Thread Alexander Grayver
Ok, thank you for pointing me to this paper. On 21.03.2012 11:38, Jed Brown wrote: > On Wed, Mar 21, 2012 at 04:03, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Hello, > > Plotting values of relative residual norm versus iteration I >

[petsc-users] Convergence behavior of different solvers

2012-03-21 Thread Alexander Grayver
Hello, Plotting values of relative residual norm versus iteration I noticed that these curves have different behavior. For instance, ones I got with BiCGStab are oscillatory and rather noisy with large jumps within few iterations. Curves for QMR are smooth, however it's usual that they stagnat

[petsc-users] Specifying different ksp_types for multiple linear systems

2012-02-19 Thread Alexander Grayver
KSPSetOptionsPrefix/PCSetOptionsPrefix? On 19.02.2012 09:32, Max Rudolph wrote: > In my thermomechanical convection code, I set up and solve two linear > systems, the first for the Stokes system and the second for an energy > equation. Currently, these are separate matrices and during each times

[petsc-users] MKL BLAS interface inconsistency

2012-01-19 Thread Alexander Grayver
NITY) { The same is applied to mpi vector implementation from /petsc-dev/src/vec/vec/impls/mpi/pvec2.c Of course it works only if one uses Intel MKL BLAS/LAPACK and double complex arithmetics. Which is my case. On 19.01.2012 15:30, Alexander Grayver wrote: > Dear petsc team, > > I've been stru

[petsc-users] MKL BLAS interface inconsistency

2012-01-19 Thread Alexander Grayver
Dear petsc team, I've been struggling with this problem for a long time and seeking for your advice now. Let's take simple petsc program: #include int main(int argc,char **args) { Vecb; PetscReal norm; PetscInitialize(&argc,&args,(char *)0,NULL); VecCreateSeq(

[petsc-users] VecView() and binary output

2012-01-19 Thread Alexander Grayver
There is a header in the beginning of the file. The info in the header defines which object type is stored and its dimensions. The size of the header can vary depending on the stored object (Vec,Mat,etc) and type you use for indices (int32,int64). For Vec object and int32 you have one integer de

[petsc-users] Multiple output using one viewer

2012-01-11 Thread Alexander Grayver
Jed, Barry, Thank you for your advices. I restructured output and got rid of PetscViewerFileSetName by having several viewers and putting more things in one file. Regards, Alexander On 07.01.2012 03:58, Barry Smith wrote: > On Jan 6, 2012, at 6:51 AM, Alexander Grayver wrote: >

[petsc-users] How does KSPSetNullSpace() work?

2012-01-10 Thread Alexander Grayver
012 at 03:50, Alexander Grayver >> wrote: >> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetNullSpace.html >> >> You set nullspace without any particular information: >> >> ierr = MatNullSpaceCreate(PETSC_COMM_WORLD, PETSC_TRUE, 0, >> PETS

[petsc-users] How does KSPSetNullSpace() work?

2012-01-10 Thread Alexander Grayver
On 10.01.2012 04:57, Jed Brown wrote: > On Mon, Jan 9, 2012 at 22:47, Mohamad M. Nasr-Azadani > mailto:mmnasr at gmail.com>> wrote: > > It might be a naive question, but I am wondering how > KSPSetNullSpace() works when it is passed to a linear system ksp > context? > Say, for inst

[petsc-users] Convergence/accuracy degradation with increasing number of procs

2012-01-09 Thread Alexander Grayver
Thanks Matt, that was my guess actually. On 09.01.2012 17:46, Matthew Knepley wrote: > On Mon, Jan 9, 2012 at 10:37 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > I see this is due to preconditioner, but could you explain shortly > what par

[petsc-users] Convergence/accuracy degradation with increasing number of procs

2012-01-09 Thread Alexander Grayver
I see this is due to preconditioner, but could you explain shortly what particularly causes this problem? It's not obvious to me. Thanks. On 09.01.2012 17:36, Matthew Knepley wrote: > On Mon, Jan 9, 2012 at 10:31 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrot

[petsc-users] Convergence/accuracy degradation with increasing number of procs

2012-01-09 Thread Alexander Grayver
I have tested default GMRES+ILU(0) solver for problem of size ~20 and I observed that both convergence rate and accuracy degrade when I increase number of processes. E.g., number of iterations almost doubles when going from 1 to 4 processors. I noticed that ILU(0) is somehow represented by

[petsc-users] Multiple output using one viewer

2012-01-06 Thread Alexander Grayver
On 06.01.2012 13:45, Jed Brown wrote: > On Fri, Jan 6, 2012 at 03:09, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > This is not always convinient to store everything in one file, but > in some cases I do want to use it. I haven't found any ex

[petsc-users] Multiple output using one viewer

2012-01-06 Thread Alexander Grayver
On 06.01.2012 01:17, Barry Smith wrote: > On Jan 5, 2012, at 9:40 AM, Jed Brown wrote: > >> On Thu, Jan 5, 2012 at 09:36, Alexander Grayver >> wrote: >> Maybe this should be noted in the documentation? >> >> Yes, I think the old file should be closed (if it ex

[petsc-users] Multiple output using one viewer

2012-01-05 Thread Alexander Grayver
On 05.01.2012 16:34, Jed Brown wrote: > The (flawed) expectation was that you would only call that once. Maybe this should be noted in the documentation?

[petsc-users] Multiple output using one viewer

2012-01-05 Thread Alexander Grayver
On 05.01.2012 16:30, Jed Brown wrote: > On Thu, Jan 5, 2012 at 09:22, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > My question is whether all file handles are closed correctly when > I change file name? > > > No, they are not. You should

[petsc-users] Multiple output using one viewer

2012-01-05 Thread Alexander Grayver
Hello, To output many vectors I use following trick: call PetscViewerBinaryOpen(comm,'out',FILE_MODE_WRITE,viewer,ierr); CHKERRQ(ierr) call PetscViewerFileSetName(viewer,'A1.dat',ierr) call MatView(A1,viewer,ierr); CHKERRQ(ierr) call PetscViewerFileSetName(v

[petsc-users] Differential operators in PETSc

2012-01-04 Thread Alexander Grayver
discussion? Regards, Alexander On 03.01.2012 13:28, Jed Brown wrote: > On Tue, Jan 3, 2012 at 03:22, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > I want to implement general procedures to generate discretized > differential operators (like grad,

[petsc-users] Differential operators in PETSc

2012-01-03 Thread Alexander Grayver
Hello, I want to implement general procedures to generate discretized differential operators (like grad,div,curl,laplacian) using PETSc and staggered structured grids. Before I start, I am wondering if there is something similar in PETSc already? Regards, Alexander

[petsc-users] symmetric matrix

2011-12-26 Thread Alexander Grayver
Hello all, I have two questions: 1. Is that possible to set MatSetOption(A,MAT_SPD,PETSC_TRUE); through command line? 2. If I set option above for MPIAIJ matrix do solvers ignore lower triangular matrix? Regards, Alexander

[petsc-users] -ksp_diagonal_scale

2011-12-23 Thread Alexander Grayver
Hi, Sorry for small offtopic. I would also be interested more to know how it scales system? I mean what is idea behind this scaling. Regards, Alexander On 23.12.2011 03:50, Mohamad M. Nasr-Azadani wrote: > Hi guys, > > Three questions: > 1) As mentioned on the web when we use > *-ksp_diagonal_s

[petsc-users] Using Petsc with multiple RHS

2011-12-12 Thread Alexander Grayver
rse? Normally once you've done the lower >> triangular solve and then the upper triangular solve won't the result be >> dense? >> >> Barry >> >> On Dec 12, 2011, at 3:10 AM, Alexander Grayver wrote: >> >>> Hi Barry, >>> >

[petsc-users] Using Petsc with multiple RHS

2011-12-12 Thread Alexander Grayver
11.12.2011 18:50, Barry Smith wrote: > On Dec 11, 2011, at 9:29 AM, Alexander Grayver wrote: > One by one I'm wondering why? All main direct packages like MUMPS, SuperLU_DIST, PaSTiX support multiple RHS. > We do not handle a sparse right hand side. Since I already transfer

[petsc-users] Using Petsc with multiple RHS

2011-12-11 Thread Alexander Grayver
Hello, I used to use MUMPS directly with sparse multiple RHS. Now I use MUMPS through PETSc interface and solution for multiple RHS takes 1.5-2 times longer (MatMatSolve). My first question is whether do you use multiple RHS internally or you solve one-by-one? Second guess concerns the option:

[petsc-users] ILU in parallel

2011-12-09 Thread Alexander Grayver
Jed, Matt, Ok, I see. Perhaps it was bad idea to play around with ILU for my problems... Regards, Alexander On 09.12.2011 17:16, Matthew Knepley wrote: > On Fri, Dec 9, 2011 at 10:06 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > On 09.12.2

[petsc-users] ILU in parallel

2011-12-09 Thread Alexander Grayver
On 09.12.2011 16:58, Matthew Knepley wrote: > On Fri, Dec 9, 2011 at 9:44 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Hello, > > Sorry for dummy question, but what are options for parallel ILU in > petsc? Which packages are b

[petsc-users] ILU in parallel

2011-12-09 Thread Alexander Grayver
Hello, Sorry for dummy question, but what are options for parallel ILU in petsc? Which packages are best for big sparse matrices (>= 10^6)? Where do I start from? Regards, Alexander

[petsc-users] Metis building

2011-12-09 Thread Alexander Grayver
Hello, It's pretty weird situation now. A couple of weeks ago I configured petsc-3.2-p5 successfully, today I decided to do it with new options and it didn't work, I tried to do it with old options just to check and got error: lib/petsc-3.2-p5> ./configure --with-petsc-arch=intel-complex-debug

[petsc-users] petsc with scalapack and blacs from intel ?

2011-12-07 Thread Alexander Grayver
Hi Reddy, You should use --with-scalapack-lib/include and --with-blacs-lib/include For instance: --with-scalapack-lib=/opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_scalapack_lp64.a --with-scalapack-include=/opt/intel/Compiler/11.1/072/mkl/include --with-blacs-lib=/opt/intel/Compiler/11.1/0

[petsc-users] MatMumpsSetIcntl from Fortran

2011-12-01 Thread Alexander Grayver
Hong, This should be enough to reproduce the problem: call KSPCreate(PETSC_COMM_WORLD,ksp,ierr);CHKERRQ(ierr) call KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN,ierr);CHKERRQ(ierr) call KSPSetType(ksp,KSPPREONLY,ierr);CHKERRQ(ierr) call KSPGetPC(ksp,pc,ierr);CHKERRQ(ierr) call

[petsc-users] MatMumpsSetIcntl from Fortran

2011-11-30 Thread Alexander Grayver
Hi Hong, Thank you for quick reply. I just rewrote code concerning mumps from this example (lines 150-170): http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex52.c.html Regards, Alexander On 30.11.2011 17:40, Hong Zhang wrote: > Alexander: > >> Has anybody tried to use MatM

[petsc-users] Symmetric matrix filling

2011-11-30 Thread Alexander Grayver
On 30.11.2011 16:22, Matthew Knepley wrote: > On Wed, Nov 30, 2011 at 9:10 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > I'm not sure that MAT(S)BAIJ is what I need. My matrix symmetric, > but not block. > Well, I solve vecto

[petsc-users] MatMumpsSetIcntl from Fortran

2011-11-30 Thread Alexander Grayver
Hi PETSc team, Has anybody tried to use MatMumpsSetIcntl from Fortran? Because when I try to call it I fall into infinite recursion in function: PetscErrorCode MatMumpsSetIcntl(Mat F,PetscInt icntl,PetscInt ival) { PetscErrorCode ierr; PetscFunctionBegin; PetscValidLogicalCollect

[petsc-users] Symmetric matrix filling

2011-11-30 Thread Alexander Grayver
lexander On 30.11.2011 14:27, Alexander Grayver wrote: > Thanks Matt! > > Regards, > Alexander > > On 30.11.2011 14:16, Matthew Knepley wrote: >> On Wed, Nov 30, 2011 at 3:43 AM, Alexander Grayver >> mailto:agrayver at gfz-potsdam.de>> wrote: >> >>

[petsc-users] Symmetric matrix filling

2011-11-30 Thread Alexander Grayver
Thanks Matt! Regards, Alexander On 30.11.2011 14:16, Matthew Knepley wrote: > On Wed, Nov 30, 2011 at 3:43 AM, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > Hello, > > I'm trying to use mumps through PETSc now with symmetric matrix >

[petsc-users] Symmetric matrix filling

2011-11-30 Thread Alexander Grayver
Hello, I'm trying to use mumps through PETSc now with symmetric matrix and cholesky factorization. When I use it directly I fill up only upper part of the matrix and set mumid%SYM = 2. Is that possible to follow same way with petsc? Which options do I have to choose? Thanks in advance. Regards

[petsc-users] configure with --with-blacs-dir

2011-11-29 Thread Alexander Grayver
Got it. I had to use with-blacs-lib and with-blacs-include to explicitly specify lib. Sorry for bothering you. Regards, Alexander On 29.11.2011 10:27, Alexander Grayver wrote: > Hi PETSc team and others, > > I am trying to configure PETSc with the following line: > > ./configu

[petsc-users] configure with --with-blacs-dir

2011-11-29 Thread Alexander Grayver
Hi PETSc team and others, I am trying to configure PETSc with the following line: ./configure --with-petsc-arch=openmpi-intel-complex-debug-f-mumps --with-fortran-interfaces=1 --download-mumps --download-parmetis --with-scalapack-dir=/opt/intel/Compiler/11.1/072/mkl/lib/em64t --with-blacs-dir=

[petsc-users] Use two KSP solver in the same code.

2011-11-07 Thread Alexander Grayver
Mathew, Satish, Thanks guys! Good decision as usual. Regards, Alexander On 07.11.2011 18:32, Satish Balay wrote: > On Mon, 7 Nov 2011, Alexander Grayver wrote: > >> On 07.11.2011 17:47, Jed Brown wrote: >>> On Mon, Nov 7, 2011 at 09:39, NAN ZHAO>> <mailto:zhao

[petsc-users] Use two KSP solver in the same code.

2011-11-07 Thread Alexander Grayver
On 07.11.2011 17:47, Jed Brown wrote: > On Mon, Nov 7, 2011 at 09:39, NAN ZHAO > wrote: > > I want to solve a coupled system and prepare to solve the two > system in certain order in one code. I need to use the KSP solver > twice, Does anyone know a go

[petsc-users] possible development on Windows?

2011-11-07 Thread Alexander Grayver
hints on "and something else", if > you have them. > > Many thanks, > Dominik > > On Sun, Nov 6, 2011 at 3:55 PM, Alexander Grayver > wrote: >> Hi, >> >> I work with Petsc both under Linux and Windows. >> I develop in Fortran and it makes thi

[petsc-users] possible development on Windows?

2011-11-06 Thread Alexander Grayver
Hi, I work with Petsc both under Linux and Windows. I develop in Fortran and it makes things even more tricky sometimes. My compilers are those included in VS 2008 and IFC 12 + MKL's BLAS/LAPACK for Fortran (however I started to work with petsc using IFC 10.1 and downloaded BLAS/LAPACK using pe

[petsc-users] DMDA and vector PDE

2011-11-01 Thread Alexander Grayver
On 01.11.2011 16:14, Jed Brown wrote: > On Tue, Nov 1, 2011 at 09:08, Alexander Grayver > mailto:agrayver at gfz-potsdam.de>> wrote: > > I solve 3D vector PDE using FD, so my solution vector b has size > 3N, where N stands for total number of grid cells. >

[petsc-users] DMDA and vector PDE

2011-11-01 Thread Alexander Grayver
Hello! Sorry for possibly silly question. I've just recently started to use DMDA functionality. I solve 3D vector PDE using FD, so my solution vector b has size 3N, where N stands for total number of grid cells. Each part of b contains solution for corresponding dimension, i.e. fx = b(1:N), fy

[petsc-users] [petsc-3.2] LSQR new convergence test

2011-09-22 Thread Alexander Grayver
> Try the attached patch > > cd petsc-3.2-p2 > patch -Np1< ksp-conv.patch > > Satish > > On Thu, 22 Sep 2011, Alexander Grayver wrote: > >> Barry, >> >> Unfortunately, the problem is still there. Even though I put zitfuncf90.c >> into >&g

  1   2   >