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

SPEX: Fix building demo without OpenMP. #808

Merged
merged 1 commit into from
May 23, 2024

Conversation

mmuetzel
Copy link
Contributor

Depend on SPEX_HAS_OPENMP (not SPEX_USE_OPENMP) for linking to OpenMP.

This should avoid the configuration error seen, e.g., here:
https://github.com/DrTimothyAldenDavis/SuiteSparse/actions/runs/9201634447/job/25310164131#step:22:73

CMake Error at CMakeLists.txt:495 (target_link_libraries):
-- Generating done (0.1s)
  Target "spex_demo_threaded" links to:

    OpenMP::OpenMP_C

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Generate step failed.  Build files cannot be regenerated correctly.
make: *** [demos] Error 1

Depend on `SPEX_HAS_OPENMP` (not `SPEX_USE_OPENMP`) for linking to
OpenMP.
@mmuetzel
Copy link
Contributor Author

I triggered the macos runner on my fork of the repository and the SPEX demos build and run successfully with this change even if OpenMP cannot be found:
https://github.com/mmuetzel/SuiteSparse/actions/runs/9203948510/job/25316457587#step:22:337

./build/spex_demo_threaded          f ExampleMats/10teams.mat.txt   ExampleMats/10teams.rhs.txt
spex_demo_threaded: without OpenMP
solving Ax=b with nthreads: 1, with 10 trials per thread
Please wait...
SPEX thread 0: ok.  All systems solved exactly.
SPEX thread test passed

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit cd185a8 into DrTimothyAldenDavis:dev2 May 23, 2024
23 of 25 checks passed
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.

2 participants