Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 16:38, Matthew Knepley : > > On Mon, Jul 2, 2018 at 9:33 AM Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > > >> 2. 7. 2018 v 15:50, Matthew Knepley > <mailto:knep...@gmail.com>>: >> >> On Mon, Jul 2, 2018 at 8:

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
Thanks for the MWE. But it behaves exactly as I would anticipate, see log. I think that naming the event differently for each rank is not good but fortunately PETSc just ignores this for rank > 0. Important is the event id which is the same. I correctly get that the time spent in this event is slig

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
y (hopefully at class registration) on all processes. See also PetscLogViewDefault2018-07-02 18:45 GMT+03:00 Vaclav Hapla <vaclav.ha...@erdw.ethz.ch>:Thanks for the MWE. But it behaves exactly as I would anticipate, see log. I think that naming the event differently for each rank is not good but fortuna

[petsc-dev] IS block size meaning

2018-08-14 Thread Vaclav Hapla
Hello I would like to move the discussion from the PR https://bitbucket.org/petsc/petsc/pull-requests/1076/fix-issetblocksize_general because it's quite a general concern. It's about the meaning of block size for

[petsc-dev] tiny bug in DMPlexDistribute

2017-10-13 Thread Vaclav Hapla
write there some reviewer? Vaclav Hapla

Re: [petsc-dev] DMPlexCreateMedFromFile broken

2017-11-06 Thread Vaclav Hapla
> 5. 11. 2017 v 18:48, Matthew Knepley : > > On Thu, Nov 2, 2017 at 12:08 PM, Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > It seems that DMPlexCreateMedFromFile leaves out some mesh elements. I found > it out when investigating why ParMetis redistributio

[petsc-dev] proposed minor PetscPartitioner changes

2017-11-06 Thread Vaclav Hapla
Hello The whole PetscPartitioner class sources are part of src/dm/impls/plex/plexpartition.c, mixed together with some DMPlex* functions. If you don't mind, I would move the PetscPartitioner* stuff into the separate file petscpartitioner.c (in future, it could be even moved to a separate directo

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-06 Thread Vaclav Hapla
d up not liking. > > Thanks for looking at this, > >Barry > > > > On Nov 6, 2017, at 7:09 AM, Vaclav Hapla > <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > > > > Hello > > > > The whole PetscPartitioner class sources

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-06 Thread Vaclav Hapla
> 6. 11. 2017 v 14:37, Smith, Barry F. : > > > >> On Nov 6, 2017, at 7:30 AM, Vaclav Hapla wrote: >> >> >>> 6. 11. 2017 v 14:27, Matthew Knepley : >>> >>> On Mon, Nov 6, 2017 at 8:24 AM, Smith, Barry F. wrote: >>> >&

Re: [petsc-dev] DMPlexCreateMedFromFile broken

2017-11-07 Thread Vaclav Hapla
ev/src/dm/impls/plex/examples/tutorials/ex5.c Can you see whether it's a bug in DMPlexCreateMedFromFile or the MED file is broken? Thanks Vaclav > 5. 11. 2017 v 18:48, Matthew Knepley : > > On Thu, Nov 2, 2017 at 12:08 PM, Vaclav Hapla <mailto:vaclav.ha...@

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-08 Thread Vaclav Hapla
> 8. 11. 2017 v 9:06, Lisandro Dalcin : > > On 8 November 2017 at 05:51, Smith, Barry F. wrote: >> >>> On Nov 7, 2017, at 1:33 AM, Lisandro Dalcin wrote: >>> >>> The only concern I have about PetscPartitioner is that the API depends >>> on DM (PetscPartitionerPartition_ routines). Maybe >>> P

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-08 Thread Vaclav Hapla
> 8. 11. 2017 v 14:52, Jed Brown : > > Matthew Knepley mailto:knep...@gmail.com>> writes: > >> On Wed, Nov 8, 2017 at 4:52 AM, Vaclav Hapla >> wrote: >> >>> >>>> 8. 11. 2017 v 9:06, Lisandro Dalcin : >>>> >>>>

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-08 Thread Vaclav Hapla
> 8. 11. 2017 v 15:59, Matthew Knepley : > > On Wed, Nov 8, 2017 at 9:14 AM, Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > >> 8. 11. 2017 v 14:52, Jed Brown > <mailto:j...@jedbrown.org>>: >> >> Matthew Knepley mailto:knep...@gmai

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-09 Thread Vaclav Hapla
Thanks for the discussion. I think we got further. > 8. 11. 2017 v 20:42, Matthew Knepley : > > On Wed, Nov 8, 2017 at 2:27 PM, Jed Brown > wrote: > Matthew Knepley mailto:knep...@gmail.com>> writes: > > > On Wed, Nov 8, 2017 at 1:49 PM, Jed Brown >

