Skip to content

Differentiating OpenSim models with Enzyme #1870

Closed Answered by nickbianco
nickbianco asked this question in Q&A
Discussion options

You must be logged in to vote

I have managed to create a minimal CMake-based project that allows Enzyme to compute derivatives through Simbody. I set up the dependencies of this project to use a similar structure as in OpenSim (i.e., built in a separate subdirectory using a separate CMake project).

As in OpenSim, the dependencies are built using CMake's ExternalProject_Add. I found that in addition to -flto, I needed to manually pass -DNDEBUG and -O2 to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. I discovered this after manually building Simbody and these flags appeared by default, but did not appear by default when using ExternalProject_Add. I am now able to successfully compute the correct derivative of a vector norm when us…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nickbianco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant