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

remove boost::aligned_alloc #1094

Merged

Conversation

psychocoderHPC
Copy link
Member

@psychocoderHPC psychocoderHPC commented Jul 21, 2020

based on the suggestions from #481 (comment) and #481 (comment)

  • remove dependency to boost aligned allocation

  • remove boost in filenames which was providing aligned memory via boost
    implementations

  • add AlignedAlloc.hpp

  • need tests on OpenPower system

BenjaminW3
BenjaminW3 previously approved these changes Jul 21, 2020
@psychocoderHPC
Copy link
Member Author

@BenjaminW3 could you please check on your windows system if our BOOST_COMP_MSVC is working correctly.
Somehow the wrong code path on some windows tests with nvcc was passed https://github.com/alpaka-group/alpaka/pull/1094/checks?check_run_id=893689157#step:3:3240

@psychocoderHPC
Copy link
Member Author

psychocoderHPC commented Jul 21, 2020

@BenjaminW3 could you please check on your windows system if our BOOST_COMP_MSVC is working correctly.
Somehow the wrong code path on some windows tests with nvcc was passed https://github.com/alpaka-group/alpaka/pull/1094/checks?check_run_id=893689157#step:3:3240

I think I need to check for windows instead of msvc because nvcc is not msvc ^^. Is there a boost define for windows or do I need to use the define WIN32?

@BenjaminW3
Copy link
Member

We often use BOOST_COMP_MSVC || defined(BOOST_COMP_MSVC_EMULATED). This may help.

@psychocoderHPC
Copy link
Member Author

for OSX we need to use posix_memalign https://stackoverflow.com/a/22876707

@psychocoderHPC
Copy link
Member Author

todo: for aligned_alloc we need to round the size to a multiple of the alignment https://en.cppreference.com/w/c/memory/aligned_alloc

- remove dependency to boost aligned allocation
- remove boost in filenames which was providing aligned memory via boost
implementations
- add `AlignedAlloc.hpp`
@psychocoderHPC
Copy link
Member Author

We often use BOOST_COMP_MSVC || defined(BOOST_COMP_MSVC_EMULATED). This may help.

thx, I found that there is a BOOST_OS_WINDOWS which will be the better way and for OSX BOOST_OS_MACOS

@psychocoderHPC
Copy link
Member Author

IMO it can be merged. all failing ci build run into download issues.

@BenjaminW3 BenjaminW3 merged commit 34870a7 into alpaka-group:develop Jul 23, 2020
@psychocoderHPC psychocoderHPC deleted the topic-removeBoostAlignedAlloc branch July 27, 2020 15:27
@psychocoderHPC
Copy link
Member Author

psychocoderHPC commented Jul 27, 2020

I found here in PIConGPU that this PR is not working on systems with a very old glibc.
The system is a ubuntu 12.04. I do not see it as a problem but we should be aware of this behaviour.
The error will be:

alpaka/core/AlignedAlloc.hpp(40): error #282: the global scope has no "aligned_alloc"

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