---
name: "SLOG_RDEF_AddRecDef"
section: "3"
platform: "linux"
package: "mpi-doc"
version: "1.2.5.3-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/SLOG_RDEF_AddRecDef"
---

# SLOG\_RDEF\_AddRecDef(3)

Add one definition to the SLOG Record Definition table.

## NAME

SLOG\_RDEF\_AddRecDef -  Add one definition to the SLOG Record Definition table.

## SYNOPSIS

```
int SLOG_RDEF_AddRecDef(       SLOG_STREAM          *slog,
                         const SLOG_intvltype_t      intvltype,
                         const SLOG_bebit_t          bebit_0,
                         const SLOG_bebit_t          bebit_1,
                         const SLOG_N_assocs_t       Nassocs,
                         const SLOG_N_args_t         Nargs )
```

## MODIFIED INPUT VARIABLES

- **slog**

  \- pointer to the SLOG\_STREAM where SLOG Record Definition Table is located.

## UNMODIFIED INPUT VARIABLES

- **intvltype**

  \- label to the interval type.

- **bebit\_0**

  \- the 1st bebit.

- **bebit\_1**

  \- the 2nd bebit.

- **Nassocs**

  \- Number of assocications for this interval record type.

- **Nargs**

  \- Number of MPI call argument for this interval record type.

## MODIFIED OUTPUT VARIABLES

- **returned value**

  \- integer return status.

## USAGE NOTES ON THIS SUBROUTINE

Notes on the Addition of Extra Record Definitions This note is to clarify the usage of SLOG\_RDEF\_XXX() routines especially while the user wants to add extra record definitions to the logfile when the process of addition of interval records to the logfile has been started, for instance if one needs to add user marker interval records.

Under normal circumstances, the record definition table is created by first opening the section of the logfile for storing the table using SLOG\_RDEF\_Open().  Then add the record definition using SLOG\_RDEF\_AddRecDef() and close the table section by SLOG\_RDEF\_Close().

In the case that the logfile involves interval records whose interval type are NOT known until the process of inserting of the interval records to the logfile has been started, one should open the SLOG\_RDEF\_Open().  Then add the known record definitions using SLOG\_RDEF\_AddRecDef().  However, one should NOT call SLOG\_RDEF\_Close() to close the table section.  Instead, SLOG\_RDEF\_SetExtraNumOfRecDefs() should be called to set the extra number of record definition entries needed( the number can be greater than what one actually needs ).  Then when user encounters a new interval record type, SLOG\_RDEF\_AddExtraRecDef() can then be called to add the new interval record type to the record definition table.  This has to be done before adding the interval record to the logfile using SLOG\_Irec\_ToOutputStream() which does NOT allow interval record of with unknown interval type to the record definition table.

## INCLUDE FILE NEEDED

slog\_recdefs.h

## 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().\

## LOCATION
