DMMG with different

2009-09-17 Thread Dave May
Hi,
  I'm trying to use DMMG to solve linear Stokes flow discretised with finite
elements.
Does anyone know how to specify different matrices for the matrix associated
with the linear system and the matrix used to construct the preconditioner?
Ie, like choosing a different Amat and Bmat with KSPSetOperators().

In looking at DMMGSetKSP(), I don't see how this is possible. DMMG seems to
generate the operator B via DMGetMatrix(), and then sets J equal to B. A
dirty hack around the problem seemed to be to used PCDMMG, but I think I
should be able to define different A and B mat's with DMMG directly.

I also noted that PCDMMG does not appear to be a registered PC
implementation in petsc 3.

Thanks in advance,
  Dave
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/d98fb9e0/attachment.htm


MatMatMult_MPIDense_MPIDense() works currently?

2009-09-17 Thread Fabio Leite Soares
 to.

Regards

-- 
F?bio Leite Soares
Undergraduate Student of Computing Engineering
Centro de Inform?tica - UFPE - BRAZIL
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/b1f5bfcb/attachment.html


Problem with MatMatMultTranspose

2009-09-17 Thread Niall Moran
Hi,

I am just wondering if anything has changed on the status of this 
feature. Would be great to be able to perform matrix vector 
multiplications on complex Hermitian matrices by only providing one half 
of the matrix.

Regards,

Niall.

zhifeng sheng wrote:
 Hi,

 you mean the conjugate transpose for complex matrix is not supported?

 then how can you implement the iterative solvers for complex matrices? 
 because, some iterative solvers need it.

 Thanks
 Best regards



 Hong Zhang wrote:

 Zhifeng,

 We do not have support for matrix operations on Hermitian matrix yet.
 Hong

 On Mon, 20 Oct 2008, zhifeng sheng wrote:

 Dear all

 I am using this MatMatMultTranspose function for complex matrices, 
 but it seems to be doing something weird.

 for instance, if I have complex matrix A, and I compute A^T*A with 
 this function, it does not generate a Hermitian 
 http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html
  
 matrix.

 I am thinking that maybe the function take the transpose of A 
 instead of the conjugate transpose 

 Do you know how I can get an A^H*A instead of A^T*A for complex 
 matrices?

 Thanks a lot
 Best regards
 Zhifeng
 http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html
  





Problem with MatMatMultTranspose

2009-09-17 Thread Matthew Knepley
On Thu, Sep 17, 2009 at 12:44 PM, Niall Moran nmoran at thphys.nuim.ie wrote:

 Hi,

 I am just wondering if anything has changed on the status of this feature.
 Would be great to be able to perform matrix vector multiplications on
 complex Hermitian matrices by only providing one half of the matrix.


It is not curently in the todo list since we have only had one request. It
seems like it would just take being careful about the
complex case for SBAIJ if you would like the try the implementation. We can
answer questions.

  Thanks,

Matt


 Regards,

 Niall.

 zhifeng sheng wrote:

 Hi,

 you mean the conjugate transpose for complex matrix is not supported?

 then how can you implement the iterative solvers for complex matrices?
 because, some iterative solvers need it.

 Thanks
 Best regards



 Hong Zhang wrote:


 Zhifeng,

 We do not have support for matrix operations on Hermitian matrix yet.
 Hong

 On Mon, 20 Oct 2008, zhifeng sheng wrote:

  Dear all

 I am using this MatMatMultTranspose function for complex matrices, but
 it seems to be doing something weird.

 for instance, if I have complex matrix A, and I compute A^T*A with this
 function, it does not generate a Hermitian 
 http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html
 matrix.

 I am thinking that maybe the function take the transpose of A instead of
 the conjugate transpose 

 Do you know how I can get an A^H*A instead of A^T*A for complex
 matrices?

 Thanks a lot
 Best regards
 Zhifeng
 
 http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html







-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/88bdce57/attachment.htm


MatMatMult_MPIDense_MPIDense() works currently?

