-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Allow mixing debug and release builds #5099
Conversation
There is no reason to use this anywhere, even more as we map it onto
Yes, this auto-added in Debug builds. It is mapped onto
Yes.
This is auto-added on windows for non-debug builds, there shouldn't be any reason for us to use it. Also, we should replace all
I think this is a leftover from times when this macro caused |
Perfect, thanks @hkaiser for confirming all these!
I was hoping I could remove that mapping (it's already gone on this branch), since with the mapping we can still end up with inconsistent flags (user code code compiled with |
This is not as bad as it sounds. I rechecked and we have it in the moodycamel queue header. It's already excluded from inspect. It might be worth leaving the The other place where we use |
3d5207c
to
8c7b0a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add CI configurations making sure using a Debug version from a release build and v.v. is actually functional? I'd like to see that for all major platforms (at least Linux and Windows).
That's my last concern. The build unit tests now build the hello world component example in four different build types. It's not exhaustive but it's a start. A more comprehensive test would be to make use of the feature to build tests against an installed HPX. Let's at the very least wait until we can get the windows builders running again. Edit: I'm not in a rush to get this in by the way. If we can find a satisfactory way to test this before 1.6.0 we can go ahead with it but it can also wait. |
012911e
to
2cb375f
Compare
retest lsu |
This issue is not directly connected, but it's related: STEllAR-GROUP/phylanx#1311 |
452de67
to
5f3ef5f
Compare
@hkaiser any idea what I might've missed here: https://github.com/STEllAR-GROUP/hpx/pull/5099/checks?check_run_id=1870902759#step:5:1476? |
Let me try to reproduce this locally. |
Looks like that the same commands just work fine for me locally. So it has to be some resource restriction imposed by github. We could try to use |
Thanks for checking. I'll try that out. |
@msimberg I pushed some changes to this branch that work around an MSVC issue that suddenly manifested itself on this branch. Let's see if that fixes the problems for the Windows builders, |
FWIW, I think the remaining issue is caused by the additional targets you added ( |
d757c14
to
f993d40
Compare
- this adds a workaround preventing MSVC from prematurely instantiating templates
f993d40
to
690852a
Compare
690852a
to
5bd90a8
Compare
@msimberg this looks like it's good to go. |
retest lsu |
I have installed hpx 1.6.0 using vcpkg and tried to build a "Hello world" program as in Quick Start from the documentation. Unfortunately, I still get the error this issue claims to have fixed. With vcpkg I have also installed the current master (4d74809), but the error is still there.
Let me know if I can provide more information to get this fixed. |
Since you mention vcpkg I'm guessing you're on Windows, is that correct? If that's the case this PR does not allow mixing build types on Windows. I don't know if we can do more to detect these situations, any help with that would definitely be appreciated. |
Ok, thanks for the details! That does sound like something I've missed in that case, I'll try to have a look at this soon. As you can see this is rather new, and our testing (clearly) isn't thorough enough for it. |
This error message indicates that both versions, release and debug, have been loaded. Apparently we still miss something as it shouldn't actually happen. The plugin API we use relies on different function names for release and debug, so there is at least a potential way of preventing to load a mismatched version. |
@rbyshko just for completeness, could you provide the code and CMakeLists.txt that you used? And are you seeing this problem with user code in release mode and HPX in debug mode, vice versa, or both? |
I am experiencing this error in both release and debug builds. CMakeLists.txt
hpx_hello.cpp
|
Fixes #5013.
Testing if this is feasible. In principle it is, but I'd appreciate feedback on if there are any pitfalls that I'm not aware of, especially on Windows. Ideally we only use
HPX_DEBUG
determine if parts of the code should be conditionally compiled/disabled/etc. However, there are a few additional macros that we use:DEBUG
: I could find no reference to anything using this, does anyone know what it's doing in HPX?_DEBUG
: Windows specific, added automatically in debug mode, correct? There are a couple of uses of this one. Can we replace them withHPX_DEBUG
? (hpx/src/runtime_distributed.cpp
Lines 546 to 551 in 8cb1829
NDEBUG
: Disablesassert
. We have a few uses ofassert
which are fine, but as far as I can tell there is no reason for us to rely on this macro.HPX_DISABLE_ASSERTIONS
/BOOST_DISABLE_ASSERTIONS
: Used to disable a few assertions, but notHPX_ASSERT
. Used together withNDEBUG
in some cases. I'd at most leaveHPX_DISABLE_ASSERTIONS
.Is there a use case for debug builds with assertions disabled? If yes, should it get a CMake option instead of needing to be manually added to the compile flags?