HOME
| OPENMP API Specification: Version 5.1 November 2020

5.5.2  Per OpenMP Process Initialization and Finalization

5.5.2.1 ompd_process_initialize

Summary A tool calls ompd_process_initialize to obtain an address space handle when it initializes a session on a live process or core file.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_process_initialize( 
  ompd_address_space_context_t *context, 
  ompd_address_space_handle_t **handle 
);  

SVG-Viewer needed.

Description A tool calls ompd_process_initialize to obtain an address space handle when it initializes a session on a live process or core file. On return from ompd_process_initialize, the tool owns the address space handle, which it must release with ompd_rel_address_space_handle. The initialization function must be called before any OMPD operations are performed on the OpenMP process or core file. This call allows the OMPD library to confirm that it can handle the OpenMP process or core file that context identifies.

Description of Arguments The context argument is an opaque handle that the tool provides to address an address space. On return, the handle argument provides an opaque handle to the tool for this address space, which the tool must release when it is no longer needed.

Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or the following return code:

Cross References

5.5.2.2 ompd_device_initialize

Summary A tool calls ompd_device_initialize to obtain an address space handle for a device that has at least one active target region.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_device_initialize( 
  ompd_address_space_handle_t *process_handle, 
  ompd_address_space_context_t *device_context, 
  ompd_device_t kind, 
  ompd_size_t sizeof_id, 
  void *id, 
  ompd_address_space_handle_t **device_handle 
);  

SVG-Viewer needed.

Description A tool calls ompd_device_initialize to obtain an address space handle for a device that has at least one active target region. On return from ompd_device_initialize, the tool owns the address space handle.

Description of Arguments The process_handle argument is an opaque handle that the tool provides to reference the address space of the OpenMP process or core file. The device_context argument is an opaque handle that the tool provides to reference a device address space. The kind, sizeof_id, and id arguments represent a device identifier. On return the device_handle argument provides an opaque handle to the tool for this address space.

Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or the following return code:

Cross References

5.5.2.3 ompd_rel_address_space_handle

Summary A tool calls ompd_rel_address_space_handle to release an address space handle.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_rel_address_space_handle( 
  ompd_address_space_handle_t *handle 
);  

SVG-Viewer needed.

Description When the tool is finished with the OpenMP process address space handle it should call ompd_rel_address_space_handle to release the handle, which allows the OMPD library to release any resources that it has related to the address space.

Description of Arguments The handle argument is an opaque handle for the address space to be released.

Restrictions Restrictions to the ompd_rel_address_space_handle routine are as follows:

Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5.

Cross References