# PetscOptionsGetAll
Lists all the options the program was run with in a single string. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscOptionsGetAll(PetscOptions options, char *copts[])
```
Not Collective


## Input Parameter

- ***options -*** the options database, use NULL for the default global database



## Output Parameter

- ***copts -*** pointer where string pointer is stored



## Notes
The array and each entry in the array should be freed with `PetscFree()`

Each process may have different values depending on how the options were inserted into the database




## See Also
 `PetscOptionsAllUsed()`, `PetscOptionsView()`, `PetscOptionsPush()`, `PetscOptionsPop()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/options.c.html#PetscOptionsGetAll">src/sys/objects/options.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/options.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