Re: [petsc-dev] DMPlexCreateMedFromFile broken

2017-11-09 Thread Vaclav Hapla
7. 11. 2017 v 19:51, Matthew Knepley <knep...@gmail.com>:On Tue, Nov 7, 2017 at 11:44 AM, Vaclav Hapla <vaclav.ha...@erdw.ethz.ch> wrote:Nico Schlömer just introduced MED support into his meshio tool, based on my issue request. When I convert blockcylinder-50.exo directly to the MED

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-10 Thread Vaclav Hapla
> 10. 11. 2017 v 5:09, Smith, Barry F. : > > > >> On Nov 8, 2017, at 3:52 AM, Vaclav Hapla wrote: >> >> >>> 8. 11. 2017 v 9:06, Lisandro Dalcin : >>> >>> On 8 November 2017 at 05:51, Smith, Barry F. wrote: >>>> >&

[petsc-dev] PR #800

2017-11-10 Thread Vaclav Hapla
Hi Matt I would like to redirect the changes in PR #800 "DMPlex ex5 set partitioner from options" into maint so that we have a test base for fixing the PETSCPARTITIONERPARMETIS bug below, mentioned in the other thread. I feel this should fixed anyway, independently of the proposed PETSCPARTITI

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-10 Thread Vaclav Hapla
> 10. 11. 2017 v 14:56, Jed Brown : > > Vaclav Hapla mailto:vaclav.ha...@erdw.ethz.ch>> > writes: > >>> 10. 11. 2017 v 5:09, Smith, Barry F. : >>> >>> >>> >>>> On Nov 8, 2017, at 3:52 AM, Vaclav Hapla wrote: >

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-11-10 Thread Vaclav Hapla
> 10. 11. 2017 v 22:34, Jed Brown : > > Vaclav Hapla writes: > >>>> Yes. Mat can represent any graph in several different ways - >>>> e.g. Laplacian, adjacency, incidence, oriented incidence matrix. The >>>> graph could be also represented in

[petsc-dev] DMPlex test ex18 and DMPlexCreateFromDAG

2017-11-23 Thread Vaclav Hapla
Hello The DMPlex example src/dm/impls/plex/examples/tests/ex18.c fails with -cell_simplex 0 : [0]PETSC ERROR: Null argument, when expecting valid pointer [0]PETSC ERROR: Null Object: Parameter # 1 [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]

[petsc-dev] DMPlexCreate* and DMPlexInterpolate

2017-12-01 Thread Vaclav Hapla
Hello I noticed DMPlexCreateFromFile ignores the interpolate flag for HDF5. It's the only format for which PetscViewer API is used for loading, and this API has no means to specify interpolation. I guess there should be at least if (interpolate) { DM idm = NULL; ierr = DMPlexIn

Re: [petsc-dev] DMPlexCreate* and DMPlexInterpolate

2017-12-05 Thread Vaclav Hapla
> 5. 12. 2017 v 12:29, Matthew Knepley : > > On Mon, Dec 4, 2017 at 1:06 PM, Matthew Knepley <mailto:knep...@gmail.com>> wrote: > On Fri, Dec 1, 2017 at 11:10 AM, Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > Hello > > I noticed DMPlexCrea

Re: [petsc-dev] proposed minor PetscPartitioner changes

2017-12-07 Thread Vaclav Hapla
> 9. 11. 2017 v 12:53, Matthew Knepley : > > I think I need to create a proof-of-concept. I would start by employing > MatPartitioning in PetscPartitionerPartition with anything outside of this > function untouched for now (as already suggested in #192), if you agree. > > Or what about implem

[petsc-dev] Plex XDMF/HDF5 I/O

2018-01-17 Thread Vaclav Hapla
For DMPlex and PETSCVIEWERHDF5, DMView produces a HDF5 file consisting basically of these 3 parts: 1) vertices (HDF5 group /geometry) 2) "native" Plex topology as a serialization of the Plex graph 3) traditional topology as connectivity of vertices, XDMF-compatible (HDF5 group /viz/topology) So t

Re: [petsc-dev] Plex XDMF/HDF5 I/O

2018-01-24 Thread Vaclav Hapla
> 17. 1. 2018 v 13:04, Matthew Knepley : > > On Wed, Jan 17, 2018 at 6:49 AM, Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > For DMPlex and PETSCVIEWERHDF5, DMView produces a HDF5 file consisting > basically of these 3 parts: > 1) vertices (HDF5 group /g

[petsc-dev] test harness loops with different outputs

2018-01-24 Thread Vaclav Hapla
How should I specify output files for {{...}} with different outputs, please? I have consulted the developers manual but it's not clear to me still. And the example listings, page 34-45, seem to be broken. BTW in 7.1.2, I think there should be the space instead of the comma in the listing. Tha

Re: [petsc-dev] test harness loops with different outputs

2018-01-24 Thread Vaclav Hapla
> 24. 1. 2018 v 14:45, Vaclav Hapla : > > How should I specify output files for {{...}} with different outputs, please? Oh I see, {{...}separateoutput} is meant literally. But in that case typesetting it in italics is confusing. Vaclav > > I have consulted the developers

Re: [petsc-dev] test harness loops with different outputs

2018-01-25 Thread Vaclav Hapla
> 24. 1. 2018 v 22:55, Scott Kruger : > > > > On 1/24/18 6:50 AM, Vaclav Hapla wrote: >>> 24. 1. 2018 v 14:45, Vaclav Hapla : >>> >>> How should I specify output files for {{...}} with different outputs, >>> please? >> Oh I see, {

Re: [petsc-dev] test harness loops with different outputs

2018-01-26 Thread Vaclav Hapla
; >> On Jan 25, 2018, at 2:19 AM, Vaclav Hapla wrote: >> >> >> >>> 24. 1. 2018 v 22:55, Scott Kruger : >>> >>> >>> >>> On 1/24/18 6:50 AM, Vaclav Hapla wrote: >>>>> 24. 1. 2018 v 14:45, Vaclav Hapla : >>>

Re: [petsc-dev] test harness loops with different outputs

2018-01-26 Thread Vaclav Hapla
dflatex command in PATH, and still the PDFLATEX variable hasn't got set. Vaclav > > 2018-01-26 14:00 GMT+01:00 Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>>: > > > > 25. 1. 2018 v 9:33, Smith, Barry F. > <mailto:bsm...@mcs.anl.gov>>: > >

Re: [petsc-dev] test harness loops with different outputs

2018-01-26 Thread Vaclav Hapla
> 26. 1. 2018 v 14:08, Vaclav Hapla : > > > >> 26. 1. 2018 v 14:03, Patrick Sanan > <mailto:patrick.sa...@gmail.com>>: >> >> There is probably a better way but what's worked for me here is to make sure >> I have pdflatex on my system (

Re: [petsc-dev] test harness loops with different outputs

2018-01-26 Thread Vaclav Hapla
> 26. 1. 2018 v 14:58, Vaclav Hapla : > > > >> 26. 1. 2018 v 14:08, Vaclav Hapla > <mailto:vaclav.ha...@erdw.ethz.ch>>: >> >> >> >>> 26. 1. 2018 v 14:03, Patrick Sanan >> <mailto:patrick.sa...@gmail.com>>: >>

Re: [petsc-dev] Handling pull requests in a better way

2018-03-01 Thread Vaclav Hapla
> 1. 3. 2018 v 14:04, Patrick Sanan : > > Maybe it would also help to add more explicit instructions to the wiki > (https://bitbucket.org/petsc/petsc/wiki/Home#markdown-header-contributing-to-petsc > > ) > on

[petsc-dev] change in Manual Pages generation?

2018-03-08 Thread Vaclav Hapla
I have noticed that Level and Location is generated in a different way in maint and master, compare e.g. http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/PetscSectionCopy.html http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/PetscSectionCopy.html Is it a deliberate change?

[petsc-dev] MatLoad/VecLoad for a file with multiple objects

2018-03-23 Thread Vaclav Hapla
Hello I'm quite surprised that there can be multiple objects in a single binary file, and they must be loaded in the exact order they are in the file. This behavior is not documented in MatLoad or VecLoad. For instance, there can be a matrix A, RHS b and initial guess x0 stored in one file in

[petsc-dev] make check fortran warnings for complex single 64idx

2018-04-11 Thread Vaclav Hapla
Hello I just compiled current master with '--with-precision=single', '--with-scalar-type=complex', '--with-64-bit-indices', configure and make work, but 'make check' throws some warnings regarding src/snes/examples/tutorials/ex5f.F90, see below. mpifort —version says GNU Fortran (Ub

[petsc-dev] plexexodusii.c incompatible with complex - not covered?

2018-04-12 Thread Vaclav Hapla
At master, configured with --download-exodusii --download-hdf5 --download-netcdf --download-pnetcdf --with-scalar-type=complex I get bunch of compiler warnings warning: passing argument 2 of ‘VecGetArrayRead’ from incompatible pointer type warning: passing argument 2 of ‘VecRestoreArrayRead

[petsc-dev] Matlab interface issue

2018-04-16 Thread Vaclav Hapla
Hello I need to compile PETSc with MATLAB interface on Mac OS. First thing is that Mex supports only Xcode or Intel compilers, not GCC. So I compiled PETSc with Xcode, using options --with-cc="/usr/bin/xcrun -sdk macosx10.13 clang" --with-matlab --with-matlab-arch=maci64 --with-matlab-engine

Re: [petsc-dev] Matlab interface issue

2018-04-17 Thread Vaclav Hapla
was able to build > the socket mex files without a problem. > > So my conclusion is that we shouldn't change anything in the PETSc makefiles? > >Barry > > >> On Apr 16, 2018, at 6:41 AM, Vaclav Hapla wrote: >> >> Hello >> >> I n

Re: [petsc-dev] Matlab interface issue

2018-04-18 Thread Vaclav Hapla
018 v 23:26, Smith, Barry F. : > > > Please try the branch barry/feature-matlab-socket/maint and > --with-matlab-socket=0 and let me know if it works. > > Barry > > >> On Apr 17, 2018, at 3:16 AM, Vaclav Hapla wrote: >> >> OK. But definitely

[petsc-dev] Chaco from --download-chaco vs --download-trilinos (Re: broken stuff in next for many days)

2018-04-23 Thread Vaclav Hapla
I can confirm --download-chaco vs --download-trilinos give different chaco partitioning - I can reproduce on my machine. So I made some investigation. PETSC_HAVE_CHACO_INT_ASSIGNMENT is set only for --download-trilinos. This macro makes difference only at 4 places: At src/mat/partition/impls/ch

[petsc-dev] variable 'length' is uninitialized in src/sys/fileio/mprint.c

2018-05-03 Thread Vaclav Hapla
Barry, this is obviously wrong in current master: 14416c0e507 src/sys/fileio/mprint.c 791) size_t length; cb500232d0b src/sys/fileio/mprint.c 792) char buff[length]; It results in warning: variable 'length' is uninitialized when used here [-Wuninitialized] when the PETSC_HAVE_

Re: [petsc-dev] calling petsc from a mex file

2018-05-10 Thread Vaclav Hapla
I confirm the same problem. But I also don't know how to fix this systematically in the buildsystem. I found hard-coded -L options here https://bitbucket.org/petsc/petsc/src/9e21ac129fc054b3abeb584f186c61369f6d442a/config/BuildSystem/config/packages/MatlabEngine.py#lines-39 but I'm in doubts I

[petsc-dev] hang while saving non-distributed Exodus mesh

2018-05-24 Thread Vaclav Hapla
Hello I wanted to load an Exodus mesh and immediately save it into HDF5 (i.e. use PETSc just for the conversion) without distributing (needed for reproducing another issue). See https://bitbucket.org/petsc/petsc/branch/haplav/fix-dmplex-immediate-exodus-hdf5-save. But then there's a problem wi

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-06-29 Thread Vaclav Hapla
> 22. 6. 2018 v 17:47, Smith, Barry F. : > > > >> On Jun 22, 2018, at 5:43 AM, Pierre Jolivet >> wrote: >> >> Hello, >> I’m solving a system using a MATSHELL and PCGAMG. >> The MPIAIJ Mat I’m giving to GAMG has a specific structure (inherited from >> the MATSHELL) I’d like to exploit duri

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
u have to define MatMult_custom where you take the original mult and wrap into PetscStageLogPush/Pop and then use MatSetOperation to redefine MatMult. Or do you mean something more elegant? Thanks Vaclav > 29. 6. 2018 v 22:42, Smith, Barry F. : > > > >> On Jun 29, 2018,

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 14:48, Matthew Knepley : > > On Mon, Jul 2, 2018 at 3:48 AM Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > Barry wrote: >> This could get ugly real fast, for example, for vector operations, there >> may be dozens of named vectors

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:05, Matthew Knepley : > > On Mon, Jul 2, 2018 at 7:54 AM Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: > > >> 2. 7. 2018 v 14:48, Matthew Knepley > <mailto:knep...@gmail.com>>: >> >> On Mon, Jul 2, 2018 at 3:

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:20, Stefano Zampini : > > > > 2018-07-02 11:48 GMT+03:00 Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>>: > Barry wrote: >> This could get ugly real fast, for example, for vector operations, there >> may be dozens of named ve

Re: [petsc-dev] GAMG and custom MatMults in smoothers

2018-07-02 Thread Vaclav Hapla
> 2. 7. 2018 v 15:50, Matthew Knepley : > > On Mon, Jul 2, 2018 at 8:28 AM Vaclav Hapla <mailto:vaclav.ha...@erdw.ethz.ch>> wrote: >> 2. 7. 2018 v 15:05, Matthew Knepley > <mailto:knep...@gmail.com>>: >> >> On Mon, Jul 2, 2018 at 7:54 AM

[petsc-dev] MatDestroy call in MatMerge

2012-02-26 Thread Vaclav Hapla
PI manual page: there is instead a synopsis of MatMerge_SeqsToMPINumeric because this comment is located above the MatMerge_SeqsToMPINumeric function in source. Thank you in advance for answer. Regards, Vaclav Hapla

[petsc-dev] MatCopy to zero preallocated matrix

2012-03-02 Thread Vaclav Hapla
llocated positions which are filled later. Is there some other convenient solution? Cheers, Vaclav Hapla

[petsc-dev] MatCopy to zero preallocated matrix

2012-03-02 Thread Vaclav Hapla
2/2012 12:06 AM, Matthew Knepley wrote: > On Thu, Mar 1, 2012 at 5:03 PM, Vaclav Hapla <mailto:vaclav.hapla at vsb.cz>> wrote: > > Dear PETSc team, > why I am not able to do this: > > ... > MatCreate(PETSC_COMM_SELF, &Kreg); > MatSetS

[petsc-dev] MatCopy to zero preallocated matrix

2012-03-02 Thread Vaclav Hapla
e information about the zero filter. But OK, 2. is not a problem in my case :-) Thank you, Vaclav On 03/02/2012 12:18 AM, Matthew Knepley wrote: > On Thu, Mar 1, 2012 at 5:14 PM, Vaclav Hapla <mailto:vaclav.hapla at vsb.cz>> wrote: > > This is what I used before for a lo