2009-09-17 Thread Matthew Knepley
:
 
 [1]PETSC ERROR: User provided function() line 0 in unknown directory
 unknown file
 application called MPI_Abort(MPI_COMM_WORLD, 59) - process 1
 rank 1 in job 1  hpcin08_34697   caused collective abort of all ranks
   exit status of rank 1: return code 59
 rank 0 in job 1  hpcin08_34697   caused collective abort of all ranks
   exit status of rank 0: return code 59


 I tried to execute the ex123.c example and I did not succeeded to.

 Regards

 --
 F?bio Leite Soares
 Undergraduate Student of Computing Engineering
 Centro de Inform?tica - UFPE - BRAZIL




-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/42e8ae3e/attachment-0001.htm


memory reporting question

2009-09-17 Thread Matt Funk
Hi,

I am wondering whether the -memory_info option and the 
PetscMemoryGetMaximumUsage() call report different things.

The reason i am asking is because i call the PetscMemoryGetCurrentUsage fcn in 
my code and it shows:
5.25558e+08.

At the end of the run the -memory_info option reports:
max process malloc()'ed: 4.00524e+08
max petsc malloc()'ed: 1.15254e+08.

So i am a little confused by those numbers unless the fcn call is the more 
complete picture (as said on the manual page)

I guess then my question is whether the -memory_info corresponds to the 
PetscMalloc* fcns?

thanks
matt
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/d637ac28/attachment.htm


memory reporting question

2009-09-17 Thread Matt Funk
I forgot to mention:
Some of the memory allocated in the code is from non-petsc structures. Not 
sure if that is important.

Another question:
The number reported by -memory_info, is it in bytes?

thanks
matt


On Thursday 17 September 2009, you wrote:
 Hi,

 I am wondering whether the -memory_info option and the
 PetscMemoryGetMaximumUsage() call report different things.

 The reason i am asking is because i call the PetscMemoryGetCurrentUsage fcn
 in my code and it shows:
 5.25558e+08.

 At the end of the run the -memory_info option reports:
 max process malloc()'ed: 4.00524e+08
 max petsc malloc()'ed: 1.15254e+08.

 So i am a little confused by those numbers unless the fcn call is the more
 complete picture (as said on the manual page)

 I guess then my question is whether the -memory_info corresponds to the
 PetscMalloc* fcns?

 thanks
 matt


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/375be5a2/attachment.htm


memory reporting question

2009-09-17 Thread Matthew Knepley
On Thu, Sep 17, 2009 at 6:04 PM, Matt Funk mafunk at nmsu.edu wrote:

 Hi,


 I am wondering whether the -memory_info option and the
 PetscMemoryGetMaximumUsagehttp://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscMemoryGetMaximumUsage.html#PetscMemoryGetMaximumUsage()
 call report different things.


 The reason i am asking is because i call the PetscMemoryGetCurrentUsage fcn
 in my code and it shows:
 5.25558e+08.


This call get_rusage(), so it gives you the entire process size.


 At the end of the run the -memory_info option reports:
 max process malloc()'ed: 4.00524e+08


This is a sampling of rusage every time an object is destroyed.


 max petsc malloc()'ed: 1.15254e+08.


This is all the memory malloced using PetscMalloc() summed.

  Matt


 So i am a little confused by those numbers unless the fcn call is the more
 complete picture (as said on the manual page)


 I guess then my question is whether the -memory_info corresponds to the
 PetscMalloc* fcns?


 thanks
 matt




-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090917/e13dc089/attachment.htm


MatMatMult_MPIDense_MPIDense() works currently?

2009-09-17 Thread Hong Zhang

Fabio,

Did you install plapack with petsc?
Hong

On Thu, 17 Sep 2009, Matthew Knepley wrote:

 Give us the exact command line you use for ex123 and the error output. Send
 to petsc-maint.

  Matt

 On Thu, Sep 17, 2009 at 12:37 PM, Fabio Leite Soares fls2 at 
 cin.ufpe.brwrote:

 Hi everyone, I have the same problem and I don't know how to fix it.

 I need to multiply two mpi dense matrices using the BLAS3 routines. I have
 tried the MatMatMult_MPIDense_MPIDense() function but the console shows this
 message:

 [0]PETSC ERROR:
 
 [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
 probably memory access out of range
 [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
 [0]PETSC ERROR: or see
 http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSChttp://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal%5B0%5DPETSCERROR:
  or try
 http://valgrind.org on linux or man libgmalloc on Apple to find memory
 corruption errors
 [0]PETSC ERROR: likely location of problem given in stack below
 [0]PETSC ERROR: -  Stack Frames
 
 [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not
 available,
 [0]PETSC ERROR:   INSTEAD the line number of the start of the function
 [0]PETSC ERROR:   is given.
 [0]PETSC ERROR: [0] MatMPIDenseCopyToPlapack line 1028
 src/mat/impls/dense/mpi/mpidense.c
 [0]PETSC ERROR: [0] MatMatMultNumeric_MPIDense_MPIDense line 1078
 src/mat/impls/dense/mpi/mpidense.c
 [0]PETSC ERROR: - Error Message
 
 [0]PETSC ERROR: Signal received!
 [0]PETSC ERROR:
 
 [0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 8, Fri Aug 21 14:02:12
 CDT 2009
 [0]PETSC ERROR: See docs/changes/index.html for recent updates.
 [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 [0]PETSC ERROR: See docs/index.html for manual pages.
 [0]PETSC ERROR:
 
 [0]PETSC ERROR: ./mult on a linux-gnu named hpcin08 by hpcin Thu Sep 17
 14:28:28 2009
 [0]PETSC ERROR: Libraries linked from
 /home/hpcin/soft/petsc-3.0.0-p8/linux-gnu-c-debug/lib
 [0]PETSC ERROR: Configure run at Wed Sep 16 17:06:08 2009
 [0]PETSC ERROR: Configure options --download-f-blas-lapack=1
 --download-plapack --with-mpi-dir=/usr/local/bin/mpich2-1.1.1p1
 --with-scalar-type=real --with-precision=double --with-shared=0
 [0]PETSC ERROR: --[1]PETSC ERROR:
 
 [1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
 probably memory access out of range
 [1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
 [1]PETSC ERROR: or see
 http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[1]PETSChttp://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal%5B1%5DPETSCERROR:
  or try
 http://valgrind.org on linux or man libgmalloc on Apple to find memory
 corruption errors
 [1]PETSC ERROR: likely location of problem given in stack below
 [1]PETSC ERROR: -  Stack Frames
 
 [1]PETSC ERROR: Note: The EXACT line numbers in the stack are not
 available,
 [1]PETSC ERROR:   INSTEAD the line number of the start of the function
 [1]PETSC ERROR:   is given.
 [1]PETSC ERROR: [1] MatMPIDenseCopyToPlapack line 1028
 src/mat/impls/dense/mpi/mpidense.c
 [1]PETSC ERROR: [1] MatMatMultNumeric_MPIDense_MPIDense line 1078
 src/mat/impls/dense/mpi/mpidense.c
 [1]PETSC ERR--
 [0]PETSC ERROR: User provided function() line 0 in unknown directory
 unknown file
 application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
 OR: - Error Message
 
 [1]PETSC ERROR: Signal received!
 [1]PETSC ERROR:
 
 [1]PETSC ERROR: Petsc Release Version 3.0.0, Patch 8, Fri Aug 21 14:02:12
 CDT 2009
 [1]PETSC ERROR: See docs/changes/index.html for recent updates.
 [1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 [1]PETSC ERROR: See docs/index.html for manual pages.
 [1]PETSC ERROR:
 
 [1]PETSC ERROR: ./mult on a linux-gnu named hpcin-desktop by hpcin Thu Sep
 17 14:28:27 2009
 [1]PETSC ERROR: Libraries linked from
 /home/hpcin/soft/petsc-3.0.0-p8/linux-gnu-c-debug/lib
 [1]PETSC ERROR: Configure run at Tue Sep 15 15:57:39 2009
 [1]PETSC ERROR: Configure options --download-plapack=1
 --download-f-blas-lapack=1 --with-mpi-dir=/usr/local/bin/mpich2-1.1.1p1
 --with-scalar-type=real