Skip to content

add windows arm build#65

Merged
joanibal merged 99 commits intomainfrom
add_arm_win_build
Apr 17, 2026
Merged

add windows arm build#65
joanibal merged 99 commits intomainfrom
add_arm_win_build

Conversation

@joanibal
Copy link
Copy Markdown
Owner

@joanibal joanibal commented Mar 12, 2026

This PR adds windows arm64 wheels and removes macos x86 builds .
macOS x86 builds are removed since apple devices have not used intel chips for many years now.

Final set of changes

  • There is currently an issue with the sdupl wrapper in main. The inputs need to be declared real*8 instead of real. The PR fixes that.
  • There is odd behavior in llvm-flang when each file adds redundant storage for the common block variables in it. There is a 4GB data size limit on the .data section on Windows (and MacOS). To reduce the impact without totally changing the variable storage, I broke the includes into multiple files. Please add any new variables to the correct files.
  • To help reduce data storage I also removed xuasec, xlasec, zuasec, and zlasec from the airfoil data. This data is now computed in amake.f when it is needed. This adds a slight difference between the OML calculated with NACA airfoils between AVL and OPTVL due a simplification I made (small angle). But I think this is acceptable since it only effects the OML output and the difference reduces to zero as the camber goes to zero.
  • I removed large variables that were not used like VC, VC_U, VC_D, VC_G
  • I modified the gen_ad_inc.py script to only add variables that are used in the AD src files to the .INC ad seeds file
  • Even with these changes to reduce data storage I still needed to add a special set of constants for windows arm64, these are contained in ADIMEN.INC.winArm64.
  • Since the size constants like ICONX are different on different platforms there is a function now to load these from the Fortran layer and set them on the python layer

@joanibal
Copy link
Copy Markdown
Owner Author

It looks like we have another case of windows not liking the size of the COMMON block allocations.

@joanibal
Copy link
Copy Markdown
Owner Author

The section data is taking up the most space

================================================================================
  COMMON /SURF_GEOM_R/    (494.90 MiB)
================================================================================
  Variable             Type                       Dimensions                                     Elements           Size
  -------------------- -------------------------- ------------------------------  ----------------------- --------------
  XYZSCAL              real(kind=avl_real)        (3, 100)  [3, NFMAX]                                300       2.34 KiB
  XYZTRAN              real(kind=avl_real)        (3, 100)  [3, NFMAX]                                300       2.34 KiB
  YDUPL                real(kind=avl_real)        (100)  [NFMAX]                                      100          800 B
  ADDINC               real(kind=avl_real)        (100)  [NFMAX]                                      100          800 B
  CSPACE               real(kind=avl_real)        (100)  [NFMAX]                                      100          800 B
  SSPACE               real(kind=avl_real)        (100)  [NFMAX]                                      100          800 B
  SSPACES              real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  XYZLES               real(kind=avl_real)        (3, 301, 100)  [3, NSECMAX, NFMAX]               90,300     705.47 KiB
  XSEC                 real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  YSEC                 real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  XFMIN_R              real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  XFMAX_R              real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  XLASEC               real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  ZLASEC               real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  XUASEC               real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  ZUASEC               real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  CHORDS               real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  AINCS                real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  XASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  CASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  SASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  TASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]        6,020,000      45.93 MiB
  CLCDSEC              real(kind=avl_real)        (6, 301, 100)  [6, NSECMAX, NFMAX]              180,600       1.38 MiB
  CLCDSRF              real(kind=avl_real)        (6, 100)  [6, NFMAX]                                600       4.69 KiB
  CLAF                 real(kind=avl_real)        (301, 100)  [NSECMAX, NFMAX]                     30,100     235.16 KiB
  XHINGED              real(kind=avl_real)        (20, 301, 100)  [ICONX, NSECMAX, NFMAX]         602,000       4.59 MiB
  VHINGED              real(kind=avl_real)        (3, 20, 301, 100)  [3, ICONX, NSECMAX, NFMAX] 1,806,000      13.78 MiB
  GAIND                real(kind=avl_real)        (20, 301, 100)  [ICONX, NSECMAX, NFMAX]         602,000       4.59 MiB
  REFLD                real(kind=avl_real)        (20, 301, 100)  [ICONX, NSECMAX, NFMAX]         602,000       4.59 MiB
  GAING                real(kind=avl_real)        (20, 301, 100)  [ICONX, NSECMAX, NFMAX]         602,000       4.59 MiB
  ------------------------------------------------------------------------------------------------------
                                                                                          Block total:     494.90 MiB

================================================================================

@joanibal
Copy link
Copy Markdown
Owner Author

The storage of airfoil data needs a rethink.

These are expensive to store and are only used when writing the oml

XASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB
  CASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB
  SASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB
  TASEC                real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB

These can be used to create the above when needed

XSEC                 real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB
YSEC                 real(kind=avl_real)        (200, 301, 100)  [IBX, NSECMAX, NFMAX]    6,020,000      45.93 MiB

@joanibal
Copy link
Copy Markdown
Owner Author

The issue was that the f2py wrapper used real instead of real*8

@joanibal joanibal merged commit 5939e1a into main Apr 17, 2026
24 checks passed
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

Successfully merging this pull request may close these issues.

1 participant