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

add version info to c-binding libraries #1327

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Nov 16, 2022

Ready for merging

Feature or improvement description
When c-bindings interfaces are compiled and used in other codes, there was no information output as to which version or git hash was used. This was leading to confusion during debugging of the the OWENS code with the MoorDyn and HydroDyn c-bindings libraries compiled as DLLs.

Other changes:

  • remove OpenMP from VS projects for c_bindings
    This was causing issues when trying to load the DLL from python 3.8 or higher due to a dependency on the libiomp5md.dll library (from OpenMP). This is an issue for 3.8 and later as the path to every DLL outside the system directories must be explicitly added. For the VS project for ADI, another option was added for Release_OpenMP.
  • rename VS c-bindings project files more uniformly
  • verify all VS c-bindings projects compile correctly
    • AeroDyn_Inflow included the driver.f90 file (oops)
    • HydroDyn_c_bindings included the driver but was missing the HydroDyn_c_bindings.f90 file (oops)

Related issue, if one exists
none

Impacted areas of the software

  • AeroDyn
    • aerodyn_inflow_c_binding library
  • HydroDyn
    • hydrodyn_c_binding library
  • InflowWind
    • ifw_c_binding library
  • VS projects for the above

Test results, if applicable
The regression tests for these library interfaces now output the version info.

Example output from py_ad_5MW_OC4Semi_WSt_WavesWN case

 **************************************************************************************************
 AeroDyn-Inflow library

 Copyright (C) 2022 National Renewable Energy Laboratory
 Copyright (C) 2022 Envision Energy USA LTD

 This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
 See the "LICENSE" file distributed with this software for details.
 **************************************************************************************************

 AeroDyn-Inflow library-v3.3.0-143-ga7fc4245
 Compile Info:
  - Compiler: GCC version 10.4.0
  - Architecture: 64 bit
  - Precision: double
  - OpenMP: No
  - Date: Nov 16 2022
  - Time: 11:30:38
 Execution Info:
  - Date: 11/16/2022
  - Time: 11:31:12-0700

 Running ADI.
 Running AeroDyn.
 Running InflowWind.

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks for doing that.

@andrew-platt andrew-platt force-pushed the c_libVersioning branch 2 times, most recently from 3f57504 to 6f632a7 Compare November 22, 2022 03:29
OpenMP causes dynamic linking of the libiomp5md.dll library.  This
causes headaches for trying to load these libraries in python >3.7
@andrew-platt
Copy link
Collaborator Author

I made a few more updates to the VS projects (noted above). They had a few issues such as missing files.

@andrew-platt andrew-platt merged commit 1defb56 into OpenFAST:dev Nov 22, 2022
@andrew-platt andrew-platt deleted the c_libVersioning branch December 19, 2022 15:44
@rafmudaf rafmudaf mentioned this pull request Dec 19, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants