Skip to content

Fix BusToSignalAdapter evalJac bug - #603

Merged
pelesh merged 1 commit into
developfrom
lukel/bug-bus-to-signal-fix
Oct 5, 2026
Merged

pelesh merged 1 commit into
developfrom
lukel/bug-bus-to-signal-fix

Conversation

@lukelowry

Copy link
Copy Markdown
Collaborator

Description

BusToSignalAdapter::evaluateJacobian() leaves its COO Jacobian null, causing this warning during Enzyme system assembly:

A component has returned a nullptr Jacobian.

Assembly already skips the null contribution, so this is just a consistency change I found when experimenting with cosimulation.

Proposed changes

  • Construct the empty COO Jacobian, consistent with ConstantSignalSource.
  • Add a separate jacobian() test checking successful evaluation and a non-null matrix with zero entries.

Further Comments

All tests pass

@lukelowry
lukelowry requested a review from nkoukpaizan October 5, 2026 02:07
@lukelowry lukelowry added the bug Something isn't working label Oct 5, 2026

@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.

We may remove this approach altogether after #602, but it doesn't hurt to fix.

BTW, @lukelowry What happened to the PR checklist?

@lukelowry

Copy link
Copy Markdown
Collaborator Author

@nkoukpaizan I removed it I will add it back

@pelesh
pelesh merged commit f559083 into develop Oct 5, 2026
6 checks passed
@lukelowry
lukelowry deleted the lukel/bug-bus-to-signal-fix branch October 5, 2026 17:39
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

Successfully merging this pull request may close these issues.

3 participants