ROCm / rocALUTION

Next generation library for iterative sparse solvers for ROCm platform
https://rocm.docs.amd.com/projects/rocALUTION/en/latest/
MIT License
74 stars 38 forks source link

ruge_stueben_amg.hpp does not compile with hipcc (clang-14) #151

Closed doctorcolinsmith closed 2 years ago

doctorcolinsmith commented 2 years ago

The following was reported by @dipietrantonio in https://github.com/ROCmSoftwarePlatform/rocALUTION/issues/144. Breaking it out to a separate issue here.

rocALUTION/src/solvers/multigrid/ruge_stueben_amg.hpp:

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32)
#else
        [[deprecated("This function will be removed in a future release. Use "
                     "SetStrengthThreshold() instead")]]
#endif

Had to remove the code in the else block because it wouldnt compile using hipcc (clang-14).

cgmb commented 2 years ago

rocSOLVER started using a deprecation style with compiler detection for MSVC, GCC and Clang about 13 months ago and there have been no complaints thus far: https://github.com/ROCmSoftwarePlatform/rocSOLVER/blob/rocm-5.2.3/library/include/rocsolver-aliases.h

rocALUTION has different users than rocSOLVER, so I suppose they could find an edge case we haven't encountered. Nevertheless, it's an approach that is at least somewhat battle-tested, so you may wish to consider adopting something like that.

jsandham commented 2 years ago

I believe this is now fixed and I think was caused by The ROCALUTION_EXPORT being located above the deprecation attribute. This is now fixed in master branch. See https://github.com/ROCmSoftwarePlatform/rocALUTION/commit/f31b90bea1a4c9232c64211fca2d0b4678f25fc7

jsandham commented 2 years ago

Closing as fixed for rocm-5.3.