https://github.com/jefflarkin/acc-events
https://github.com/jefflarkin/acc-events
openacc
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jefflarkin/acc-events
- Owner: jefflarkin
- Created: 2022-08-03T20:17:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-03T21:15:08.000Z (over 3 years ago)
- Last Synced: 2025-02-01T08:30:08.542Z (11 months ago)
- Topics: openacc
- Language: Fortran
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# acc-events - Examples for using the OpenACC Profiling Events API
The purpose of this repository is to provide a demonstration of how to write
simple tools using the OpenACC Events API (formerly Profiling Interface).
Nothing in this repository is intended for production use, use at your own risk.
## Examples
1. acc_data_migrate_tool.c - Will print to the console whenever data is
implicitly copied to or from the device. Useful for identifying data structures
that should be added to explicit data clauses. **NOTE:** As-written this tool
can be ***very*** verbose.
2. acc_data_migrate_tool_color.c - Same as
acc_data_migrate_tool.c, but prints with ANSI colors.
## Build
The included Makefile provides examples for building both `libacctool.so` and
`libacctoolcolor.so` using the NVIDIA compilers. Options should be adapted when
used with other compilers.
## Usage
The included Makefile demonstrates how to use the two libraries with an included
sample application. More generally, to use with an arbitrary executable simply
set set `ACC_PROFLIB=""` when running the executable.
## Recommendations
Printing to the console from the profiling library may introduce a significant
overhead and result in a large amount of output. It is likely a better practice
to record details to memory or a database (sqlite, for instance) and print only
periodically or at the very end, unless the output is needed immediately for
your specific use case.