Re: [petsc-dev] PetscSplitReduction

2014-06-10 Thread Jose E. Roman

El 08/06/2014, a las 13:13, Jose E. Roman escribió:

> 
> El 08/06/2014, a las 12:57, Jed Brown escribió:
> 
>> "Jose E. Roman"  writes:
>> 
>>> Would it be too much asking that PetscSplitReduction be available in a
>>> public header? (together with the functions PetscSplitReductionGet,
>>> PetscSplitReductionEnd, PetscSplitReductionExtend).
>> 
>> Sounds reasonable to me.  Do you want to prepare a patch?  Otherwise I
>> can do it later today.
>> 
> 
> I would rather leave it to you since you will probably want to add manpages 
> for the three mentioned functions.
> 
> Thanks.
> 
> 

I started with this:
https://bitbucket.org/petsc/petsc/commits/e8058a0

You may want to namespace SRState and add manpages.

Jose



Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Ce Qin
Dear all,

I think there is a problem in TaoLinSearchView routine. When running the
program with -tao_ls_view option, the number of function/gradient
evaluations printed is always zero. Use ./minsurf1 -mx 10 -my 10 -tao_view
-tao_ls_view -tao_monitor to see this problem.

And there are some inconsistency in the TAO module. See
src/tao/interface/taosolver.c, line 195 and line 393,
src/tao/linesearch/interface/taolinesearch.c, line 419 and line 550.

Best regards,
Ce Qin


Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Matthew Knepley
On Mon, Jun 9, 2014 at 10:16 PM, Blaise A Bourdin  wrote:

>  Hi,
>
>I agree with Barry that since this will not mean any interface
> changes, it can be done with patch releases.
>
>
>  Sounds like a plan
>
>
>
>>
>> I still can’t figure out how to deal with cell sets of different types
>> (say quads and tri).
>>
>
>  I have not tried this. I had been focusing getting higher order (Q2) and
> either quads or tris to work. This
> all seems to be working correctly now. I have been using it to
> visualize/restart a magma dynamics app
> with 3 fields all with different discretizations.
>
>
>  Nice.
>
>
>
>> All cell and vertex sets seem to be contained in the hdf5 file, but not
>> in a way that is usable by post processing tools (visit, paraview, ensight).
>>
>
>  For restarting, mixed meshes should work fine. They are stored in
>
>/topology/cells
>/cones
>/order
>/orientation
>
>  and the field values are in
>
>/fields/
>
>
>  For visualization and most post-processing, there are separate arrays
>
>/viz/topology
> /geometry
>
>  which are exactly what I needed to make Paraview understand the xdmf.
> The fields
> sampled down to cells and vertices are in
>
>/vertex_fields/
>   /cell_fields/
>
>
>  I saw that. Does it mean that all heavy data is duplicated in the hdf5
> file, i.e. that /fields contains values that petsc understands and /viz is
> for visualization?
>

Yes, this is controlled by the viewer format. I saw no way to get xmf to
look at scattered data, so duplication was inevitable.

>
>
>> The xdmf generation script bin/pythonscripts/petsc_gen_xdmf.py is quite
>> fragile.
>>
>
>  I have not had it fail for me, but would be happy to look at the failure
> you are getting.
>
>
>  Cool.
>
>  I am attaching a very simple code that reads an exo file and saves it,
> and two simple exodus meshes.
>

I have attached a cleaned up version.


> The xmf generation script fails on it, most likely because I don’t have a
> /time section in the file. My workaround is to replace l. 209 with time =
> [0,1].
>

The xmf script works on it now.


> When I read the xmf file in visit, I see only one cell set. In paraview, I
> see two blocks “domain” and “domain[1]", both of which contain the entire
> mesh.
>

The labels marking these sets are in the .h5 file, but I am not sure what
you want in the xmf. Can you show me
a simple example. Right now, I am using the xmf generation from PyLith.


> If I do not interpolate the mesh in DMPlexCreateExodusFromFile,
> petsc_gen_xdmf.py fails.
>

I just ran it and it worked here. See below.


> DMView fails in parallel. I must be doing something wrong.
>

There was a bug (overaggressive check) that caused this, but it has been
fixed. Are you using 'next'?


>  [0]PETSC ERROR: - Error Message
> --
> [0]PETSC ERROR: Argument out of range
> [0]PETSC ERROR: Point 8 has 0 constraints > -3 dof
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.4.4--g8c25fe2  GIT
> Date: 2014-06-07 16:01:56 -0500
> [0]PETSC ERROR: ./testHDF5Plex on a Darwin-intel14.0-g named iMac.local by
> blaise Mon Jun  9 22:14:29 2014
> [0]PETSC ERROR: Configure options CFLAGS= CXXFLAGS= LDFLAGS=-Wl,-no_pie
> --download-chaco=1 --download-exodusii=1 --download-hdf5=1
> --download-metis=1 --download-netcdf=1 --download-parmetis=1
> --download-sowing=1 --download-triangle=1 --download-yaml=1
> --with-blas-lapack-dir=/opt/intel/composerxe/mkl --with-cmake=cmake
> --with-debugging=1 --with-mpi-dir=/opt/HPC/mpich-3.0.4-intel14.0 --with-pic
> --with-shared-libraries=1 --with-vendor-compilers=intel --with-x11=1
> [0]PETSC ERROR: #1 DMCreateDefaultSF() line 3065 in
> /opt/HPC/petsc-dev/src/dm/interface/dm.c
> [0]PETSC ERROR: #2 DMGetDefaultSF() line 2985 in
> /opt/HPC/petsc-dev/src/dm/interface/dm.c
> [0]PETSC ERROR: #3 DMLocalToGlobalBegin() line 1737 in
> /opt/HPC/petsc-dev/src/dm/interface/dm.c
> [0]PETSC ERROR: #4 VecView_Plex_Local_HDF5() line 122 in
> /opt/HPC/petsc-dev/src/dm/impls/plex/plexhdf5.c
> [0]PETSC ERROR: #5 VecView_Plex_Local() line 86 in
> /opt/HPC/petsc-dev/src/dm/impls/plex/plex.c
> [0]PETSC ERROR: #6 VecView() line 601 in
> /opt/HPC/petsc-dev/src/vec/vec/interface/vector.c
> [0]PETSC ERROR: #7 DMPlexWriteCoordinates_HDF5_Static() line 396 in
> /opt/HPC/petsc-dev/src/dm/impls/plex/plexhdf5.c
> [0]PETSC ERROR: #8 DMPlexView_HDF5() line 485 in
> /opt/HPC/petsc-dev/src/dm/impls/plex/plexhdf5.c
> [0]PETSC ERROR: #9 DMView_Plex() line 450 in
> /opt/HPC/petsc-dev/src/dm/impls/plex/plex.c
> [0]PETSC ERROR: #10 DMView() line 648 in
> /opt/HPC/petsc-dev/src/dm/interface/dm.c
> [0]PETSC ERROR: #11 main() line 79 in
> /Users/blaise/Development/DMComplex/testHDF5Plex.c
> [0]PETSC ERROR: End of Error Message ---send entire
> error messa

Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Barry Smith

  Fixed in master by simply ensuring snes->ksp is created 

On Jun 8, 2014, at 3:32 PM, Lisandro Dalcin  wrote:

> On 5 June 2014 16:37, Barry Smith  wrote:
>> 
>>   We’ll be making a PETSc release in a few days so please get anything you 
>> need into next for testing and movement over to master.
>> 
>>  Barry
>> 
>> Tentative plan for release Wed June 11
>> 
> 
> Barry, I'm still getting this error in petsc4py, we discussed the
> issue some time ago.
> 
> Traceback (most recent call last):
>  File "test/test_snes.py", line 155, in testCompJac
>self.snes.computeJacobian(x, J)
>  File "SNES.pyx", line 236, in petsc4py.PETSc.SNES.computeJacobian
> (src/petsc4py.PETSc.c:141969)
> Error: error code 85
> [0] SNESComputeJacobian() line 2209 in
> /Users/dalcinl/Devel/petsc-dev/src/snes/interface/snes.c
> [0] KSPSetReusePreconditioner() line 192 in
> /Users/dalcinl/Devel/petsc-dev/src/ksp/ksp/interface/itfunc.c
> [0] Null argument, when expecting valid pointer
> [0] Null Object: Parameter # 1
> 
> 
> 
> 
> -- 
> Lisandro Dalcin
> ---
> CIMEC (UNL/CONICET)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1016)
> Tel/Fax: +54-342-4511169



[petsc-dev] valgrind suddenly broken

2014-06-10 Thread Barry Smith

  On es


bsmith@es:/sandbox/bsmith/petsc/src/vec/vec/examples/tutorials$ 
/sandbox/bsmith/petsc/bin/petscmpiexec -valgrind -n 1 ./ex1
cr_libinit.c:183 cri_init: sigaction() failed: Invalid argument

=
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 134
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
=
APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
bsmith@es:/sandbox/bsmith/petsc/src/vec/vec/examples/tutorials$ 




Re: [petsc-dev] valgrind suddenly broken

2014-06-10 Thread Satish Balay
Looks like its an issue with ubnutu mpich


https://bugs.launchpad.net/ubuntu/+source/mpich2/+bug/1045326 

The valgrind nightlybuilds are using '--download-mpich'

Satish

On Tue, 10 Jun 2014, Barry Smith wrote:

> 
>   On es
> 
> 
> bsmith@es:/sandbox/bsmith/petsc/src/vec/vec/examples/tutorials$ 
> /sandbox/bsmith/petsc/bin/petscmpiexec -valgrind -n 1 ./ex1
> cr_libinit.c:183 cri_init: sigaction() failed: Invalid argument
> 
> =
> =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
> =   EXIT CODE: 134
> =   CLEANING UP REMAINING PROCESSES
> =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
> =
> APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
> bsmith@es:/sandbox/bsmith/petsc/src/vec/vec/examples/tutorials$ 
> 
> 
> 



Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Jason Sarich
Hi Ce Qin,

Yes, thanks for pointing those out. I have them fixed and will push to next
as soon as our (ANL) network troubles get resolved.

Jason



On Tue, Jun 10, 2014 at 7:23 AM, Ce Qin  wrote:

>  Dear all,
>
>  I think there is a problem in TaoLinSearchView routine. When running the
> program with -tao_ls_view option, the number of function/gradient
> evaluations printed is always zero. Use ./minsurf1 -mx 10 -my 10 -tao_view
> -tao_ls_view -tao_monitor to see this problem.
>
>  And there are some inconsistency in the TAO module. See
> src/tao/interface/taosolver.c, line 195 and line 393,
> src/tao/linesearch/interface/taolinesearch.c, line 419 and line 550.
>
>  Best regards,
> Ce Qin
>


Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Blaise A Bourdin
Resending to the list:


I saw that. Does it mean that all heavy data is duplicated in the hdf5 file, 
i.e. that /fields contains values that petsc understands and /viz is for 
visualization?

Yes, this is controlled by the viewer format. I saw no way to get xmf to look 
at scattered data, so duplication was inevitable.

There are two issues:
projection into linear / bilinear elements that xdmf understands and scattered 
data.
I think that one way to deal with the later is to create one grid per cell set. 
the hierarchy should be

  

:
:


:
:


i.e. one connectivity table per cell set instead of a global one. This also 
addresses the issue of different element types
Lastly, when no interpolation is needed, we do not need to duplicate results in 
the hdf5 file this way.

How hard would it be to split the connectivity table in the hdf5 file? Once 
this is done, I can try to write a xmd file by hand for reference.

The xmf generation script fails on it, most likely because I don’t have a /time 
section in the file. My workaround is to replace l. 209 with time = [0,1].

The xmf script works on it now.

Did you push your changes? I have switched to next but still get an error:
bourdin@galerkin:DMComplex $ $PETSC_DIR/bin/pythonscripts/petsc_gen_xdmf.py 
TwoSquares.h5
Traceback (most recent call last):
  File "/opt/HPC/petsc-dev/bin/pythonscripts/petsc_gen_xdmf.py", line 220, in 

generateXdmf(sys.argv[1])
  File "/opt/HPC/petsc-dev/bin/pythonscripts/petsc_gen_xdmf.py", line 215, in 
generateXdmf
Xdmf(xdmfFilename).write(hdfFilename, topoPath, numCells, numCorners, 
cellDim, geomPath, numVertices, spaceDim, time, vfields, cfields)
  File "/opt/HPC/petsc-dev/bin/pythonscripts/petsc_gen_xdmf.py", line 176, in 
write
self.writeSpaceGridHeader(fp, numCells, numCorners, cellDim, spaceDim)
  File "/opt/HPC/petsc-dev/bin/pythonscripts/petsc_gen_xdmf.py", line 75, in 
writeSpaceGridHeader
''' % (self.cellMap[cellDim][numCorners], numCells, "XYZ" if spaceDim > 2 
else "XY"))
KeyError: 1

I need to understand how xmf treats these mixes meshes. This is where help 
would be useful.
The checkpointing works with them however.

I struggled with the same problem until Jinghua Ge, our viz expert and xmf / 
hdf5 guru, suggested to use a spatial collection of spatial grids.

Blaise
--
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin


Re: [petsc-dev] getting ready for PETSc release

2014-06-10 Thread Ce Qin
Dear Jason,

Thanks for your quick response. If you need any help/test, please let me
know.

I also want do some feature request that I already implemented and send to
the mailing list. See
http://lists.mcs.anl.gov/pipermail/petsc-dev/2014-June/015536.html . You
can decide whether it is worth to add to the library.

Best regards,
Ce Qin