mpiRecorderValidate

Declaration

int32_t mpiRecorderValidate(MPIRecorder recorder)

 

Required Header: stdmpi.h

Description

mpiRecorderValidate validates the Recorder object and its handle. RecorderValidate should be called immediately after an object is created.

It is possible to create a recorder object and not delete it, leaving the resources for the recorder occupied, but forgotten about (abandoned). It is most common to run into this situation when using an index of -1 for the recorder. When developing a program and running it in the debugger, it is common for the developer to exit the program without letting the program clean up its recorder resources.

recorder a handle to a Recorder object
Return Values
MPIMessageOK
MPIRecorderMessageNOT_ENABLED
MPIRecorderMessageNO_RECORDERS_AVAIL

Sample Code

/*
This Function Creates a Recorder. Pass in the Recorder handle, and the recorder number. To create the next available recorder, pass in -1 for recorderNumber
*/ int32_t recorderInit(MPIControl *control, MPIRecorder *recorder, int32_t recorderNumber) { int32_t returnValue; // Create recorder object *recorder = mpiRecorderCreate(*control, recorderNumber); returnValue = mpiRecorderValidate(*recorder);
return returnValue; }

See Also

mpiRecorderCreate | mpiRecorderDelete