Skip to content

Ensure all assert() calls are always compiled, do not link MPIScheduler - #32

Open
StefanFlaumberg wants to merge 2 commits into
BenoitMorel:mainfrom
StefanFlaumberg:bugfix
Open

Ensure all assert() calls are always compiled, do not link MPIScheduler#32
StefanFlaumberg wants to merge 2 commits into
BenoitMorel:mainfrom
StefanFlaumberg:bugfix

Conversation

@StefanFlaumberg

Copy link
Copy Markdown
Contributor

This PR introduces the following changes:

  • The add_compile_options(-UNDEBUG) line in the top CMakeLists.txt ensures that assert() calls are compiled in AleRax and all its submodules in all build modes, which is consistent with the current code logic. This is important in the light of the recent transition to using the Release build mode, which by default ignores the assert() calls, thus leading to numerous "unused variable" compile-time warnings and possible run-time bugs.
  • MPIScheduler is not used in AleRax. The only consumer of this library is GeneRaxCore/src/parallelization/Scheduler.cpp, and AleRax does not use it. So the linking line in src/ale/CMakeLists.txt was a confusing old-code leftover, now removed.
    This makes MPIScheduler a dependency only of GeneRax. So the cleanest solution would be moving both Scheduler.cpp and related routines to GeneRax and removing MPIScheduler from the GeneRaxCore/ext dir so that it is added only to GeneRax directly via the GeneRax/ext dir, thus making GeneRaxCore and AleRax completely clear of it. But this goes beyond the scope of this PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant