Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7219708
update docs
saidctb Aug 18, 2026
8c49216
Record the deferred-length character update design
saidctb Aug 18, 2026
35e3d5d
Support allocatable and pointer scalar character values
saidctb Aug 19, 2026
5194a90
Expose fixed-shape character module arrays as a live bytes view
saidctb Aug 19, 2026
7ef95cf
Read and write declared-length character module variables
saidctb Aug 19, 2026
5374d3e
Wrap every remaining character module-variable form
saidctb Aug 19, 2026
2c4c50b
Report character module-array widths from the Fortran side
saidctb Aug 19, 2026
acf568d
Correct the documented character and module-variable limitations
saidctb Aug 19, 2026
f58a404
Make generated wrapper source readable
saidctb Aug 19, 2026
9084fc7
Keep the character work inside its owning stages
saidctb Aug 19, 2026
93baee6
add assume intent in flag and remove unimportant docs
saidctb Aug 19, 2026
063330a
fix issue related to handling bspline-fortran and update/expand the g…
saidctb Aug 20, 2026
cae4fa4
codex: Wrap abstract types, generic constructors, and BSPLINE-FORTRAN
saidctb Aug 20, 2026
fdd4854
codex: Reload generics whose specifics project an output
saidctb Aug 20, 2026
357215a
codex: Organize the C tests by feature and stage
saidctb Aug 20, 2026
0c36d23
codex: Split the C enum tests into their own feature owner
saidctb Aug 20, 2026
7b5b05c
codex: Point the deferred C parser doc at the reorganised test paths
saidctb Aug 20, 2026
1856179
codex: Separate language features from test infrastructure
saidctb Aug 20, 2026
9e3db6f
codex: Repair the references the test reorganisation left behind
saidctb Aug 20, 2026
715f14f
codex: Correct the constructor and abstract-type limitations
saidctb Aug 20, 2026
ac5ba66
codex: Stop listing rejected contracts as language limitations
saidctb Aug 20, 2026
056b3e1
fix bugs and add real(10) and complex(10)
saidctb Aug 20, 2026
8b908cf
implement goal 3 and fix real libraries failing tests due to the new …
saidctb Aug 21, 2026
0e885e2
fix _direct_c_operation_ineligibility complexity hit 45
saidctb Aug 21, 2026
e146a6c
cc is the default c compiler
saidctb Aug 21, 2026
48a09ab
fix lapack tests
saidctb Aug 21, 2026
690b8f8
Add C string contracts and a general hidden-native-output mechanism
saidctb Aug 22, 2026
5e5d9e7
update the docs
saidctb Aug 22, 2026
0a069c7
add CTypes in @native_call for scalar and arrays for the c language a…
saidctb Aug 23, 2026
8092147
test real libraries with multiple os and compilers
saidctb Aug 23, 2026
961aecb
update libm tests
saidctb Aug 23, 2026
322a7fd
parse _FloatN typedefs as aliases instead of types
saidctb Aug 23, 2026
d5cc856
fix static analysis error
saidctb Aug 23, 2026
1a5ac7f
fix real libraries portability issues
saidctb Aug 23, 2026
02a268e
fix real libraries portability issues
saidctb Aug 23, 2026
14abcb2
clean libm example
saidctb Aug 23, 2026
389f182
exclude xblas from the lapack compilation
saidctb Aug 23, 2026
ba59a31
add lblas and llapack dependencies
saidctb Aug 23, 2026
d1e1e62
expose the matching fortran and c compilers
saidctb Aug 23, 2026
bdecb9f
revert back to the old test ordering
saidctb Aug 23, 2026
375f5b1
remove unroll loops that was slowing down the compilation and improve…
saidctb Aug 23, 2026
3c39e95
Fixed the segmentation fault and cleanup docs
saidctb Aug 23, 2026
d502b1e
update README and docs and fix probe export format
saidctb Aug 23, 2026
b48fa8f
--json/--out unification
saidctb Aug 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DOCUMENTATION_SMOKE_TESTS = (
"tests/docs/test_user_content.py",
)
WRAPPER_SMOKE_TEST = (
"tests/fortran/building_shared_library/end_to_end/test_source_build_modes.py::"
"tests/fortran/infrastructure/building/end_to_end/test_source_build_modes.py::"
"test_fortran_wrapper_default_module_name_does_not_collide_with_root_function"
)
REQUIRED_TESTS = ("tests/tools", "tests/workflows")
Expand Down
116 changes: 12 additions & 104 deletions .github/workflows/merge-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,113 +439,21 @@ jobs:
python tools/print_pytest_failures.py "$report"
done

