# PetscPreLoadEnd
End a segment of code that may be preloaded (run twice) to get accurate timings 
## Synopsis
```
#include <petsclog.h>
void PetscPreLoadEnd(void);
```
Not Collective


## Usage
```none
     PetscPreLoadBegin(PETSC_TRUE,"first stage);
       lines of code
       PetscPreLoadStage("second stage");
       lines of code
     PetscPreLoadEnd();
```





## Note
Only works in C/C++ not fortran


## See Also
 [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscPreLoadBegin()`, `PetscPreLoadStage()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/logging/plog.c.html#PetscPreLoadEnd">src/sys/logging/plog.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex10.c.html">src/ksp/ksp/tutorials/ex10.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex27.c.html">src/ksp/ksp/tutorials/ex27.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex72.c.html">src/ksp/ksp/tutorials/ex72.c.html</A><BR>


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


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