Re: [petsc-users] How to speed up geometric multigrid

2013-10-01 Thread Barry Smith
On Oct 2, 2013, at 12:28 AM, Jed Brown wrote: > "Mark F. Adams" writes: >> run3.txt uses: >> >> -ksp_type richardson >> >> This is bad and I doubt anyone recommended it intentionally. Hell this is normal multigrid without a Krylov accelerator. Under normal circumstances with geometric

Re: [petsc-users] How to speed up geometric multigrid

2013-10-01 Thread Jed Brown
"Mark F. Adams" writes: > run3.txt uses: > > -ksp_type richardson > > This is bad and I doubt anyone recommended it intentionally. I would have expected FGMRES, but Barry likes Krylov smoothers and Richardson is one of a few methods that can tolerate nonlinear preconditioners. > You also have,

[petsc-users] ISLocalToGlobalMapping + VecCreateGhost

2013-10-01 Thread Mohammad Mirzadeh
Hi guys, I just did something by pure guessing which seems to work and I want to make sure its the right thing! I have a specific layout for my vectors that look like this -- | ghost values | local values | ghost values |

Re: [petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-01 Thread Satish Balay
On Tue, 1 Oct 2013, Mengda Wu wrote: > Hi Satish, > >Thanks a lot for your reply! > >Is there a way to use the mingw64 which is not shipped with cygwin? For > example, use windows native paths when testing the compiler. Nope - I don't think it will work. Our build tools are primarily wo

Re: [petsc-users] using mpi

2013-10-01 Thread Gryllida
On Wed, 2 Oct 2013, at 13:38, Jed Brown wrote: > Gryllida writes: > > > I have a parallel program which reads data and makes a call to a > > subroutine that uses petsc. It only needs to read data once. Is it > > possible to implement that using MPI and then initialise petsc in the > > subroutine?

Re: [petsc-users] How to speed up geometric multigrid

2013-10-01 Thread Mark F. Adams
On Oct 1, 2013, at 7:02 PM, Michele Rosso wrote: > Barry, > > I repeated the previous runs since I noticed that it was not using the options > > -mg_levels_ksp_max_it 3 > > They are faster then before now but still slower than my initial test and > anyway the solution time increases consider

Re: [petsc-users] using mpi

2013-10-01 Thread Jed Brown
Gryllida writes: > I have a parallel program which reads data and makes a call to a > subroutine that uses petsc. It only needs to read data once. Is it > possible to implement that using MPI and then initialise petsc in the > subroutine? Or do I need to initialise petsc first (and use MPI calls

[petsc-users] using mpi

2013-10-01 Thread Gryllida
I have a parallel program which reads data and makes a call to a subroutine that uses petsc. It only needs to read data once. Is it possible to implement that using MPI and then initialise petsc in the subroutine? Or do I need to initialise petsc first (and use MPI calls with PETSC_COMM_WORLD)?

Re: [petsc-users] How to speed up geometric multigrid

2013-10-01 Thread Barry Smith
Thanks. Unacceptably poor convergence of multigrid here. What kind of discretization are you using for your "projection method"? Is is cell centered? What kind of boundary conditions? If you are using cell-centered (piece-wise constant) then the interpolation you are getting is all wro

Re: [petsc-users] [d...@libelemental.org] Re: The product of two MPIDENSE matrices

2013-10-01 Thread Jed Brown
S V N Vishwanathan writes: >> You can use MatTransposeMatMult with an MPIAIJ and a MPIDENSE. (This >> is the standard case mentioned earlier, and I don't understand what >> Elemental is offering you in this situation. Do you have other dense >> matrices running around?) > > Perhaps I should giv

Re: [petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-01 Thread Mengda Wu
Hi Satish, Thanks a lot for your reply! Is there a way to use the mingw64 which is not shipped with cygwin? For example, use windows native paths when testing the compiler. Thanks, Mengda On Tue, Oct 1, 2013 at 5:55 PM, Satish Balay wrote: > Looks like this mingw install is not from cy

Re: [petsc-users] [d...@libelemental.org] Re: The product of two MPIDENSE matrices

2013-10-01 Thread S V N Vishwanathan
> You can use MatTransposeMatMult with an MPIAIJ and a MPIDENSE. (This > is the standard case mentioned earlier, and I don't understand what > Elemental is offering you in this situation. Do you have other dense > matrices running around?) Perhaps I should give a bit of background on what we ar

Re: [petsc-users] Does PETSc have any broadcast function?

2013-10-01 Thread Matthew Knepley
On Tue, Oct 1, 2013 at 7:21 PM, Gryllida wrote: > >On Wed, 1 Sep 2010 20:54:54 +, "Li, Zhisong (lizs)" mail.uc.edu> wrote: > >> Hi, Petsc Team, > >> > >> I wonder if Petsc has any function like MPI_Bcast() which can > >> broadcast a value to all processes. If we directly add MPI functions >

Re: [petsc-users] Scatter error

2013-10-01 Thread Mohammad Mirzadeh
Thanks Matt. On Tue, Oct 1, 2013 at 5:26 PM, Matthew Knepley wrote: > On Tue, Oct 1, 2013 at 7:02 PM, Mohammad Mirzadeh > wrote: >> >> > It would be half the messages. Why are these vectors separate in the >> > first place? >> >> I had not worked with block vectors before so just convenience i

Re: [petsc-users] Scatter error

2013-10-01 Thread Matthew Knepley
On Tue, Oct 1, 2013 at 7:02 PM, Mohammad Mirzadeh wrote: > > It would be half the messages. Why are these vectors separate in the > > first place? > > I had not worked with block vectors before so just convenience i > guess! When working with blocked vectors, how are items stored? Is it > like fx

[petsc-users] Does PETSc have any broadcast function?

2013-10-01 Thread Gryllida
>On Wed, 1 Sep 2010 20:54:54 +, "Li, Zhisong (lizs)" >wrote: >> Hi, Petsc Team, >> >> I wonder if Petsc has any function like MPI_Bcast() which can >> broadcast a value to all processes. If we directly add MPI functions >> into the Petsc program, the MPI datatype may be incompatible with th

Re: [petsc-users] Scatter error

2013-10-01 Thread Mohammad Mirzadeh
> It would be half the messages. Why are these vectors separate in the > first place? I had not worked with block vectors before so just convenience i guess! When working with blocked vectors, how are items stored? Is it like fxx[0], fyy[0], fxx[1], fyy[1], ... or is it like fxx[0],fxx[1],...,fyy

Re: [petsc-users] [d...@libelemental.org] Re: The product of two MPIDENSE matrices

2013-10-01 Thread Jed Brown
Joon Hee Choi writes: > - Original Message - > From: "Jack Poulson" > To: d...@libelemental.org, "Jed Brown" > Cc: "Joon Hee Choi" , "Hong Zhang" , > "PETSc users list" > Sent: Tuesday, October 1, 2013 6:15:23 PM > Subject: Re: [d...@libelemental.org] Re: [petsc-users] The product of

Re: [petsc-users] The product of two MPIDENSE matrices

2013-10-01 Thread Jed Brown
S V N Vishwanathan writes: > Hi > >> > I am wondering whether I can multiply MATELEMENTAL and MATAIJ >> > matrices. If I cannot multiply those, could you build the >> > multiplication? >> >> What are the dimensions of the matrices? >> >> Jack, does Clique support multiplication of sparse matric

Re: [petsc-users] Scatter error

2013-10-01 Thread Jed Brown
Mohammad Mirzadeh writes: > I assume I'm getting this since they somehow share a VecScatter > internally because of VecDuplicate? If so how can I fix this? Hmm, there is no VecScatterDuplicate so I think you'd have to make the vectors independently. > Also as a side question, if I stored fxx and

Re: [petsc-users] [d...@libelemental.org] Re: The product of two MPIDENSE matrices

2013-10-01 Thread Joon Hee Choi
- Original Message - From: "Jack Poulson" To: d...@libelemental.org, "Jed Brown" Cc: "Joon Hee Choi" , "Hong Zhang" , "PETSc users list" Sent: Tuesday, October 1, 2013 6:15:23 PM Subject: Re: [d...@libelemental.org] Re: [petsc-users] The product of two MPIDENSE matrices On 10/01/201

[petsc-users] Scatter error

2013-10-01 Thread Mohammad Mirzadeh
Hi guys, I have two ghosted vectors fxx, fyy which should store derivatives of a quantity f. They are both obtained via calling VecDuplicate on f. To minimize communications when computing both fxx and fyy I do the following: // loop over boundary points and compute fxx and fyy VecGhostUpdateBeg

Re: [petsc-users] [d...@libelemental.org] Re: The product of two MPIDENSE matrices

2013-10-01 Thread Jack Poulson
On 10/01/2013 03:04 PM, S V N Vishwanathan wrote: > Hi > >>> I am wondering whether I can multiply MATELEMENTAL and MATAIJ >>> matrices. If I cannot multiply those, could you build the >>> multiplication? >> >> What are the dimensions of the matrices? >> >> Jack, does Clique support multiplication

Re: [petsc-users] The product of two MPIDENSE matrices

2013-10-01 Thread S V N Vishwanathan
Hi > > I am wondering whether I can multiply MATELEMENTAL and MATAIJ > > matrices. If I cannot multiply those, could you build the > > multiplication? > > What are the dimensions of the matrices? > > Jack, does Clique support multiplication of sparse matrices with > [MC,MR] dense matrices? The

Re: [petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-01 Thread Satish Balay
mingw64 from cygwin[32] appears to work fine with /tmp. Satish balay@msnehalem2 ~/junk $ which x86_64-w64-mingw32-gcc.exe /usr/bin/x86_64-w64-mingw32-gcc.exe balay@msnehalem2 ~/junk $ cygcheck -f /usr/bin/x86_64-w64-mingw32-gcc.exe mingw64-x86_64-gcc-core-4.7.3-1 balay@msnehalem2 ~/jun

Re: [petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-01 Thread Satish Balay
Looks like this mingw install is not from cygwin - and does not work with cygwin paths. Suggest using mingw from cygwin - or install and use cygwin64 [which has non-mingw gcc-64] You might need the following patch https://bitbucket.org/petsc/petsc/commits/e4773d96ef73f1e0b315c5b0194cae499d71e207

[petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7

2013-10-01 Thread Mengda Wu
Hello all, I am trying to compile 64 bit version of petsc-3.4.2 using MinGW-w64 (latest version 4.8.1 installed with http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download) on Windows 7 64 bit. I have cygwin, python (under cygwin) installed.

Re: [petsc-users] The product of two MPIDENSE matrices

2013-10-01 Thread Jed Brown
Joon Hee Choi writes: > Dear Petsc Developers, > > Hello. > I am wondering whether I can multiply MATELEMENTAL and MATAIJ matrices. If I > cannot multiply those, could you build the multiplication? What are the dimensions of the matrices? Jack, does Clique support multiplication of sparse mat

Re: [petsc-users] The product of two MPIDENSE matrices

2013-10-01 Thread Joon Hee Choi
Dear Petsc Developers, Hello. I am wondering whether I can multiply MATELEMENTAL and MATAIJ matrices. If I cannot multiply those, could you build the multiplication? Thank you. Joon - Original Message - From: "Joon Hee Choi" To: "Jack Poulson" Cc: "PETSc users list" , "dev" , "Jed

Re: [petsc-users] MatCreateSchurComplement

2013-10-01 Thread Anton Popov
On 10/1/13 9:45 PM, Jed Brown wrote: Anton Popov writes: Dear all, I guess MatCreateSchurComplement is somehow broken in PETSc 3.4.2 You can fix it by calling KSPMatRegisterAll() before MatCreateSchurComplement, Thanks, Jed. It solves the problem. and the issue is now fixed in 'maint' (i

Re: [petsc-users] MatCreateSchurComplement

2013-10-01 Thread Jed Brown
Anton Popov writes: > Dear all, > > I guess MatCreateSchurComplement is somehow broken in PETSc 3.4.2 You can fix it by calling KSPMatRegisterAll() before MatCreateSchurComplement, and the issue is now fixed in 'maint' (it was accidentally only fixed in 'master'). This problem came from simplif

[petsc-users] MatCreateSchurComplement

2013-10-01 Thread Anton Popov
Dear all, I guess MatCreateSchurComplement is somehow broken in PETSc 3.4.2 Attached is the modified ex23 from src/ksp/ksp/examples/tutorials I just copied system matrix three times and created a Schur complement object. However mpirun -n 4 ./ex23 gives: Unknown Mat type given: schurcompleme

Re: [petsc-users] Back to struct in Fortran to represent field with dof > 1

2013-10-01 Thread Barry Smith
I doubt very much that the ISO C bindings allow one to pass a Fortran pointer through a C function which is what we need to do so I'd be surprised if the ISO C bindings will save the day. But you are welcome to try. Barry On Oct 1, 2013, at 7:01 AM, Jed Brown wrote: > Barry Smith wr

Re: [petsc-users] Back to struct in Fortran to represent field with dof > 1

2013-10-01 Thread Christophe Ortiz
On Tue, Oct 1, 2013 at 2:01 PM, Jed Brown wrote: > Barry Smith writes: > >I put the example with VecGetArray() into petsc-dev and if you send > >me one with DMDAVecGetArray() I'll add that as well. Since the > >derived type has to appear explicitly in the code I can't put > >som

Re: [petsc-users] Back to struct in Fortran to represent field with dof > 1

2013-10-01 Thread Jed Brown
Barry Smith writes: >I put the example with VecGetArray() into petsc-dev and if you send >me one with DMDAVecGetArray() I'll add that as well. Since the >derived type has to appear explicitly in the code I can't put >something in the library only in examples that people can copy a

Re: [petsc-users] Back to struct in Fortran to represent field with dof > 1

2013-10-01 Thread Barry Smith
On Oct 1, 2013, at 2:18 AM, Christophe Ortiz wrote: > Hi Barry, > > Thanks for the piece of code. I will try to implement it. My problem is 1D, > so should be ok. If I have some pb I'll let you know. > > If this work, do you plan to include it in next version of PETSc ? I put the example

Re: [petsc-users] Back to struct in Fortran to represent field with dof > 1

2013-10-01 Thread Christophe Ortiz
Hi Barry, Thanks for the piece of code. I will try to implement it. My problem is 1D, so should be ok. If I have some pb I'll let you know. If this work, do you plan to include it in next version of PETSc ? Christophe On Mon, Sep 30, 2013 at 2:04 PM, Barry Smith wrote: > > On Sep 30, 2013, at