Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openmp: fix FLOP/s calculation #27

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from

Conversation

milthorpe
Copy link

The GFLOP/s calculation in printTimings() for the OpenMP implementation was reporting incorrect (negative) values for large inputs, due to overflow. Computing ops_per_wg using long (rather than 32-bit) ints fixes the problem.

To test, run e.g.

./bude --deck ../data/bm2

before this change, miniBUDE reported:

...
Running C/OpenMP
- Total time:     30353.730 ms
- Average time:   3794.216 ms
- Interactions/s: 123.319 billion
- GFLOP/s:        -61.996
- GFInst/s:       3082.980

after the change, it reports:

Running C/OpenMP
- Total time:     30727.736 ms
- Average time:   3840.967 ms
- Interactions/s: 121.818 billion
- GFLOP/s:        3660.127
- GFInst/s:       3045.456

The GFLOP/s calculation in printTimings() for the OpenMP implementation
was reporting incorrect (negative) values for large inputs, due to overflow.
Computing ops_per_wg using long (rather than 32-bit) ints fixes the problem.
@milthorpe milthorpe changed the title fix FLOP/s calculation for OpenMP openmp: fix FLOP/s calculation Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant