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

Always show NVRTC errors. #1567

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Always show NVRTC errors. #1567

merged 3 commits into from
Jun 6, 2023

Conversation

joaander
Copy link
Member

@joaander joaander commented Jun 5, 2023

Description

Always show errors generated by NVRTC. Also, update to the latest jitify.hpp.

Motivation and context

This helps users (and mailing list readers) identify errors in user patch code. Previously, users needed to recompile with ENABLE_DEBUG_JIT=on to see this information. ENABLE_DEBUG_JIT still exists and adds additional details. This PR aims to cover the basic error information needed and show it only on error.

Yes, we could manage our own fork of jitify and use it a submodule. However doing so would require 10x the effort of making these 3 lines of changes.

How has this been tested?

I temporarily moved warp_scan.cuh, ran a test script that previously worked, and got this output:

hoomd/WarpTools.cuh(27): warning: cub/warp/warp_scan.cuh: [jitify] File not found
Traceback (most recent call last):
  File "/home/joaander/test/test-patch-user.py", line 20, in <module>
    simulation.run(0)
  File "/home/joaander/build/hoomd/hoomd/simulation.py", line 461, in run
    self.operations._schedule()
  File "/home/joaander/build/hoomd/hoomd/operations.py", line 180, in _schedule
    self.integrator._attach(sim)
  File "/home/joaander/build/hoomd/hoomd/operation.py", line 310, in _attach
    self._attach_hook()
  File "/home/joaander/build/hoomd/hoomd/hpmc/integrate.py", line 420, in _attach_hook
    self._pair_potential._attach(self._simulation)
  File "/home/joaander/build/hoomd/hoomd/operation.py", line 310, in _attach
    self._attach_hook()
  File "/home/joaander/build/hoomd/hoomd/hpmc/pair/user.py", line 269, in _attach_hook
    self._cpp_obj = _jit.PatchEnergyJITGPU(
RuntimeError: Runtime compilation failed:
hoomd/WarpTools.cuh(428): error: qualified name is not allowed

hoomd/WarpTools.cuh(428): error: explicit type is missing ("int" assumed)

hoomd/WarpTools.cuh(428): error: expected a ";"

hoomd/WarpTools.cuh(430): error: name followed by "::" must be a class or namespace name

4 errors detected in the compilation of "default_program".

Change log

Changed:

* Improved error messages with NVRTC compiled code.

Checklist:

The way we use jitify, missing headers are an error and users need to
know about them.
@joaander joaander requested review from a team, tommy-waltmann and seoulfood and removed request for a team June 5, 2023 15:43
@joaander joaander added the validate Execute long running validation tests on pull requests label Jun 5, 2023
@joaander
Copy link
Member Author

joaander commented Jun 6, 2023

Merging now so I can move forward with the 4.0 release. We can fix any remaining issues in a future pull request.

@joaander joaander merged commit 40153e6 into trunk-major Jun 6, 2023
@joaander joaander deleted the show-nvrtc-errors branch June 6, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validate Execute long running validation tests on pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants