exclude_bytes, EXCLUDE_BYTES

exclude_bytes (for C programs) and EXCLUDE_BYTES (for FORTRAN programs) excludes a range of a program's virtual memory from being checkpointed.

Synopsis

For C programs:

int exclude_bytes(caddr_t addr, size_t size, int usage)


For FORTRAN programs:

EXTERNAL EXCLUDE_BYTES

INTEGER EXCLUDE_BYTES

INTEGER FLAG

INTEGER ARR

INTEGER ARRSIZE

ERR = EXCLUDE_BYTES(ARR, ARRSIZE*INTSIZE, 0)

Description

Exclude_bytes() excludes a region of virtual memory in the calling process from subsequent checkpoints. The usage flag is currently ignored.

The memory region that was excluded can be included again via include_bytes (or INCLUDE_BYTES for FORTRAN programs) function calls.

Return Value

Both functions return 0 upon success and a negative value upon failure.

Example

In the following example, the programmer decides to checkpoint in between to matrix multiplications. In each call to MULT_MATRIX, the first two matrices are the two multiplicants, and the resultant matrix is stored in C. Since C is updated right after checkpoint/recovery, its value does not alter program behavior, we can safely exclude the entire matrix C from being checkpointed.

CALL MULT_MATRIX(A, B, C)

do some other business

EXCLUDE_BYTES(C, ROW*COL*DBLSIZE, 0)

ERR = CHECKPOINT_HERE (CKPT_IMMEDIATE)

IF (ERR .EQ. -1 .AND. MYNODE() .EQ. 0 ) THEN

WRITE (*,*) 'EXCLUDE_BYTES FAILED with ', ERR

STOP

ENDIF

IF (ERR .EQ. 1 .AND. MYNODE() .EQ. 0 ) THEN

WRITE (*,*) 'WE JUST RECOVERED FROM A CHECKPOINT'

ENDIF

CALL MULT_MATRIX(X, Y, C)

program continues