# PETSCSPRNG
access to the publically available random number generator sprng 
## Options Database Keys

- ***-random_type <rand,rand48,sprng> -*** select the random number generator at runtime



## Note
PETSc must be ./configure with the option --download-sprng to use this random number generator.


## Developer Note
This is NOT currently using a parallel random number generator. Sprng does have
an MPI version we should investigate.




## See Also
 `RandomCreate()`, `RandomSetType()`, `PETSCRAND`, `PETSCRAND48`, `PetscRandomSetFromOptions()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/random/impls/sprng/sprng.c.html#PETSCSPRNG">src/sys/classes/random/impls/sprng/sprng.c</A>


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