Skip to content

Mpi f08 - #74

Open
saidctb wants to merge 13 commits into
mainfrom
mpi_f08
Open

saidctb wants to merge 13 commits into
mainfrom
mpi_f08

Conversation

@saidctb

@saidctb saidctb commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

saidctb and others added 6 commits September 23, 2026 23:00
Expose mutable fixed module scalars as native rank-zero views and follow scalar allocatable and pointer storage through handles. Accept exact rank-zero NumPy actuals for bare scalar and fixed-character dummies while preserving reference and VALUE transport. Refresh contracts, documentation, and source/pyi runtime evidence, including real Open MPI replay.
Read scalar allocatable and pointer module variables as nullable native rank-zero views. Remove the scalar-handle callback runtime, keep array descriptor handles, and verify source/pyi parity plus real Open MPI execution.
- Scalar allocatable and pointer module variables lend read-only views;
  assignment allocates an allocatable or writes a pointer's current target.
- Rank-zero actual transport follows the dummy's VALUE attribute on direct
  and adapted routes; Immutable arguments copy rank-zero storage in.
- Logical scalar dummies wider than one byte borrow integer storage of their
  own width, as logical arrays do, so intent(inout) updates reach Python.
- An omitted optional intent(inout) scalar returns None instead of reading
  a NULL storage pointer; storage-typed scalars unpack then convert.
- Empty deferred-length character module variables read as b"".
- Module-scope PARAMETER statements honor IMPLICIT rules and implicit none.
- Export selection keeps component and parent types of selected types, and
  source builds publish the same surface as generated contracts.
- Update tests and golden fixtures that pinned the replaced behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saidctb and others added 7 commits September 24, 2026 15:48
The bridge calls each selected procedure through the module that declares
it, so a declaring module's contract no longer names a facade that imports
it. Export selection still resolves facade names to their declarations, and
the facade contract still re-exports them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se all mpifort flags

- Native-width logical scalars cross the generated bind(C) boundary as an
  address or a same-width interoperable integer; the logical kind is formed
  behind the boundary with c_f_pointer or transfer, so the bridge compiles
  under -std=f2018.
- IMPLICIT NONE disables implicit typing only when plain or naming TYPE, in
  module and procedure scopes; NONE(EXTERNAL) keeps it.
- The Open MPI test and tutorial take the compiler command, include
  directories, remaining compile flags, link arguments, and library
  directories from mpifort --showme instead of keeping only -I flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--module-source-dir (and build_fortran_extension(module_source_dirs=...))
lets a multi-module Fortran library be supplied by its entry source: PRIK
follows each use, after preprocessing and as the parser reads it, to the one
source under the given directories that defines the module, transitively,
and reads it dependencies first. The directories are only scanned for module
lines to locate candidates. A used module with no defining source, or with
several, is an error instead of an undefined type.

The Open MPI test and tutorial now name only mpi-f08.F90, so the module
layout of each Open MPI version is found rather than listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…operators

- A derived type a module reaches through another module's re-export now
  resolves to the module declaring it, using the same chain-following
  resolution contract imports use; before, the contract wrote an undefined
  type name (Open MPI 5 declares handles in mpi_types, re-exported by
  mpi_f08_types).
- Contracts keep a dotted comparison spelling such as operator(.EQ.) in
  @overload(..., generic=...), and replay accepts it, so the bridge imports
  the operator under the spelling its module declares.
- The Open MPI test and tutorial search both the source and configured build
  trees and include the generated mod/ headers; handle classes are checked
  wherever the version declares them. Verified with Open MPI 4.1.2 and 5.0.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amed generics

- An Open MPI Integration lane builds Open MPI 4.1.8 and 5.0.11 from source,
  caches the source, configured build, and installation, and runs the mpi_f08
  workflow test with PRIK_OPENMPI_REQUIRED=1 so missing setup fails instead
  of skipping. Pull-request validation requires it.
- The Open MPI test also requires the configured tree and the installation to
  share their Fortran compiler and the installation to provide mpi_f08.
- Export selection treats a generic that shares a specific's name as that one
  generic name instead of reporting it ambiguous; a two-level facade
  selection test covers the Open MPI 5 re-export shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test session refuses to start while .mod, object, or library files sit
in the repository root, where a stale module silently shadows later builds,
and fails when a test leaves one there. AGENTS.md asks for ad-hoc compiler
commands to run outside the root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arkers

Compiler preprocessing prefixes its output with line markers and renumbers
around #include and #if blocks, so parse errors reported preprocessor output
lines (line 7 of a 4-line file). The parser now follows the markers: a line
keeps its number in the main source, and a line an included file contributes
is reported at the #include line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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