native-libraries:
name: BLAS + LAPACK + FFTPACK + MINPACK · Ubuntu 24.04 · Python 3.12
real-libraries-portability:
name: Real Libraries Portability
needs: [unit-tests, unit-tests-macos]
if: >-
${{ !contains(github.event.pull_request.labels.*.name, 'ignore-real-library-wrappers') }}
runs-on: ubuntu-24.04
timeout-minutes: 120
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[qa]"
python -m pip install \
"numpy==2.5.1" \
"meson==1.11.2" \
"ninja==1.13.0" \
"scipy==1.18.0"
- name: Install pinned GFortran and LAPACK link dependencies
shell: bash
run: |
packages=(libblas-dev liblapack-dev)
if ! command -v "$PRIK_GFORTRAN_BINARY" >/dev/null 2>&1; then
packages+=("$PRIK_GFORTRAN_PACKAGE")
fi
sudo apt-get update
sudo apt-get install --yes "${packages[@]}"
compiler_dir="$RUNNER_TEMP/prik-gfortran"
mkdir -p "$compiler_dir"
ln -sf "$(command -v "$PRIK_GFORTRAN_BINARY")" "$compiler_dir/gfortran"
echo "$compiler_dir" >> "$GITHUB_PATH"
"$compiler_dir/gfortran" --version
- name: Restore compiled native library cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/prik-real-library-native
key: real-libraries-${{ runner.os }}-gfortran13-${{ hashFiles('examples/blas/native/**', 'examples/lapack/native/**') }}
- name: Run BLAS example and CI full-surface audit
env:
PYTHONPATH: .
HYPOTHESIS_PROFILE: ci
PRIK_REAL_LIBRARY_NATIVE_CACHE_DIR: ${{ runner.temp }}/prik-real-library-native
run: |
source examples/blas/build_all.sh
python -m pytest -q examples/blas/tests examples/blas/ci/full_surface.py
- name: Report reviewed LAPACK inventory
env:
PYTHONPATH: .
run: |
python - <<'PY'
from examples.lapack.routine_inventory import (
EXPECTED_LAPACK_PROCEDURES,
EXPECTED_LAPACK_SOURCE_FILES,
F2PY_SCALAR_WRITEBACK_ROUTINES,
ROUTINE_GROUPS,
ROUTINES,
SCIPY_VERSION,
)

print(f"SciPy version: {SCIPY_VERSION}")
print(f"LAPACK implementation sources: {EXPECTED_LAPACK_SOURCE_FILES}")
print(f"Expected PRIK procedures: {EXPECTED_LAPACK_PROCEDURES}")
print(f"Selected float64 correctness routines: {len(ROUTINES)}")
print(f"f2py scalar writebacks: {len(F2PY_SCALAR_WRITEBACK_ROUTINES)}")
for family, routines in ROUTINE_GROUPS.items():
print(f" {family}: {len(routines)}")
PY
- name: Run LAPACK example and CI full-surface audit
env:
PYTHONPATH: .
HYPOTHESIS_PROFILE: ci
PRIK_REAL_LIBRARY_NATIVE_CACHE_DIR: ${{ runner.temp }}/prik-real-library-native
run: |
source examples/lapack/build_all.sh
python -m pytest -q examples/lapack/tests examples/lapack/ci/full_surface.py
- name: Run FFTPACK 31-procedure full-surface audit
env:
PYTHONPATH: .
HYPOTHESIS_PROFILE: ci
run: |
source examples/fftpack/build_all.sh
python -m pytest -q examples/fftpack/tests
- name: Run MINPACK 22-procedure and parameter-array full-surface audit
env:
PYTHONPATH: .
HYPOTHESIS_PROFILE: ci
run: |
source examples/minpack/build_all.sh
python -m pytest -q examples/minpack/tests
uses: ./.github/workflows/real-libraries-portability.yml

