IBM Books

MPI Programming Guide

MP_ENABLEINTR, mpc_enableintr

Purpose

Enables message arrival interrupts on a node.

Library

libmpi.a

C synopsis

#include <pm_util.h>
int mpc_enableintr();

FORTRAN synopsis

MP_ENABLEINTR(INTEGER RC)

Parameters

In FORTRAN, RC will contain one of the values listed under Return Values.

Description

This parallel utility subroutine enables message arrival interrupts on the individual node on which it is run. Use this subroutine to dynamically control masking interrupts on a node.

Notes

Return values

0
indicates successful completion.

-1
indicates that the MPI library was not active. The call was either made before MPI_INIT or after MPI_FINALIZE.

Examples

C Example

/*
 * Running this program, after compiling with mpcc,
 * without setting the MP_CSS_INTERRUPT environment variable,
 * and without using the "-css_interrupt" command-line option,
 * produces the following output:
 *
 *    Interrupts are DISABLED
 *    About to enable interrupts..
 *    Interrupts are ENABLED
 *    About to disable interrupts...
 *    Interrupts are DISABLED
 */
 
#include "pm_util.h"
 
#define QUERY if (intr = mpc_queryintr()) {\
   printf("Interrupts are ENABLED\n");\
  } else {\
   printf("Interrupts are DISABLED\n");\
  }
 
main()
{
 int intr;
 
 QUERY
 
 printf("About to enable interrupts...\n");
 mpc_enableintr();
 
 QUERY
 
 printf("About to disable interrupts...\n");
 mpc_disableintr();
 
 QUERY
}

FORTRAN Example

Running this program, after compiling with mpxlf, without setting the MP_CSS_INTERRUPT environment variable, and without using the "-css_interrupt" command-line option, produces the following output:

      Interrupts are DISABLED
      About to enable interrupts..
      Interrupts are ENABLED
      About to disable interrupts...
      Interrupts are DISABLED
 
 
 
      PROGRAM INTR_EXAMPLE
 
      INTEGER RC
 
      CALL MP_QUERYINTR(RC)
      IF (RC .EQ. 0) THEN
         WRITE(6,*)'Interrupts are DISABLED'
      ELSE
         WRITE(6,*)'Interrupts are ENABLED'
      ENDIF
 
      WRITE(6,*)'About to enable interrupts...'
      CALL MP_ENABLEINTR(RC)
 
      CALL MP_QUERYINTR(RC)
      IF (RC .EQ. 0) THEN
         WRITE(6,*)'Interrupts are DISABLED'
      ELSE
         WRITE(6,*)'Interrupts are ENABLED'
      ENDIF
 
      WRITE(6,*)'About to disable interrupts...'
      CALL MP_DISABLEINTR(RC)
 
      CALL MP_QUERYINTR(RC)
      IF (RC .EQ. 0) THEN
         WRITE(6,*)'Interrupts are DISABLED'
      ELSE
         WRITE(6,*)'Interrupts are ENABLED'
      ENDIF
 
      STOP
      END

Related information

Subroutines:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]