# PetscDeviceInitializePackage
This function initializes everything in the `PetscDevice` package. It is called on the first call to `PetscDeviceContextCreate()` or `PetscDeviceCreate()` when using shared or static libraries. 
## Synopsis
```
#include <petscdevice.h> 
PetscErrorCode PetscDeviceInitializePackage(void)
```



## See Also
 `PetscInitialize()`, `PetscDeviceFinalizePackage()`, `PetscDeviceContextCreate()`,
`PetscDeviceCreate()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/util/devicereg.c.html#PetscDeviceInitializePackage">src/sys/objects/device/util/devicereg.c</A>


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