# PetscGetProgramName
Gets the name of the running program. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscGetProgramName(char name[], size_t len)
```
Not Collective


## Input Parameter

- ***len -*** length of the string name



## Output Parameter

- ***name -*** the name of the running program, provide a string of length `PETSC_MAX_PATH_LEN`





## Level
advanced

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/pinit.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)  
