Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

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

Merged
pelesh merged 11 commits into
developfrom
slaven/cmake-fixes
Feb 12, 2026
Merged

Fixes to CMake configuration to enable testing from build directory#200
pelesh merged 11 commits into
developfrom
slaven/cmake-fixes

Conversation

@pelesh

@pelesh pelesh commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator

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.
Closes #58.

@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
Copy Markdown
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

pelesh commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator Author
  • 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

pelesh commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator Author
  • 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.

PhilipFackler
PhilipFackler previously approved these changes Feb 11, 2026

@PhilipFackler PhilipFackler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

pelesh and others added 9 commits February 12, 2026 16:51
- 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 commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator Author

@nkoukpaizan, I set the data files directory in the source as the one to be used for testing. I also removed copying data to the build directory. I left installation of tests in there for now.

@pelesh pelesh force-pushed the slaven/cmake-fixes branch from 2daedb3 to 9511d56 Compare February 12, 2026 22:29

@nkoukpaizan nkoukpaizan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addresses the issue of needing make test install before make test. Will need another cleanup pass (e.g., disallowing testing from the installation directory if the build directory is not available).

@pelesh pelesh merged commit 0982d72 into develop Feb 12, 2026
8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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 Enabling shared libraries results in some tests failing

3 participants