Reserve space in the current frame for the current interval record identified by record type ID and interval record type ID.
int SLOG_Irec_ReserveSpace( SLOG_STREAM *slog,
const SLOG_rectype_t rectype,
const SLOG_intvltype_t intvltype,
const SLOG_bebit_t bebit_0,
const SLOG_bebit_t bebit_1,
const SLOG_starttime_t starttime )
Modified Input Variables
- slog - pointer to the SLOG_STREAM where the interval record locates.
Unmodified Input Variables
- rectype - interval record's record field which determines if the
record is a FIXED, VARIABLE or Message record, this in turns
will determine the number of association and the number of
sets of MPI call arguments or the extra space needed for Message
- intvltype - interval record's interval type field.
- bebit_0 - interval record's first bebit.
- bebit_1 - interval record's second bebit.
- starttime - interval record's start time, used to check if the interval
follows the time order rule set by
SLOG_SetIncreasingStarttimeOrder(). The checking is only
done when user turns on the corresponding compiler
flag. If not, this input variable will not be used.
Modified Output Variables
- returned value - integer return status.
Usage Notes on this subroutine
*** IMPORTANT ***, this routine is totally optional.
User doesn't have to use this routine to use the API.
And this routine can only be called when the completed
interval records are arranged in increasing endtime order.
The subroutine allocates space in the current frame for the
interval record. Typically, the routine is called when user
knows only __start_event__ of an interval record without the
knowledge of the __end_event__. So the routine must be
called before calling SLOG_Irec_ToOutputStream(). For completed
interval records which are arranged in increasing endtime stamp
order, each interval record may be called with
SLOG_Irec_ReserveSpace() first when the time of the corresponding
__start_event__ is known and called with SLOG_Irec_ToOutputStream()
when the time of the corresponding __end_event__ is known. Also
the routine will check if the starttime supplied is called in
increasing time order which is a sufficient condition to guarantee
that space reservation for every pseudo record in each frame.
Include File Needed
Notes on SLOG return status code
There are 5 allowed SLOG returned status codes. They include
SLOG_SUCCESS, SLOG_FAIL and SLOG_EOF. Their actual values
are defined in slog.h
SLOG_SUCCESS is returned when no error is encountered.
SLOG_FAIL is returned when error is encounted.
SLOG_EOF is returned when End of file is encounted.
There are also SLOG_TRUE and SLOG_FALSE which are sued as boolean
values, in particular they are used in boolean functions which
are usually named as IsXXXXX(), AreXXXXX() and HasXXXXX().