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

Change run_as_os_thread deprecation forwarding due to hipcc compilation issue #6416

Merged
merged 1 commit into from
Jan 13, 2024

Conversation

G-071
Copy link
Member

@G-071 G-071 commented Jan 13, 2024

Moving run_as_os_thread from the namespace hpx::threads to the namespace hpx caused some compilations with the AMD hipcc comiler (rocm 5.7.3) :

  >> 1320    /work/gdaiss/spack_workshop/spack_new/opt/spack/linux-rhel8-zen2/rocmcc-5.7.3/hpx-master-redf563a75azthtk2hmqogvlynvmf5zt/include/hpx/runtime_local/run_as_os_thread.hpp:43:38: error: no matching function for call to 'forward'
     1321            return hpx::run_as_os_thread(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...);
     1322                                         ^~~~~~~~~~~~~~~~~
     1323    /work/gdaiss/spack_workshop/spack_new/opt/spack/linux-rhel8-zen2/rocmcc-5.7.3/hpx-masterredf563a75azthtk2hmqogvlynvmf5zt/include/hpx/config/forward.hpp:14:29: note: expanded from macro 'HPX_FORWARD'
     1324    #define HPX_FORWARD(T, ...) std::forward<T>(__VA_ARGS__)
     1325                                ^~~~~~~~~~~~~~~
     1326    /work/gdaiss/spack_workshop/octotiger-src-kamand2/src/io/silo_out.cpp:521:16: note: in instantiation of function template specialization 'hpx::threads::run_as_os_thread<(lambda at /work/gdaiss/spack_workshop/octotiger-src-kamand2/src/io/silo_out.cpp:521:33)>' requested here
     ...
     1330        forward(typename std::remove_reference<_Tp>::type& __t) noexcept
     1331        ^
     1332    /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/move.h:89:5: note: candidate function template not viable: 1st argument ('const (lambda at /work/gdaiss/spack_workshop/octotiger-src-kamand2/src/io/silo_out.cpp:521:33)') would lose const qualifier
     1333        forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
     1334        ^
     1335    3 errors generated when compiling for host.

This PR fixes the issue!

Of course, this issue can also be circumvented by using the new namespace (as done in STEllAR-GROUP/octotiger#476). However, that is incompatible with HPX 1.9.1 so I would like to wait with merging that Octo-Tiger PR at least until the next stable HPX release.

This const casued some issues with hipcc 5.7.3
@G-071 G-071 requested a review from hkaiser as a code owner January 13, 2024 22:25
Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@G-071 excellent catch! LGTM, thanks!

@hkaiser hkaiser added this to the 1.10.0 milestone Jan 13, 2024
@hkaiser hkaiser merged commit 797ad73 into STEllAR-GROUP:master Jan 13, 2024
31 of 45 checks passed
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.05%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e8b7598) 200893 171137 85.19%
Head commit (1d8dde8) 190473 (-10420) 162162 (-8975) 85.14% (-0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6416) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants