- changed milestone to 2020.3.0 release
- changed title to __builtin_assume_aligned is not portable, breaking IBM XL
__builtin_assume_aligned is not portable, breaking IBM XL
I tried the IBM XL compilers on Summit, now that PGI support has been merged.
I hit the following:
/autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/utility.hpp:77:17: error: 1540-2993 The builtin "__builtin_assume_aligned" is not supported.
std::memcpy(__builtin_assume_aligned(dst, align),
^
That appears to be the only problem preventing at least rudimentary support for IBM's compilers!
I apply the following change (Yes, I know it defeats the purpose of the function):
--- a/src/utility.hpp
+++ b/src/utility.hpp
@@ -74,8 +74,8 @@ namespace detail {
template<std::size_t align>
inline void memcpy_aligned(void *dst, void const *src, std::size_t sz) noexcept {
- std::memcpy(__builtin_assume_aligned(dst, align),
- __builtin_assume_aligned(src, align), sz);
+ std::memcpy(dst,
+ src, sz);
}
//////////////////////////////////////////////////////////////////////////////
Then the following works on Summit!
$ module load xl/16.1.1-1
$ export CC='xlc -F/ccs/home/hargrove/xlc.cfg.gcc.6.4.0'
$ export CXX='xlC -F/ccs/home/hargrove/xlc.cfg.gcc.6.4.0'
$ UPCXX_INSTALL_NOCHECK=1 ./install inst-xlc
[... lots of unknown Pragma warnings ...]
UPC++ successfully installed
I've not attempted to build or run any tests with the XL compilers, but that's not really the point of this issue.
Comments (5)
-
-
reporter -
assigned issue to
- marked as minor
-
assigned issue to
-
reporter Proposed resolution in pull request 169
-
reporter - changed status to resolved
Resolve issue 248 with __builtin_assume_aligned
This commit adds a configure-time probe for compiler support for
__builtin_assume_aligned()
and uses it to avoid use of this builtin when it is not supported.→ <<cset 42ce1919c308>>
-
reporter Merge pull request #169 into develop
→ <<cset f5b9e0949205>>
- Log in to comment
Bulk roll-over of unresolved issues to next milestone