[petsc-users] Debugging hints welcome

2011-07-14 Thread Clemens Domanig
I preallocate a sparse matrix 1107648x1107648 at the beginning. I checked all indices when filling the matrix with MatSetValues and they are all smaller than 1107648. Just to give you some time measurements: 1 MPI - hangs 2 MPI - hangs even after 20 min no change 3 MPI - 21s for assembly 4 MPI -

[petsc-users] Field dependent stencil in DAs

2011-07-14 Thread Kevin Green
From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Jed Brown [jedbr...@mcs.anl.gov] Sent: Monday, July 11, 2011 7:38 PM To: PETSc users list Subject: Re: [petsc-users] Field dependent stencil in DAs On Mon, Jul 11,

[petsc-users] Field dependent stencil in DAs

2011-07-14 Thread Matthew Knepley
-- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/0875045f/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Xuefei (Rebecca) Yuan
Dear all, I have assembled a 2d matrix through the FormJacobianLocal() routine. I would like to store this sparse MXN matrix A in the following form: line1: M N numberofnonzeros line2: i j value line3: i j

[petsc-users] To store the matrix.

2011-07-14 Thread Jed Brown
attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/d2446fff/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Xuefei (Rebecca) Yuan
://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/3620d2e8/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Jed Brown
from the AIJ structure? Get the indices using MatGetRowIJ() and the values using MatGetArray(). -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/1dd1fcda/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Matthew Knepley
their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/114719c5/attachment-0001.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Xuefei (Rebecca) Yuan
://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/b41d2d0c/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Vijay S. Mahadevan
Jed, I think the format is useful to serialize a matrix into MATLAB format. Typically, you could do something like nnz = 1 ; index = zeros(nnz,3); index = [ 1 1 1.0 ]; A = spconvert(index); I am unsure if PETSC_VIEWER_MATLAB already provides this functionality for matrices. The document for

[petsc-users] To store the matrix.

2011-07-14 Thread Jed Brown
. You mean the ASCII MATLAB format? You can view binary matrices to Matlab without any text representation. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/ca480229/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Vijay S. Mahadevan
Yes, but a binary viewer should be used for this instead. Agreed. But for small problems in debug scenarios, it is useful to check the entries in ascii format. You mean the ASCII MATLAB format? You can view binary matrices to Matlab without any text representation. Yes. Do you mean the

[petsc-users] To store the matrix.

2011-07-14 Thread Jed Brown
-- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/f97c88b3/attachment.htm

[petsc-users] To store the matrix.

2011-07-14 Thread Hong Zhang
Rebecca, We have private routines MatConvertToTriples_xxx_xxx() in ~petsc/src/mat/impls/aij/mpi/mumps/mumps.c which convert petsc seqaij and mpiaij to triples: row[], col[], val[] . You may take a look at these routines. Hong On Thu, Jul 14, 2011 at 1:37 PM, Xuefei (Rebecca) Yuan xyuan at

[petsc-users] To store the matrix.

2011-07-14 Thread Xuefei (Rebecca) Yuan
Dear Hong, Thanks very much! I have aij, so it is the MatConvertToTriples_seqaij_seqaij() I need to call after get the global matrix? Thanks, Rebecca On Jul 14, 2011, at 12:05 PM, Hong Zhang wrote: Rebecca, We have private routines MatConvertToTriples_xxx_xxx() in

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Ethan Coon
-- A non-text attachment was scrubbed... Name: PetscBinaryRead.py Type: text/x-python Size: 4791 bytes Desc: not available URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110714/e38a5560/attachment-0001.py

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Barry Smith
Ethan, Excellent. I have the matlab programs in a subdirectory called matlab. Will there be several of these? So should we have a bin/python subdirectory for them? Barry On Jul 14, 2011, at 2:22 PM, Ethan Coon wrote: Attached patch takes Lisandro's matio.py and puts it in a

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Ethan Coon
I suppose it's possible, eventually. Much of the matlab stuff is related to the socket and the wrappers, which exist in petsc4py instead. There may be a few though -- PetscBinaryWrite.py at least. Ethan On Thu, 2011-07-14 at 14:38 -0500, Barry Smith wrote: Ethan, Excellent. I

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Lisandro Dalcin
On 14 July 2011 16:22, Ethan Coon ecoon at lanl.gov wrote: Attached patch takes Lisandro's matio.py and puts it in a PetscBinaryRead.py that reads a binary with (potentially) multiple Petsc objects, deciphers the contents of the file from the header, and returns numpy objects. ?It's basically

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Ethan Coon
On Thu, 2011-07-14 at 17:47 -0300, Lisandro Dalcin wrote: 1) readMatDense() is wrong. The I,J,V arrays are the CSR structure, not the COO (coordinate) format, Then you cannot simply: for i,j,v in zip(I,J,V): mat[i,j] = v I think you have to: for row, rstart in

[petsc-users] PETSc recommended visualization packages

2011-07-14 Thread Lisandro Dalcin
On 14 July 2011 18:33, Ethan Coon ecoon at lanl.gov wrote: On Thu, 2011-07-14 at 17:47 -0300, Lisandro Dalcin wrote: 1) readMatDense() is wrong. The I,J,V arrays are the CSR structure, not the COO (coordinate) format, Then you cannot simply: Ok, thanks, I wasn't sure of which format you

[petsc-users] VecPointwiseDivide for Vecs with multiple DOFs?

2011-07-14 Thread Max Rudolph
Is there a straightforward way to perform a pointwise divide of every DOF in a global Vec with multiple degrees of freedom by another vector that has only one degree of freedom? Thanks for your help. Max