documentation-benchmark:
name: Documentation performance benchmark · Ubuntu 24.04 ARM64 · Python 3.12
needs: native-libraries
needs: real-libraries-portability
if: >-
${{
always() &&
(needs.native-libraries.result == 'success' ||
(needs.native-libraries.result == 'skipped' &&
(needs.real-libraries-portability.result == 'success' ||
(needs.real-libraries-portability.result == 'skipped' &&
contains(github.event.pull_request.labels.*.name, 'ignore-real-library-wrappers')))
}}
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -687,7 +595,7 @@ jobs:
- compiler-smoke-macos
- unit-tests
- unit-tests-macos
- native-libraries
- real-libraries-portability
- documentation-benchmark
- documentation-build
runs-on: ubuntu-24.04
Expand All @@ -698,10 +606,10 @@ jobs:
COMPILER_SMOKE_MACOS_RESULT: ${{ needs.compiler-smoke-macos.result }}
UNIT_TESTS_RESULT: ${{ needs.unit-tests.result }}
UNIT_TESTS_MACOS_RESULT: ${{ needs.unit-tests-macos.result }}
NATIVE_LIBRARIES_RESULT: ${{ needs.native-libraries.result }}
REAL_LIBRARIES_PORTABILITY_RESULT: ${{ needs.real-libraries-portability.result }}
DOCUMENTATION_BENCHMARK_RESULT: ${{ needs.documentation-benchmark.result }}
DOCUMENTATION_BUILD_RESULT: ${{ needs.documentation-build.result }}
IGNORE_NATIVE_LIBRARIES: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-real-library-wrappers') }}
IGNORE_REAL_LIBRARIES_PORTABILITY: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-real-library-wrappers') }}
steps:
- name: Require every staged validation result
shell: bash
Expand All @@ -713,15 +621,15 @@ jobs:
"compiler-smoke-macos=$COMPILER_SMOKE_MACOS_RESULT" \
"unit-tests=$UNIT_TESTS_RESULT" \
"unit-tests-macos=$UNIT_TESTS_MACOS_RESULT" \
"native-libraries=$NATIVE_LIBRARIES_RESULT" \
"real-libraries-portability=$REAL_LIBRARIES_PORTABILITY_RESULT" \
"documentation-benchmark=$DOCUMENTATION_BENCHMARK_RESULT" \
"documentation-build=$DOCUMENTATION_BUILD_RESULT"
do
stage=${staged_result%%=*}
result=${staged_result#*=}
if [[ "$stage" == "native-libraries" && \
if [[ "$stage" == "real-libraries-portability" && \
"$result" == "skipped" && \
"$IGNORE_NATIVE_LIBRARIES" == "true" ]]; then
"$IGNORE_REAL_LIBRARIES_PORTABILITY" == "true" ]]; then
continue
fi
if [[ "$result" != "success" ]]; then
Expand Down
147 changes: 147 additions & 0 deletions .github/workflows/real-libraries-portability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Real Libraries Portability

on:
workflow_call:
push:
branches:
- main
- release/*
workflow_dispatch:

permissions:
contents: read

concurrency:
group: real-libraries-portability-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
examples:
name: Real Libraries Portability · ${{ matrix.target }} · Python 3.12
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- target: Linux x86-64
cache_key: linux-x86-64
runner: ubuntu-24.04
fortran_compiler: gfortran-13
fortran_c_compiler: gcc-13
primary_c_compiler: gcc-13
secondary_c_compiler: clang-18
- target: Linux ARM64
cache_key: linux-arm64
runner: ubuntu-24.04-arm
fortran_compiler: gfortran-13
fortran_c_compiler: gcc-13
primary_c_compiler: gcc-13
secondary_c_compiler: clang-18
- target: macOS Intel
cache_key: macos-intel
runner: macos-15-intel
fortran_compiler: gfortran-13
fortran_c_compiler: gcc-13
primary_c_compiler: clang
secondary_c_compiler: gcc-13
- target: macOS ARM64
cache_key: macos-arm64
runner: macos-15
fortran_compiler: gfortran-13
fortran_c_compiler: gcc-13
primary_c_compiler: clang
secondary_c_compiler: gcc-13
env:
PRIK_REAL_LIBRARY_NATIVE_JOBS: "8"
PYTHONPATH: .
HYPOTHESIS_PROFILE: ci
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Ubuntu native dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install --yes gfortran-13 libblas-dev liblapack-dev
- name: Ensure macOS GNU compilers are available
if: runner.os == 'macOS'
run: |
if ! command -v "${{ matrix.fortran_compiler }}" >/dev/null 2>&1 || \
! command -v "${{ matrix.fortran_c_compiler }}" >/dev/null 2>&1; then
brew install gcc@13
fi
- name: Configure GNU Fortran and C
shell: bash
run: |
compiler_dir="$RUNNER_TEMP/prik-example-compilers"
mkdir -p "$compiler_dir"
ln -sf "$(command -v "${{ matrix.fortran_compiler }}")" "$compiler_dir/gfortran"
ln -sf "$(command -v "${{ matrix.fortran_c_compiler }}")" "$compiler_dir/gcc"
echo "$compiler_dir" >> "$GITHUB_PATH"
echo "PRIK_REAL_LIBRARY_NATIVE_CACHE_DIR=$RUNNER_TEMP/prik-example-native" >> "$GITHUB_ENV"
- name: Install example dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[qa]" \
"numpy==2.5.1" \
"meson==1.11.2" \
"ninja==1.13.0" \
"scipy==1.18.0"
- name: Restore compiled BLAS and LAPACK cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/prik-example-native
key: real-libraries-portability-${{ matrix.cache_key }}-gfortran13-${{ hashFiles('examples/native_library.py', 'examples/blas/native/**', 'examples/lapack/native/**', 'examples/lapack/support/**', 'examples/lapack/xblas_sources.txt') }}
- name: Show target and compilers
run: |
uname -a
python --version
gfortran --version
gcc --version
"${{ matrix.primary_c_compiler }}" --version
"${{ matrix.secondary_c_compiler }}" --version
- name: Run libm with ${{ matrix.primary_c_compiler }}
env:
PRIK_LIBM_CC: ${{ matrix.primary_c_compiler }}
run: |
source examples/libm/build_all.sh
python -m pytest -q examples/libm/tests
- name: Run libm with ${{ matrix.secondary_c_compiler }}
env:
PRIK_LIBM_CC: ${{ matrix.secondary_c_compiler }}
run: |
source examples/libm/build_all.sh
python -m pytest -q examples/libm/tests
- name: Run BLAS example
run: |
source examples/blas/build_all.sh
python -m pytest -q examples/blas/tests
if [[ "${{ matrix.target }}" == "Linux x86-64" ]]; then
python -m pytest -q examples/blas/ci/full_surface.py
fi
- name: Run LAPACK example
run: |
source examples/lapack/build_all.sh
python -m pytest -q examples/lapack/tests
if [[ "${{ matrix.target }}" == "Linux x86-64" ]]; then
python -m pytest -q examples/lapack/ci/full_surface.py
fi
- name: Run FFTPACK example
run: |
source examples/fftpack/build_all.sh
python -m pytest -q examples/fftpack/tests
- name: Run MINPACK example
run: |
source examples/minpack/build_all.sh
python -m pytest -q examples/minpack/tests
- name: Run BSPLINE-FORTRAN example
run: |
source examples/bspline/build_all.sh
python -m pytest -q examples/bspline/tests
Loading
Loading