Purpose
Returns the state of interrupts on a node.
Library
libmpi.a
C synopsis
#include <pm_util.h> int mpc_queryintr();
FORTRAN synopsis
MP_QUERYINTR(INTEGER RC)
Parameters
In FORTRAN, RC will contain one of the values listed under Return Values.
Description
This parallel utility subroutine returns the state of interrupts on a node.
Notes
Return values
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: