[petsc-users] printing help
Barry Smith
bsmith at mcs.anl.gov
Wed Jan 15 16:03:29 CST 2014
Blaise,
Currently there is no way to do this. For a given object it will only print the help message once, but if you create two objects of the same type and do XXXSetFromOptions() for each it will print it twice. Note that if all the prefixes for the objects are different then this is what you want. However if you are not setting prefix options seemingly identical help messages will get printed.
To change this we would need to introduce a way of tracking alreadyprinted per class and per prefix instead of per object. It is unlikely we will change this. We recommend not using VecSetFromOptions() and MatSetFromOptions() in real applications and for each KSP, SNES, and TS using a different prefix so the help is appropriate.
I agree getting a bunch of identical help messages is annoying.
Barry
On Jan 15, 2014, at 1:04 PM, Blaise A Bourdin <bourdin at lsu.edu> wrote:
> Hi,
>
> Is there a way to prevent the help section for basic objects from being printed multiple times? In the attached example, the basic help for Vec and Mat is printed twice, but I would prefer if it were printed only once.<testPrintOptions.c>
> bourdin at galerkin:Options $ ./testPrintOptions -h
> --------------------------------------------------------------------------
> Petsc Development GIT revision: v3.4.3-2316-gaf107cc GIT Date: 2014-01-15 10:14:00 -0600
> The PETSc Team
> :
> :
> :
> Vector (Vec) options -------------------------------------------------
> -vec_type <mpi>: Vector type (one of) seq mpi standard shared (VecSetType)
> Vector (Vec) options -------------------------------------------------
> -vec_type <mpi>: Vector type (one of) seq mpi standard shared (VecSetType)
> Options for SEQAIJ matrix -------------------------------------------------
> -mat_no_unroll: <FALSE> Do not optimize for inodes (slower) (None)
> -mat_no_inode: <FALSE> Do not optimize for inodes -slower- (None)
> -mat_inode_limit <5>: Do not use inodes larger then this value (None)
> 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 mpibstrm seqbstrm mpisbstrm seqsbstrm mpidense seqdense mpiadj scatter blockmat nest (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)
> -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)
> Options for SEQAIJ matrix -------------------------------------------------
> -mat_no_unroll: <FALSE> Do not optimize for inodes (slower) (None)
> -mat_no_inode: <FALSE> Do not optimize for inodes -slower- (None)
> -mat_inode_limit <5>: Do not use inodes larger then this value (None)
> 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 mpibstrm seqbstrm mpisbstrm seqsbstrm mpidense seqdense mpiadj scatter blockmat nest (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)
> -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)
>
>
> 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
>
>
>
>
>
>
>
More information about the petsc-users
mailing list