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

[BUG] Failure in ctest: Could not read/parse resource spec file ./resource_spec.json #534

Closed
bdice opened this issue Feb 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bdice
Copy link
Contributor

bdice commented Feb 6, 2024

Describe the bug
An error in rapids-cmake with CMake 3.28 causes no tests to be found.

RAFT observed this CI output when executing tests:

Test project /opt/conda/envs/test/bin/gtests/libraft
Could not read/parse resource spec file ./resource_spec.json: 
A JSON document cannot be empty
No tests were found!!!

The CI passed silently without executing any tests. (We probably want to enable the ctest flag --no-tests=error across RAPIDS to prevent that.)

We found that generate_ctest_json was failing to build, because CMake 3.28 finds multiple CUDA Toolkit include directories. This result was being passed to -I as a ;-separated string, rather than as separate -I flags, which caused a build failure.

Build failure output:

2024-02-06T10:33:32.9446427Z -- rapids_test_generate_resource_spec failed to build detection executable, presuming no GPUs.
2024-02-06T10:33:32.9454129Z -- rapids_test_generate_resource_spec compile[/opt/conda/conda-bld/_build_env/bin/aarch64-conda-linux-gnu-c++ -I/opt/conda/conda-bld/_build_env/targets/sbsa-linux/include;/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/sbsa-linux/include;-DHAVE_CUDA /opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/libcudart.so;-lpthread;-lrt;-ldl] failure details are /opt/conda/conda-bld/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/11.4.0/../../../../aarch64-conda-linux-gnu/bin/ld: error: /opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/sbsa-linux/include: read: Is a directory
2024-02-06T10:33:32.9460876Z collect2: error: ld returned 1 exit status
2024-02-06T10:33:32.9461196Z 
2024-02-06T10:33:32.9628500Z -- Configuring done (12.4s)

Expected behavior
At build time, generate_ctest_json should cause the build to fail if it cannot be built or fails to run. At runtime, tests should be found, and an error should be raised if no tests are found.

@bdice bdice added bug Something isn't working ? - Needs Triage Need team to review and classify labels Feb 6, 2024
@bdice bdice removed the ? - Needs Triage Need team to review and classify label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants