Skip to content

Fixes to CMake configuration to enable testing from build directory#200

Open
pelesh wants to merge 5 commits intodevelopfrom
slaven/cmake-fixes
Open

Fixes to CMake configuration to enable testing from build directory#200
pelesh wants to merge 5 commits intodevelopfrom
slaven/cmake-fixes

Conversation

@pelesh
Copy link
Collaborator

@pelesh pelesh commented Feb 3, 2026

Merge request type

  • New feature
  • Resolves bug
  • Documentation
  • Other

Relates to

  • OPFLOW
  • SOPFLOW
  • SCOPFLOW
  • TCOPFLOW
  • CMake build system
  • Spack configuration
  • Manual
  • Web docs
  • Other

This MR updates

  • Header files
  • Source code
  • CMake build system
  • Spack configuration
  • Web docs
  • Manual
  • Other

Summary

I made some changes to CMake, mainly to enable running tests without installing ExaGO first. This is still work in progress but some feedback would be helpful to figure out how to proceed.

Closes #148.

- Create entry for user to add PETSC_DIR

-  EXAGO_ENABLE_GPU set automatically to "on" if either CUDA or HIP backends are enabled.

- Fixes in testing CMake configuration to be able to run tests from build directory.
@pelesh pelesh self-assigned this Feb 3, 2026
@pelesh pelesh added the enhancement New feature or request label Feb 3, 2026
@pelesh pelesh marked this pull request as ready for review February 3, 2026 18:07
@nkoukpaizan
Copy link
Collaborator

I am currently getting a few new test failures on Frontier, I think because not every instance of exago_add_test was updated to take the WORKING_DIRECTORY argument (e.g., FUNCTIONALITY_TEST_SOPFLOW_SCENARIO3_RAJA_TOML.

Otherwise, the approach works for the updated cases and supports make test without make install.

A few additional thoughts:

  • I see some code in the CMakeLists.txt that is intended to copy data to the build directory. Perhaps that is not working as intended and there is an easier fix in that section. If we go with the WORKING_DIRECTORY approach, I think some of that code should be removed.
  • Perhaps out of scope for this PR, but with the ability to run the tests without installing, I am questioning the need to install the tests. It's also the case that it's not obvious how to run them manually from the installation directory.

I would suggest explicitly defining the testing data directory (similar to EXAGO_DATAFILES_DIR) in the top level CMakeLists.txt and use it in the test definitions.

@pelesh
Copy link
Collaborator Author

pelesh commented Feb 5, 2026

  • I see some code in the CMakeLists.txt that is intended to copy data to the build directory. Perhaps that is not working as intended and there is an easier fix in that section. If we go with the WORKING_DIRECTORY approach, I think some of that code should be removed.

This was my doing from several years ago. I agree, that needs to be removed.

@pelesh
Copy link
Collaborator Author

pelesh commented Feb 5, 2026

  • Perhaps out of scope for this PR, but with the ability to run the tests without installing, I am questioning the need to install the tests. It's also the case that it's not obvious how to run them manually from the installation director

I am not sure about the need to install tests. Perhaps if one has binary only installation of ExaGO, one might want to have an ability to verify that installation does what it is supposed to do.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All but one ExaGO tests fail after clean build

2 participants