Skip to content

CI: one job per compiler (fpm only), separate matplotlib job - #28

Merged
certik merged 2 commits into
mainfrom
ci-per-compiler
Sep 14, 2026
Merged

certik merged 2 commits into
mainfrom
ci-per-compiler

Conversation

@certik

@certik certik commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Jobs (Linux):

job pixi environment steps
GFortran (new) gfortran: gfortran 16 + fpm fpm test, fpm test --flag '-O3 -march=native', demo
Flang flang: flang 22 + fpm fpm test, fpm test --flag '-O3 -march=native', demo
LFortran lfortran: LFortran 0.66 + fpm fpm test, demo
Matplotlib comparison (Flang) matplotlib: flang + Python, matplotlib, poppler, ghostscript references + pictures once, then the SVG/PNG/PDF/EPS/GIF comparisons
  • No Python in the compiler jobs. Each environment holds only its compiler and fpm; fpm test builds the package and checks every picture against tests/fingerprints.txt.
  • fpm test everywhere. The separate "Build as an fpm package" step is gone (fpm test builds the package), as are scripts/build_flang.sh and scripts/build_lfortran.sh. Pixi tasks: test-gfortran, test-gfortran-O3, test-flang, test-flang-O3, test-lfortran, demo-*; each is defined in one environment only, so pixi run test-lfortran picks its environment by itself.
  • Matplotlib comparison on the flang build only, as before, but no longer rebuilt five times: mpl-refs and test-outputs declare inputs and outputs, so the comparisons after them get a pixi cache hit. pixi run compare-all runs all five locally.
  • LFortran runs only its default build for now; --fast does not compile fplot yet.
  • Failing jobs upload tests/out as an artifact (tests-out-<job>), so a failing picture can be looked at directly.

Bug the new GFortran job found: on x86-64, -O3 -march=native failed hist_opts and hist_orient (38–40 bits). hist built the last bin edge as lo + nb*w, which fused multiply-add can round one ulp below maxval(x), so the largest sample fell outside every bin, shortening the last bar and rescaling every density. The last edge is now hi itself, as numpy's linspace makes it. No stored fingerprint changes (all plain builds already had the last edge equal to hi).

Verified locally (macOS), every task: gfortran and flang plain 0 bits, -O3 5 bits, LFortran 5 bits, all three demos run, matplotlib references and pictures made once and reused by the comparisons (cache hit), SVG and PNG comparisons pass.

Every compiler now has a pixi environment holding only the compiler and
fpm, and its tests run as `fpm test`, so the regular tests need no Python:

- gfortran (new, conda-forge gfortran 16): plain and -O3 -march=native
- flang: plain and -O3 -march=native
- LFortran: plain

Each job also builds and runs the demo. `fpm test` builds the package, so
the separate fpm build step is gone, and so are scripts/build_flang.sh and
scripts/build_lfortran.sh, which the tasks no longer need.

The matplotlib comparison is its own job, on the flang build as before.
Its references and pictures are pixi tasks with inputs and outputs, so they
are made once and the five comparisons reuse them instead of rebuilding
fplot five times.
The new GFortran -O3 -march=native job on x86-64 failed hist_opts and
hist_orient. hist built the last edge as lo + nb*w, which fused multiply-add
can round to one ulp below maxval(x); the largest sample then failed the
x > edges(nb+1) test and dropped out, shortening the last bar and rescaling
every density. The last edge is now hi itself, as numpy's linspace makes it.

CI also uploads tests/out when a job fails, so a failing picture can be
looked at instead of reasoned about.
@certik
certik merged commit 09ebaa3 into main Sep 14, 2026
4 checks passed
@certik
certik deleted the ci-per-compiler branch September 14, 2026 06:24
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