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

Reduce excessive loop unrolling in lbgpu velocity interpolation #2982

Merged
merged 1 commit into from
Jul 10, 2019
Merged

Reduce excessive loop unrolling in lbgpu velocity interpolation #2982

merged 1 commit into from
Jul 10, 2019

Conversation

mkuron
Copy link
Member

@mkuron mkuron commented Jul 9, 2019

This caused excessive register usage, especially when combined with thrust. Issue discovered by @fweik in #2878.

It turns out that this is a problem for CUDA too, it just exhibits a different behavior. Instead of crashing like on HIP, CUDA just produces a large binary and slower code. In a perfect world, the compiler should display a warning, but I guess neither AMD nor Nvidia operate in a perfect world.

@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

Merging #2982 into python will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           python   #2982   +/-   ##
======================================
  Coverage      82%     82%           
======================================
  Files         525     525           
  Lines       26807   26807           
======================================
  Hits        22015   22015           
  Misses       4792    4792

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a211031...f6acc47. Read the comment docs.

@mkuron mkuron mentioned this pull request Jul 9, 2019
@KaiSzuttor
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Jul 10, 2019
2982: Reduce excessive loop unrolling in lbgpu velocity interpolation r=KaiSzuttor a=mkuron

This caused excessive register usage, especially when combined with thrust. Issue discovered by @fweik in #2878.

It turns out that this is a problem for CUDA too, it just exhibits a different behavior. Instead of crashing like on HIP, CUDA just produces a large binary and slower code. In a perfect world, the compiler should display a warning, but I guess neither AMD nor Nvidia operate in a perfect world.

Co-authored-by: Michael Kuron <mkuron@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Jul 10, 2019

Build succeeded

@bors bors bot merged commit f6acc47 into espressomd:python Jul 10, 2019
bors bot added a commit that referenced this pull request Jul 24, 2019
2984: Don't unroll loops with nontrivial loop bodies r=KaiSzuttor a=mkuron

Simple assignments and arithmetic are fine to unroll, but if there's a function call or a nested loop, unrolling is probably not useful

Follow-up to #2982.

Co-authored-by: Michael Kuron <mkuron@icp.uni-stuttgart.de>
bors bot added a commit that referenced this pull request Jul 25, 2019
2984: Don't unroll loops with nontrivial loop bodies r=KaiSzuttor a=mkuron

Simple assignments and arithmetic are fine to unroll, but if there's a function call or a nested loop, unrolling is probably not useful

Follow-up to #2982.

2993: Update Doxygen landing page r=RudolfWeeber a=jngrad

Fixes #2600, closes #294

Update Doxygen landing page and add a link to the Related Pages where detailed instructions are provided for developing new features in the C++ core.

2998: Benchmarks reliability r=RudolfWeeber a=jngrad

Since 4.0 a few things changed in the CMake workflow (either in espresso CMake files, or in newer CMake releases) that broke the benchmark functionality:
- changing myconfig.hpp doesn't always cause a full project recompilation (rare)
- ctest sometimes runs benchmarks in parallel

The benchmark bash scripts were also brittle. They were both refactored based on `build_cmake.sh`:
- trap mechanism with clear error message
- another trap with cleanup action
- simplified CMake logic
- ctest runs benchmarks in serial
- erase /build/src before each compilation

Other changes:
- don't print debug energy values in the CSV output
- some column names were changed
- the [wiki documentation](https://github.com/espressomd/espresso/wiki/Development#benchmarking) was updated accordingly
    - and it now discusses condor on ICP machines
- reduce risk of LJ simulation crashing with a longer energy minimization
- add a benchmark for bonded interactions
- print more info in stdout (config file being processed, energy during LJ minimization and simulation)

Co-authored-by: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Co-authored-by: Kai Szuttor <2150555+kaiszuttor@users.noreply.github.com>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
@mkuron mkuron deleted the patch-14 branch September 13, 2019 12:00
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.

2 participants