[petsc-dev] MatSetFromOptions and help

Stefano Zampini stefano.zampini at gmail.com
Sun Sep 9 13:03:39 CDT 2018


mat/examples/tests/ex1.c

Yes, it raises an error for the matrix types aij and mffd, but the -h
output is still relevant. I'll open a PR tomorrow



Il Dom 9 Set 2018, 21:00 Smith, Barry F. <bsmith at mcs.anl.gov> ha scritto:

>
>
> > On Sep 9, 2018, at 4:54 AM, Stefano Zampini <stefano.zampini at gmail.com>
> wrote:
> >
> > I just noticed a strange behaviour in master. Take mat/examples/ex1.c
>
>    There is no such example and the examples in the tutorials and tests
> subdirectories don't work with the given arguments so where is this example?
>
>
> >
> > ./ex1 -h -mat_type mpiaij
> >
> > does not print the help for the specific MPIAIJ options, only the MPIAIJ
> options header
> >
> > ....
> > Matrix (Mat) options -------------------------------------------------
> >   -mat_block_size <-1>: Set the blocksize used to store the matrix
> (MatSetBlockSize)
> >   -mat_type <aij>: Matrix type (one of) mffd mpimaij seqmaij maij is
> shell composite mpiaij seqaij mpiaijperm seqaijperm seqaijcrl mpiaijcrl
> mpibaij seqbaij mpisbaij seqsbaij mpidense seqdense mpiadj scatter blockmat
> nest mpisell seqsell preallocator dummy hypre (MatSetType)
> >   -mat_is_symmetric: Checks if mat is symmetric on MatAssemblyEnd()
> (MatIsSymmetric)
> >   -mat_is_symmetric <0.>: Checks if mat is symmetric on MatAssemblyEnd()
> (MatIsSymmetric)
> >   -mat_null_space_test: <FALSE> Checks if provided null space is correct
> in MatAssemblyEnd() (MatSetNullSpaceTest)
> >   MPIAIJ options
> >   -mat_new_nonzero_location_err: <FALSE> Generate an error if new
> nonzeros are created in the matrix structure (useful to test preallocation)
> (MatSetOption)
> >
> > Instead, if you run e.g. MFFD, it works
> >
> > Matrix (Mat) options -------------------------------------------------
> >   -mat_block_size <-1>: Set the blocksize used to store the matrix
> (MatSetBlockSize)
> >   -mat_type <aij>: Matrix type (one of) mffd mpimaij seqmaij maij is
> shell composite mpiaij seqaij mpiaijperm seqaijperm seqaijcrl mpiaijcrl
> mpibaij seqbaij mpisbaij seqsbaij mpidense seqdense mpiadj scatter blockmat
> nest mpisell seqsell preallocator dummy hypre (MatSetType)
> >   -mat_is_symmetric: Checks if mat is symmetric on MatAssemblyEnd()
> (MatIsSymmetric)
> >   -mat_is_symmetric <0.>: Checks if mat is symmetric on MatAssemblyEnd()
> (MatIsSymmetric)
> >   -mat_null_space_test: <FALSE> Checks if provided null space is correct
> in MatAssemblyEnd() (MatSetNullSpaceTest)
> > Matrix-free Finite Differencing (MatMFFD) options
> -------------------------------------------------
> >   -mat_mffd_type <(null)>: Matrix free type (one of) ds wp
> (MatMFFDSetType)
> >   -mat_mffd_err <1.49012e-08>: set sqrt relative error in function
> (MatMFFDSetFunctionError)
> >   -mat_mffd_period <1>: how often h is recomputed (MatMFFDSetPeriod)
> >   -mat_mffd_check_positivity: <FALSE> Insure that U + h*a is nonnegative
> (MatMFFDSetCheckh)
> >   -mat_new_nonzero_location_err: <FALSE> Generate an error if new
> nonzeros are created in the matrix structure (useful to test preallocation)
> (MatSetOption)
> >   -mat_new_nonzero_allocation_err: <FALSE> Generate an error if new
> nonzeros are allocated in the matrix structure (useful to test
> preallocation) (MatSetOption)
> >
> > What is the proper fix? remove the PetscOptionsBegin call and replace
> PetscOptionsEnd() with PetscOptionsTail()?
> >
> > --
> > Stefano
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180909/86cdaf41/attachment.html>


More information about the petsc-dev mailing list