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

Question: ATDM build type "release-debug" doesn't correspond to CMAKE_BUILD_TYPE "RELWITHDEBINFO" #6022

Closed
jhux2 opened this issue Oct 2, 2019 · 7 comments
Labels
ATDM Config Issues that are specific to the ATDM configuration settings ATDM DevOps Issues that will be worked by the Coordinated ATDM DevOps teams PA: Framework Issues that fall under the Trilinos Framework Product Area type: question

Comments

@jhux2
Copy link
Member

jhux2 commented Oct 2, 2019

@bartlettroscoe @trilinos/framework

I would like to set the build type to be optimized with debug symbols with the script Trilinos/cmake/std/atdm/load-env.sh. Here's what I tried:

source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh sems-rhel6-clang-release-debug-serial
ARGS=(
  -GNinja
  -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake
  -DTrilinos_ENABLE_TESTS=OFF
  -DTrilinos_ENABLE_Galeri=ON
  -DTrilinos_ENABLE_MueLu=ON
    -DMueLu_ENABLE_TESTS=ON
    -DMueLu_ENABLE_EXAMPLES=OFF
)
cmake "${ARGS[@]}" ${TRILINOS_DIR}

I would expect that Trilinos configure would report CMAKE_BUILD_TYPE as RELWITHDEBINFO, but it reports RELEASE instead.

The following works as expected:
source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh sems-rhel6-clang-release-serial
Trilinos configure reports CMAKE_BUILD_TYPE as RELEASE

source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh sems-rhel6-clang-debug-serial
Trilinos configure reports CMAKE_BUILD_TYPE as DEBUG.

Am I doing something wrong?

@jhux2 jhux2 added type: question ATDM Config Issues that are specific to the ATDM configuration settings PA: Framework Issues that fall under the Trilinos Framework Product Area labels Oct 2, 2019
@jhux2
Copy link
Member Author

jhux2 commented Oct 2, 2019

Here is the result of the command source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh sems-rhel6-clang-release-debug-serial:

Hostname 'cee-build014' matches known ATDM host 'sems-rhel6' and system 'sems-rhel6'
Setting compiler and build options for build-name 'sems-rhel6-clang-release-debug-serial'
Using SEMS RHEL6 compiler stack CLANG-3.9.0 to build RELEASE-DEBUG code with Kokkos node type SERIAL

@jhux2
Copy link
Member Author

jhux2 commented Oct 2, 2019

Btw, using the cmake option -DCMAKE_BUILD_TYPE=RELWITHDEBINFO causes the build to do the right thing, i.e., optimized + -g.

@bartlettroscoe bartlettroscoe added the ATDM DevOps Issues that will be worked by the Coordinated ATDM DevOps teams label Oct 2, 2019
@bartlettroscoe
Copy link
Member

@jhux2, I think this may be a feature request and this is a subtle issue. As explained at:

using release-debug does indeed set CMAKE_BULD_TYPE=RELEASE and Trilinos_ENABLE_DEBUG=ON. Therefore, this does not actually increase the size of the executable much. Adding -g will increase the size of the executable. But I guess the runtime error messages are less useful when missing debug info.

I guess we could change the ATDM Trilinos configuration such that adding release-debug set CMAKE_BULD_TYPE=RELWITHDEBINFO and Trilinos_ENABLE_DEBUG=ON. Given that full debug builds are run on many of these systems (which definitely set -g), this should be pretty safe.

@bartlettroscoe bartlettroscoe added type: enhancement Issue is an enhancement, not a bug and removed type: enhancement Issue is an enhancement, not a bug labels Oct 2, 2019
@bartlettroscoe
Copy link
Member

@jhux2, I added this to the backlog in #6023.

@jhux2
Copy link
Member Author

jhux2 commented Oct 2, 2019

I think this may be a feature request and this is a subtle issue.
using release-debug does indeed set CMAKE_BULD_TYPE=RELEASE and Trilinos_ENABLE_DEBUG=ON. Therefore, this does not actually increase the size of the executable much. Adding -g will increase the size of the executable. But I guess the runtime error messages are less useful when missing debug info.

@bartlettroscoe Thanks for the explanation. I have work around, so this isn't blocking my work. I will update the title to make it easier to search on.

@jhux2 jhux2 changed the title Question: setting build type with load-env.sh Question: ATDM build type "release-debug" correspond to CMAKE_BUILD_TYPE "RELWITHDEBINFO" Oct 2, 2019
@jhux2 jhux2 changed the title Question: ATDM build type "release-debug" correspond to CMAKE_BUILD_TYPE "RELWITHDEBINFO" Question: ATDM build type "release-debug" doesn't correspond to CMAKE_BUILD_TYPE "RELWITHDEBINFO" Oct 2, 2019
@bartlettroscoe
Copy link
Member

@jhux2, since this triggered a feature request in #6023, I will go head and close this issue.

Thanks for reporting issues like this!

@bartlettroscoe
Copy link
Member

Closing this issue now that #6023 is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ATDM Config Issues that are specific to the ATDM configuration settings ATDM DevOps Issues that will be worked by the Coordinated ATDM DevOps teams PA: Framework Issues that fall under the Trilinos Framework Product Area type: question
Projects
None yet
Development

No branches or pull requests

2 participants