PetscInitializeNans

Intialize certain memory locations with NANs.

Synopsis

int PetscInitializeNans(Scalar *p,int n )
Not Collective

Input parameters

p - pointer to data
n - length of data (in Scalars)

Options Database Key

-trmalloc_nan -Activates PetscInitializeLargeInts() and PetscInitializeNans()

Notes

This routine is used to mark an array as being uninitialized, so thatif values are used for computation without first having been set, a floating point exception is generated.

This routine is useful for tracking down the use of uninitializedarray values. If the code is run with the -fp_trap option, it willstop if one of the "unitialized" values is used in a computation.

See Also

PetscInitializeLargeInts()

Location: src/sys/src/memorymtr.c
System Index
Table of Contents