---
name: "SLOG_PROF_AddIntvlInfoWithArray"
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_PROF_AddIntvlInfoWithArray"
---

# SLOG\_PROF\_AddIntvlInfoWithArray(3)

Add one display description of an interval to the SLOG Display Profile table.

## NAME

SLOG\_PROF\_AddIntvlInfoWithArray -  Add one display description of an  interval to the SLOG Display  Profile table.

## SYNOPSIS

```
int SLOG_PROF_AddIntvlInfoWithArray(       SLOG_STREAM       *slog,
                                     const SLOG_intvltype_t   intvltype,
                                     const SLOG_bebit_t       bebit_0,
                                     const SLOG_bebit_t       bebit_1,
                                     const char *             classtype,
                                     const char *             label,
                                     const char *             color,
                                     const SLOG_N_args_t      Nargs,
                                           char             **arg_strs )
```

## MODIFIED INPUT VARIABLES

- **slog**

  \- pointer to the SLOG\_STREAM where SLOG Display Profile Table is located.

## UNMODIFIED INPUT VARIABLES

- **intvltype**

  \- index to the interval type.

- **bebit\_0**

  \- the 1st bebit.

- **bebit\_1**

  \- the 2nd bebit.

- **classtype**

  \- character string for the classtype of the interval

- **label**

  \- character string for the label of the interval

- **color**

  \- character string for the color of the interval

- **Nargs**

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

- **arg\_strs**

  \- pointer to an array of strings whose total number should  match Nargs supplied, otherwise, unpredicted behaviour  will occur.   If Nargs is 0, arg\_strs will be ignored, so NULL pointer can be used for this argument.

## MODIFIED OUTPUT VARIABLES

- **returned value**

  \- integer return status.

## USAGE NOTES ON THIS SUBROUTINE

all the input characters strings, classtype, label, color and the optional string argument description label are NOT allowed to be longer than SLOG\_STRING\_LEN - 1, including trailing null character. ( SLOG\_STRING\_LEN is defined in slog.h ).  They are also allowed to contain alphanumeric, underscore, blank and tab characters. But tab characters, if exist, in the string are all converted to blanks.

Notes on the Addition of Extra Interval Description. This note is to clarify the usage of SLOG\_PROF\_XXX() routines especially while the user wants to add extra interval description 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.

Also, the term interval descriptor refers to an entry in the Display Profile, so is the term interval information, abbrev. as \_IntvlInfo\_.  These 3 terms are used interchangably.

Under normal circumstances, the Display Profile table is created by first opening the section of the logfile for storing the table using SLOG\_PROF\_Open().  Then add the interval description using SLOG\_PROF\_AddIntvlInfo() and close the table section by SLOG\_PROF\_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\_PROF\_Open().  Then add the known record definitions using SLOG\_PROF\_AddIntvlInfo().  However, one should NOT call SLOG\_PROF\_Close() to close the table section.  Instead, SLOG\_PROF\_SetExtraNumOfIntvlInfos() should be called to set the extra number of interval description entries needed( the number can be greater than what one actually needs ).  Then when user encounters a new interval record type, SLOG\_PROF\_AddExtraIntvlInfo() can then be called to add the new interval record type to the Display Profile table.  This mechanism is very similar to that of Record Definition Table. Except for Record Definition Table, the above procedure 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.  For Display Profile, the same procedure is implmented to simplify the interface for user to store interval description information to the logfile, the interval description information is NOT important till logfile needs to be displayed graphically.

## INCLUDE FILE NEEDED

slog\_profile.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
