Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/windows_arm64_steps/action.yml

This file was deleted.

70 changes: 61 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
#DEBUGGING: turning off the fail-fast can be helpful
# fail-fast: false # This ensures all matrix jobs run to completion
fail-fast: false
matrix:
buildplat:
# Not supported for now
Expand All @@ -30,7 +29,7 @@ jobs:
# working
- [windows-2025, win, AMD64]
- [ubuntu-22.04, manylinux, x86_64]
- [macos-14, macosx, arm64, openblas, "12.3"]
- [macos-15, macosx, arm64, openblas, "12.3"]
- [windows-11-arm, win, ARM64, "", ""]

# removed
Expand Down Expand Up @@ -62,20 +61,73 @@ jobs:
# mingw-w64
choco install rtools -y --no-progress --force --version=4.0.0.20220206
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH
if: ${{ runner.os == 'Windows' }}
if: ${{ matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'AMD64' }}


- name: Set environment variables for ARM64
# - use pkgconf comes from PyPI
# - install the official LLVM release with flang
- name: win_arm64 - install LLVM with flang
if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64'
shell: pwsh
run: |
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/LLVM-22.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
$expectedHash = "76f44ef1ba6eeb5a65904e9500f042f588fade49952778ce48f0374daa934396"
$fileHash = (Get-FileHash -Path "LLVM-woa64.exe" -Algorithm SHA256).Hash
if ($fileHash -ne $expectedHash) {
Write-Error "Checksum verification failed. The downloaded file may be corrupted or tampered with."
exit 1
}
Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
& "C:\Program Files\LLVM\bin\flang.exe" --version

# flang's runtime (flang_rt.runtime.static.lib) needs __udivti3 and other
# compiler-rt builtins, but the flang driver does not link them on
# windows-msvc targets, so even `flang hello.f90` fails to link.
# Find the builtins lib and pass it to every link via LDFLAGS.
- name: win_arm64 - link compiler-rt builtins for flang
if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64'
shell: pwsh
run: |
$llvm = "C:\Program Files\LLVM"
Write-Host "Available compiler-rt builtins libs:"
$candidates = Get-ChildItem -Path "$llvm\lib\clang" -Recurse -Filter "clang_rt.builtins*.lib"
$candidates | ForEach-Object { Write-Host " $($_.FullName)" }

$rt = (& "$llvm\bin\clang.exe" --target=aarch64-pc-windows-msvc -rtlib=compiler-rt -print-libgcc-file-name).Trim()
if (-not (Test-Path $rt)) {
# handle both the old (clang_rt.builtins-aarch64.lib) and the
# per-target-runtime-dir (aarch64-pc-windows-msvc\clang_rt.builtins.lib) layouts
$rt = $candidates |
Where-Object { $_.Name -eq "clang_rt.builtins-aarch64.lib" -or $_.FullName -match "aarch64" } |
Select-Object -First 1 -ExpandProperty FullName
}
if (-not $rt -or -not (Test-Path $rt)) {
Write-Error "compiler-rt builtins library for aarch64 not found"
exit 1
}
Write-Host "Using compiler-rt builtins: $rt"

# copy to a path without spaces so LDFLAGS needs no quoting when meson splits it
New-Item -ItemType Directory -Force -Path "C:\clang_rt" | Out-Null
Copy-Item $rt "C:\clang_rt\clang_rt.builtins.lib" -Force

# reproduce meson's Fortran sanity check so a failure shows up here
Set-Location $env:RUNNER_TEMP
Set-Content -Path hello.f90 -Value "program hello`n print *, 'hello'`nend program hello"
& "$llvm\bin\flang.exe" -o hello.exe hello.f90 "C:\clang_rt\clang_rt.builtins.lib"
if ($LASTEXITCODE -ne 0) { Write-Error "flang hello-world failed to link"; exit 1 }
.\hello.exe

echo "LDFLAGS=C:\clang_rt\clang_rt.builtins.lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: win_arm64 - set environment variables
if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64'
run: |
echo "C:\Program Files\LLVM\bin" >> $env:GITHUB_PATH
echo "CC=clang-cl" >> $env:GITHUB_ENV
echo "CXX=clang-cl" >> $env:GITHUB_ENV
echo "FC=flang" >> $env:GITHUB_ENV
echo "TARGET_ARCH=${{ matrix.buildplat[2] }}" >> $env:GITHUB_ENV

- name: Set up Flang and pkgconf for ARM64
if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64'
uses: ./.github/windows_arm64_steps


- name: Setup macOS
Expand Down
4 changes: 2 additions & 2 deletions examples/run_input_dict_wing_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"load": np.int32(
1
), # specifies that the force and moment on this surface is to be included in the overall forces and moments of the configuration (default true)
"clcdsec": np.array(
"cdclsec": np.array(
[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]
), # profile-drag CD(CL) function for each section in this surface (default 0.0)
"cdcl": np.array(
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
), # profile-drag CD(CL) function for all sections in this surface, overrides clcdsec. (default 0.0)
), # profile-drag CD(CL) function for all sections in this surface, overrides cdclsec. (default 0.0)
"claf": np.array([1.0, 1.0]), # CL alpha (dCL/da) scaling factor for each section in order (default 1.0)
# Geometry
"scale": np.array(
Expand Down
10 changes: 9 additions & 1 deletion geom_files/aircraft.avl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ NACA
0012
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030

CONTROL
#surface gain xhinge hvec SgnDup
Expand All @@ -100,6 +102,8 @@ NACA
0012
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030

CONTROL
#surface gain xhinge hvec SgnDup
Expand Down Expand Up @@ -132,6 +136,8 @@ NACA
0012
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030

CONTROL
#surface gain xhinge hvec SgnDup
Expand All @@ -141,9 +147,11 @@ SECTION
#Xle Yle Zle | Chord Ainc Nspan Sspace
1.60247523857 0 0.296 0.325 0.0
NACA
0012
0112
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030

CONTROL
#surface gain xhinge hvec SgnDup
Expand Down
14 changes: 12 additions & 2 deletions geom_files/aircraft_L1.avl
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,25 @@ Horizontal Tail
SECTION
#Xle Yle Zle | Chord Ainc Nspan Sspace
1.5 0.0 0 0.325 0.0

NACA
0012
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030
CONTROL
#surface gain xhinge hvec SgnDup
Elevator -1.00 0.0 0 1 0 1.00

SECTION
#Xle Yle Zle | Chord Ainc Nspan Sspace
1.5 0.5 0 0.325 0.0

NACA
0012
CLAF
1.1078
CDCL
-0.4 0.030 0.4 0.010 1.2 0.030
CONTROL
#surface gain xhinge hvec SgnDup
Elevator -1.00 0.0 0 1 0 1.00
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if ff.get_id() == 'gcc'
ff_args += ['-std=legacy']
elif ff.get_id() == 'llvm-flang'

ff_args += ['-fno-init-global-zero', '-ffixed-form', '-w']
ff_args += ['-fno-init-global-zero', '-w']
link_args += ['-fno-init-global-zero']

endif
Expand Down
Loading
Loading