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

Re-generating differentiated code using latest version of Tapenade (3.16) #120

Closed
garobed1 opened this issue Feb 16, 2021 · 1 comment
Closed

Comments

@garobed1
Copy link

I'm trying to differentiate some of the relevant residual routines with respect to the Spalart-Allmaras model constants, although this issue is not specific to that application. I installed the latest version of Tapenade (3.16), and following the instructions in the documentation for adflow, I was able to successfully generate the differentiated code that I need.

However, I noticed that the current differentiated code was generated using Tapenade v3.10. The newly generated code's files are all named differently, e.g. in /adflow/src/adjoint/outputForward/

sa_b.f90 (3.10)
sa.F90_b.f90 (3.16)

and the new version appends iff to some modules in use by the differentiated routines, e.g.

use blockpointers (3.10)
use blockpointersiff (3.16)

but blockpointersiff doesn't exist. From my perspective, I could try going through the newly-generated code manually and copying the relevant lines to the old formatted differentiated code. I have been trying to build the older version of Tapenade on my system as well, but have had difficulties doing so. I'm curious as to what the best approach to this problem would be for me at the moment, whether I should focus on building the older version of Tapenade or retool the existing differentiated files manually.

@anilyil
Copy link
Contributor

anilyil commented Feb 17, 2021

The instructions will only work if you use the same version of tapenade. If you want to use the latest version, you will need to update the tapenade commands to generate consistent AD code and verify that the new code also runs correctly. Furthermore, you should not make any manual modifications to the tapenade generated code.

@anilyil anilyil closed this as completed Feb 17, 2021
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

No branches or pull requests

2 participants