Skip to main content
`Ctrl`+`K`

# PetscSetProgramName

Set the program name reported by `PetscGetProgramName()`

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscSetProgramName(const char name[])

Not Collective

## Input Parameter

- name - the program name to record

## Note

The program name is normally set automatically by `PetscInitialize()` from `argv[0]`; only call this directly when the detected name is incorrect (for example when PETSc is embedded in a host application).

## See Also

`PetscGetProgramName()`, `PetscInitialize()`

## Level

developer

## Location

src/sys/objects/pinit.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages