NAME

PAPI_set_domain - set the default execution domain for new event sets

CONTENTS

Synopsis
Description
Arguments
Return Values
Errors
Examples
Authors
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

int PAPI_set_domain(int domain); 

Fortran Interface

#include fpapi.h 

PAPIF_set_domain(C_INT domain, C_INT check) 

PAPIF_set_event_domain(C_INT EventSet, C_INT domain, C_INT check) 

DESCRIPTION

PAPI_set_domain sets the default execution domain for all new event sets created by PAPI_create_eventset (3) in all threads. Event sets that are already in existance are not affected. To change the domain of an existing event set, please see the PAPI_set_opt (3) man page. The reader should note that the domain of an event set affects only which mode the counter continue to run. Counts are still aggregated for the current process, and not for any other processes in the system. Thus when requesting PAPI_DOM_KERNEL, the user is asking for events that occur on behalf of the process, inside the kernel.

ARGUMENTS

domain -- one of the following constants as defined in the papi.h header file:

PAPI_DOM_USERUser context counted
PAPI_DOM_KERNELKernel/OS context counted
PAPI_DOM_OTHERException/transient mode counted
PAPI_DOM_ALLAll above contexts counted
PAPI_DOM_MINThe smallest available context
PAPI_DOM_MAXThe largest available context

RETURN VALUES

On success, this function returns PAPI_OK.
On error, a non-zero error code is returned.

ERRORS

PAPI_EINVAL
  One or more of the arguments is invalid.
PAPI_ENOEVST
  The event set specified does not exist.
PAPI_EISRUN
  The event set is currently counting events.

EXAMPLES


int retval;

/* Initialize the library */

retval = PAPI_library_init(PAPI_VER_CURRENT);

if (retval > 0 && retval != PAPI_VER_CURRENT) { fprintf(stderr,"PAPI library version mismatch!0); exit(1); }

if (retval < 0) handle_error(retval);

if ((retval = PAPI_set_domain(PAPI_DOM_KERNEL)) != PAPI_OK) handle_error(retval);

if ((retval = PAPI_create_eventset(&EventSet)) != PAPI_OK) handle_error(retval);

AUTHORS

The PAPI Team. See them at the PAPI Web Site: http://icl.cs.utk.edu/projects/papi

BUGS

This function has no known bugs.

SEE ALSO

PAPI_set_opt (3)


PAPI Programmer’s Reference PAPI_set_domain (3) November, 2003

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee