:orphan: # VecStashSetInitialSize sets the sizes of the vec-stash, that is used during the assembly process to store values that belong to other processors. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecStashSetInitialSize(Vec vec, PetscInt size, PetscInt bsize) ``` Not Collective, different processes can have different size stashes ## Input Parameters - ***vec -*** the vector - ***size -*** the initial size of the stash. - ***bsize -*** the initial size of the block-stash(if used). ## Options Database Keys - ***-vecstash_initial_size or - ***-vecstash_block_initial_size or ## Notes The block-stash is used for values set with `VecSetValuesBlocked()` while the stash is used for values set with `VecSetValues()` Run with the option -info and look for output of the form VecAssemblyBegin_MPIXXX:Stash has MM entries, uses nn mallocs. to determine the appropriate value, MM, to use for size and VecAssemblyBegin_MPIXXX:Block-Stash has BMM entries, uses nn mallocs. to determine the value, BMM to use for bsize PETSc attempts to smartly manage the stash size so there is little likelihood setting a a specific value here will affect performance ## See Also [](ch_vectors), `Vec`, `VecSetBlockSize()`, `VecSetValues()`, `VecSetValuesBlocked()`, `VecStashView()` ## Level intermediate ## Location src/vec/vec/interface/vector.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/vector.c) [Index of all Vec routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)