Skip to content

Conversation

@krystophny
Copy link
Member

@krystophny krystophny commented Jan 5, 2026

User description

Adds a coil-clearance constraint to the Python PortOptimizer (maps candidate port locations to wall xyz via chartmap and rejects ports too close to coil segments). Also adds an engineering test plot artifact and parallelizes the chartmap wall-losses integration test over particles.

Validation:

  • make test TEST=test_engineering (passed)
  • make test TEST=test_chartmap_wall_losses (passed)
  • make test TEST=test_chartmap_ncsx_map2disc_wall_offset (passed)

Test artifacts (local build output paths):

  • build/test/python/test_artifacts/engineering/port_feasibility_coil_clearance.png
  • build/test/tests/chartmap_wall_losses_summary.png
  • build/test/tests/chartmap_wall_offset_check.png

PR Type

Enhancement, Tests


Description

  • Add coil-clearance constraint to PortOptimizer for geometric feasibility

    • Maps candidate port locations to wall xyz via chartmap
    • Rejects ports violating minimum distance to coil segments
  • Parallelize chartmap wall-losses integration test with OpenMP

    • Add OpenMP directives to all particle tracing subroutines
    • Report max thread count in test output
  • New coil_clearance module with wall surface interpolation and distance queries

  • Add visualization function for heat flux with coil clearance overlay


Diagram Walkthrough

flowchart LR
  A["Port Optimizer"] -->|set_coil_clearance_constraint| B["CoilClearanceConstraint"]
  B -->|loads| C["CoilSegments from file"]
  B -->|loads| D["WallSurface from chartmap"]
  B -->|checks| E["port_violates"]
  E -->|computes| F["min_distance_points_to_segments"]
  A -->|objective function| G["penalty if violation"]
  H["test_chartmap_wall_losses"] -->|OpenMP| I["parallel particle tracing"]
  I -->|speedup| J["faster integration test"]
Loading

File Walkthrough

Relevant files
Enhancement
coil_clearance.py
New coil clearance constraint module                                         

python/pysimple/coil_clearance.py

  • New module for coil-aware geometric feasibility constraints
  • Load coil points from SIMPLE/libneo-style files and split into
    polylines
  • Interpolate wall surface from chartmap NetCDF on rho=1 boundary
  • Compute minimum distances from wall points to coil segments with
    blocking
  • CoilClearanceConstraint class to check port violations
  • clearance_map_on_heatmap_grid function for visualization
+392/-0 
engineering.py
Integrate coil clearance into port optimizer                         

python/pysimple/engineering.py

  • Import CoilClearanceConstraint, CoilSegments, WallSurface from
    coil_clearance
  • Add _coil_clearance field to PortOptimizer
  • New set_coil_clearance_constraint method to configure constraint
  • Integrate coil clearance check into _objective function with 1e6
    penalty
  • New plot_heat_flux_with_coil_clearance function for visualization
+105/-0 
test_chartmap_wall_losses.f90
Parallelize particle tracing with OpenMP                                 

test/tests/magfie/test_chartmap_wall_losses.f90

  • Add omp_lib module import for OpenMP thread reporting
  • Print max OpenMP threads at test start
  • Add !$omp parallel do directives to all 8 particle tracing subroutines
  • Parallelize loops over n_particles with static scheduling
  • Properly declare private variables for each parallel region
+18/-0   
Tests
test_engineering.py
Add coil clearance tests and mock coil file generator       

test/python/test_engineering.py

  • Import plot_heat_flux_with_coil_clearance function
  • Add create_mock_coil_file helper to generate test coil polyline files
  • New TestCoilClearance test class with two test methods
  • test_coil_clearance_penalizes_forbidden_ports validates constraint
    penalty
  • test_plot_heat_flux_with_coil_clearance_writes_artifact tests
    visualization
+98/-0   
Configuration changes
CMakeLists.txt
Configure test artifacts directory for engineering tests 

test/python/CMakeLists.txt

  • Add SIMPLE_TEST_ARTIFACTS_DIR environment variable to test_engineering
  • Enables test to write artifact plots to proper output directory
+1/-1     

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 5, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing input validation: WallSurface.from_chartmap assumes required NetCDF variables exist and have expected
shapes/units (e.g., x/y/z indexing [:, :, -1]) without explicit validation, so malformed
or unexpected chartmap inputs will fail with low-context exceptions (e.g., KeyError/index
errors).

Referred Code
@classmethod
def from_chartmap(cls, chartmap_file: str | Path) -> "WallSurface":
    if not HAS_NETCDF4:
        raise ImportError("netCDF4 required: pip install netCDF4")

    path = Path(chartmap_file)
    with nc.Dataset(path, "r") as ds:
        theta = np.asarray(ds.variables["theta"][:], dtype=float)
        zeta = np.asarray(ds.variables["zeta"][:], dtype=float)
        nfp = int(ds.variables["num_field_periods"][...])

        x_wall = np.asarray(ds.variables["x"][:, :, -1], dtype=float) * 0.01
        y_wall = np.asarray(ds.variables["y"][:, :, -1], dtype=float) * 0.01
        z_wall = np.asarray(ds.variables["z"][:, :, -1], dtype=float) * 0.01

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
External file handling: The new set_coil_clearance_constraint and plotting helper accept external
coil_file/chartmap_file paths and load their contents, but the diff does not show broader
system-level safeguards (trusted path constraints/sandboxing) needed to confirm
security-first handling of externally supplied files.

Referred Code
def set_coil_clearance_constraint(
    self,
    coil_file: str | Path,
    *,
    chartmap_file: str | Path,
    min_clearance_m: float,
    use_zero_current_separators: bool = True,
    jump_factor: float = 25.0,
) -> "PortOptimizer":
    """
    Enforce a minimum distance from ports to coils (geometric feasibility).

    This constraint requires a chartmap file to map (theta, zeta) port
    locations to physical-space coordinates on the wall.
    """
    if min_clearance_m <= 0.0:
        raise ValueError("min_clearance_m must be positive")

    wall = WallSurface.from_chartmap(chartmap_file)
    coils = CoilSegments.from_file(
        coil_file,


 ... (clipped 9 lines)

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 5, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix periodic interpolation weight calculation

Fix the periodic interpolation weight calculation in _periodic_bilinear_indices
to correctly handle wrap-around cases by applying a modulo operation to the
numerator.

python/pysimple/coil_clearance.py [234-255]

 def _periodic_bilinear_indices(
     grid: np.ndarray, values: np.ndarray, period: float
 ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
     n = grid.size
     if n < 2:
         raise ValueError("Interpolation grid must have at least 2 points")
 
     v = np.mod(values, period)
     i1 = np.searchsorted(grid, v, side="right")
     i0 = i1 - 1
     i0 = np.mod(i0, n)
     i1 = np.mod(i1, n)
 
     g0 = grid[i0]
     g1 = grid[i1]
 
     wrapped = i1 <= i0
     denom = np.where(wrapped, (g1 + period) - g0, g1 - g0)
+    numer = np.where(wrapped, np.mod(v - g0, period), v - g0)
     denom = np.where(denom == 0.0, 1.0, denom)
-    w = (v - g0) / denom
+    w = numer / denom
     w = np.clip(w, 0.0, 1.0)
     return i0, i1, w
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: This suggestion correctly identifies a subtle bug in the periodic interpolation logic that occurs at boundary wrap-around and provides a correct fix, preventing potential errors in coordinate mapping.

Medium
Improve header parsing robustness

In load_coil_points, handle a potential IndexError during header parsing by
adding it to the except block to prevent crashes on malformed files.

python/pysimple/coil_clearance.py [27-59]

 def load_coil_points(coil_file: str | Path) -> tuple[np.ndarray, np.ndarray]:
     """
     Load coil points from a SIMPLE/libneo-style coil file.
 
     Format:
         First line: integer N (number of points)
         Next N lines: x y z I
 
     Coordinates are expected to be in meters.
 
     Returns:
         points: (N, 3) array of xyz points [m]
         currents: (N,) array of currents
     """
     path = Path(coil_file)
     with path.open("r", encoding="utf-8") as f:
         header = f.readline().strip()
         if not header:
             raise ValueError(f"Empty coil file: {path}")
         try:
             n_points = int(header.split()[0])
-        except ValueError as exc:
-            raise ValueError(f"Invalid coil file header (expected N): {path}") from exc
+        except (ValueError, IndexError) as exc:
+            raise ValueError(f"Invalid coil file header (expected N points): {path}") from exc
 
         data = np.loadtxt(f, dtype=float, ndmin=2)
     if data.shape[0] != n_points or data.shape[1] < 4:
         raise ValueError(
             f"Coil file {path} expected {n_points} rows of x y z I, got {data.shape}"
         )
 
     points = data[:, 0:3].astype(float, copy=False)
     currents = data[:, 3].astype(float, copy=False)
     return points, currents
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies a potential IndexError for malformed coil file headers and proposes a simple fix, improving the function's robustness against edge-case inputs.

Low
High-level
Use a dedicated geometry library

Instead of implementing complex geometric calculations from scratch in
coil_clearance.py, consider using a mature geometry library like trimesh or
scipy.spatial. This would simplify the code and improve its robustness and
maintainability.

Examples:

python/pysimple/coil_clearance.py [178-231]
def min_distance_points_to_segments(
    points: np.ndarray,
    p0: np.ndarray,
    p1: np.ndarray,
    *,
    block_size: int = 128,
) -> np.ndarray:
    """
    Compute minimum distances from many points to many segments.


 ... (clipped 44 lines)

Solution Walkthrough:

Before:

# file: python/pysimple/coil_clearance.py

def min_distance_points_to_segments(points, p0, p1, ...):
    """
    Compute minimum distances from many points to many segments.
    ...
    """
    # ... complex numpy implementation with einsum and broadcasting ...
    w = points[:, None, :] - p0b[None, :, :]
    t = np.einsum("mbi,bi->mb", w, v) / vv[None, :]
    t = np.clip(t, 0.0, 1.0)
    proj = p0b[None, :, :] + t[:, :, None] * v[None, :, :]
    d2 = np.einsum("mbi,mbi->mb", points[:, None, :] - proj, points[:, None, :] - proj)
    min_d2 = np.minimum(min_d2, np.min(d2, axis=1))
    return np.sqrt(min_d2)

class CoilClearanceConstraint:
    def port_violates(...):
        # ...
        xyz = self.wall.xyz(theta_pts, zeta_pts)
        d = min_distance_points_to_segments(xyz, self.coils.p0, self.coils.p1)
        return bool(np.any(d < self.min_clearance_m))

After:

# file: python/pysimple/coil_clearance.py
# Requires adding 'trimesh' as a dependency

import trimesh

def min_distance_points_to_segments(points, p0, p1, ...):
    """
    Compute minimum distances from many points to many segments using trimesh.
    """
    segments = np.stack((p0, p1), axis=1)
    path = trimesh.path.Path3D(entities=None, vertices=None, segments=segments)
    # The trimesh query returns closest points, distances, and segment indices
    _, distances, _ = path.nearest.on_path(points)
    return distances

class CoilClearanceConstraint:
    def port_violates(...):
        # ...
        xyz = self.wall.xyz(theta_pts, zeta_pts)
        d = min_distance_points_to_segments(xyz, self.coils.p0, self.coils.p1)
        return bool(np.any(d < self.min_clearance_m))
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the PR implements complex geometric calculations from scratch in coil_clearance.py, and proposes a valid architectural alternative of using a specialized library to improve robustness and maintainability.

Medium
General
Ensure consistent coil splitting parameters

To ensure consistency between optimization and visualization, update
plot_heat_flux_with_coil_clearance to accept use_zero_current_separators and
jump_factor and pass them to CoilSegments.from_file.

python/pysimple/engineering.py [1057-1117]

 def plot_heat_flux_with_coil_clearance(
     heat_map: WallHeatMap,
     *,
     coil_file: str | Path,
     chartmap_file: str | Path,
     min_clearance_m: float,
     ax=None,
     cmap: str = "hot",
     vmax: Optional[float] = None,
     show_colorbar: bool = True,
     ports: Optional[list[Port]] = None,
     forbidden_alpha: float = 0.35,
+    use_zero_current_separators: bool = True,
+    jump_factor: float = 25.0,
 ):
     """
 ... (clipped 10 lines)
     ax = plot_heat_flux_2d(
         heat_map,
         ax=ax,
         cmap=cmap,
         vmax=vmax,
         show_colorbar=show_colorbar,
         ports=ports,
     )
 
     wall = WallSurface.from_chartmap(chartmap_file)
-    coils = CoilSegments.from_file(coil_file)
+    coils = CoilSegments.from_file(
+        coil_file,
+        use_zero_current_separators=use_zero_current_separators,
+        jump_factor=jump_factor,
+    )
     clearance = clearance_map_on_heatmap_grid(
         wall,
         coils,
         heat_map.theta_centers,
         heat_map.zeta_centers,
     )
     forbidden = clearance < min_clearance_m
 
     forbidden_grid = forbidden.astype(float)
     ax.pcolormesh(
         np.degrees(heat_map.zeta_edges),
         np.degrees(heat_map.theta_edges),
-        forbidden_grid,
+        forbidden_grid.T,
         cmap="Greys",
         vmin=0.0,
         vmax=1.0,
         shading="flat",
         alpha=forbidden_alpha,
     )
     ax.set_title(
         f"Wall Heat Flux + Coil Clearance (d > {min_clearance_m:.3f} m)"
     )
     return ax

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out a potential inconsistency between optimization and visualization by allowing different coil splitting parameters, and the proposed change improves the API to ensure consistency.

Low
Ensure zip compatibility

Remove strict=True from the zip call in split_coil_polylines to ensure
compatibility with Python versions earlier than 3.10.

python/pysimple/coil_clearance.py [88]

-for p, I in zip(points, currents, strict=True):
+for p, I in zip(points, currents):
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly identifies a Python version compatibility issue with zip(strict=True) and proposes a valid fix, though the impact is minor as the surrounding code already ensures the zipped iterables have the same length.

Low
  • Update

@qodo-code-review
Copy link

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Build and Test

Failed stage: Run Slow Tests (Python) [❌]

Failed test name: generate_chartmap_map2disc

Failure summary:

The action failed during make test-slow because CTest reported 3 failing slow tests.
- Test
generate_chartmap_map2disc failed with a Python import error:
- ImportError: Numba needs NumPy 2.3
or less. Got NumPy 2.4. (stack trace shows failure while importing numba via map2disc/pybie2d).
-
This indicates an incompatible dependency set in the CI environment (NumPy too new for the installed
Numba).
- Because generate_chartmap_map2disc failed, dependent test
test_chartmap_wall_losses_map2disc was Not Run due to failed dependencies.
- Test
test_chartmap_wall_losses_plot_map2disc then failed because its expected output file was missing:

- Error: chartmap_wall_losses_map2disc.nc not found (a downstream artifact normally produced by the
earlier map2disc-related test).
The workflow terminated with make: *** [Makefile:51: test-slow]
Error 8 and the job failed with exit code 2.

Relevant error logs:
1:  Runner name: 'debian-2'
2:  Runner group name: 'default'
...

25:  ssh-user: git
26:  persist-credentials: true
27:  clean: true
28:  sparse-checkout-cone-mode: true
29:  fetch-tags: false
30:  show-progress: true
31:  lfs: false
32:  submodules: false
33:  set-safe-directory: true
34:  env:
35:  LIBNEO_BRANCH: feature/port-coil-clearance
36:  ##[endgroup]
37:  Syncing repository: itpplasma/SIMPLE
38:  ##[group]Getting Git version info
39:  Working directory is '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE'
40:  Unexpected error attempting to determine if executable file exists '/home/ert/.npm-global/bin/git': Error: EACCES: permission denied, stat '/home/ert/.npm-global/bin/git'
41:  Unexpected error attempting to determine if executable file exists '/home/ert/code/.venv/bin/git': Error: EACCES: permission denied, stat '/home/ert/code/.venv/bin/git'
42:  Unexpected error attempting to determine if executable file exists '/home/ert/code/scripts/git': Error: EACCES: permission denied, stat '/home/ert/code/scripts/git'
43:  [command]/usr/bin/git version
...

463:  [74/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_ascii.f90-pp.f90
464:  [75/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_constants.f90-pp.f90
465:  [76/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_context.f90-pp.f90
466:  [77/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_coordinate_validation.f90-pp.f90
467:  [78/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_contour_algorithms.f90-pp.f90
468:  [79/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_contour_regions.f90-pp.f90
469:  [80/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_coordinates.f90-pp.f90
470:  [81/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_constants.f90-pp.f90
471:  [82/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_examples.f90-pp.f90
472:  [83/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_media.f90-pp.f90
473:  [84/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_output.f90-pp.f90
474:  [85/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_processor.f90-pp.f90
475:  [86/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_source.f90-pp.f90
476:  [87/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_paths.f90-pp.f90
477:  [88/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_text.f90-pp.f90
478:  [89/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_errors.f90-pp.f90
479:  [90/945] Building Fortran preprocessed _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_files.f90-pp.f90
...

623:  [234/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/libneo_kinds.f90.o
624:  [235/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/coordinates/libneo_coordinate_conventions.f90.o
625:  [236/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_animation_constants.f90.o
626:  [237/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_constants.f90.o
627:  [238/945] Building Fortran preprocessed src/CMakeFiles/simple.dir/diag/diag_albert.f90-pp.f90
628:  [239/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/canonical_coordinates_mod.f90.o
629:  [240/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/coordinates/cylindrical_cartesian.f90.o
630:  [241/945] Building Fortran object _deps/libneo-build/src/contrib/CMakeFiles/CONTRIB.dir/minpack_interfaces.f90.o
631:  [242/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_doc_constants.f90.o
632:  [243/945] Building Fortran preprocessed src/CMakeFiles/simple.dir/diag/diag_newton.f90-pp.f90
633:  [244/945] Building C object _deps/libneo-build/CMakeFiles/neo.dir/src/local_rusage.c.o
634:  [245/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/math_constants.f90.o
635:  [246/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_bmp.f90.o
636:  [247/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/rusage_type.f90.o
637:  [248/945] Building Fortran object _deps/libneo-build/src/field/CMakeFiles/neo_field.dir/mesh.f90.o
638:  [249/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_errors.f90.o
639:  [250/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/util/simpson_integration.f90.o
...

808:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_doc_output.f90:30:44:
809:  30 |     subroutine find_output_files(example_dir, example_name, media_files, n_media)
810:  |                                            1
811:  Warning: Unused dummy argument ‘example_dir’ at (1) [-Wunused-dummy-argument]
812:  [287/945] Building C object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_mkdir_windows.c.o
813:  [288/945] Building C object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_c_interface.c.o
814:  [289/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_streamline_placement.f90.o
815:  [290/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_vector.f90.o
816:  [291/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_windows_performance.f90.o
817:  [292/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_streamline_integrator.f90.o
818:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_streamline_integrator.f90:80:29:
819:  80 |         real(wp) :: tolerance, h_new
820:  |                             1
821:  Warning: Unused variable ‘tolerance’ declared at (1) [-Wunused-variable]
822:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_streamline_integrator.f90:77:37:
823:  77 |         real(wp) :: x, y, t, h, x_new, y_new, error_est
824:  |                                     1
825:  Warning: Unused variable ‘x_new’ declared at (1) [-Wunused-variable]
826:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_streamline_integrator.f90:77:44:
827:  77 |         real(wp) :: x, y, t, h, x_new, y_new, error_est
828:  |                                            1
...

1080:  [375/945] Building Fortran object _deps/libneo-build/src/magfie/CMakeFiles/magfie.dir/field_c_mod.f90.o
1081:  [376/945] Building Fortran object _deps/libneo-build/src/magfie/CMakeFiles/magfie.dir/field_mod.f90.o
1082:  [377/945] Building Fortran object _deps/libneo-build/src/magfie/CMakeFiles/magfie.dir/field_eq_mod.f90.o
1083:  [378/945] Building Fortran object _deps/libneo-build/src/magfie/CMakeFiles/magfie.dir/magfield_mod.f90.o
1084:  [379/945] Building Fortran object _deps/libneo-build/CMakeFiles/neo.dir/src/vmecinm_m.f90.o
1085:  [380/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_label_positioning.f90.o
1086:  [381/945] Generating Fortran dyndep file _deps/libneo-build/src/efit_to_boozer/CMakeFiles/efit_to_boozer.dir/Fortran.dd
1087:  [382/945] Building Fortran preprocessed _deps/libneo-build/src/species/CMakeFiles/species.dir/species.f90-pp.f90
1088:  [383/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_legend_layout.f90.o
1089:  [384/945] cd /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/libneo-src/extra/MyMPILib && /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/libneo-src/extra/MyMPILib/Scripts/do_versioning.sh
1090:  Versioning MyMPILib...
1091:  [385/945] Building Fortran preprocessed test/tests/CMakeFiles/testing_utils.dir/utility.f90-pp.f90
1092:  [386/945] Building Fortran preprocessed _deps/libneo-build/src/collisions/CMakeFiles/collision_freqs.dir/collision_freqs.f90-pp.f90
1093:  [387/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_streamplot_matplotlib.f90.o
1094:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_streamplot_matplotlib.f90:257:16:
1095:  257 |             if (error == 0.0_wp) then
1096:  |                1
...

2310:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_io.f90:126:36:
2311:  126 |     subroutine savefig(filename, dpi, transparent, bbox_inches)
2312:  |                                    1
2313:  Warning: Unused dummy argument ‘dpi’ at (1) [-Wunused-dummy-argument]
2314:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_io.f90:126:49:
2315:  126 |     subroutine savefig(filename, dpi, transparent, bbox_inches)
2316:  |                                                 1
2317:  Warning: Unused dummy argument ‘transparent’ at (1) [-Wunused-dummy-argument]
2318:  [663/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_animation_pipeline.f90.o
2319:  [664/945] Building Fortran object _deps/fortplot-build/CMakeFiles/fortplot.dir/src/fortplot_matplotlib_plotting.f90.o
2320:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:333:59:
2321:  333 |     subroutine add_3d_plot(x, y, z, label, linestyle, color, linewidth, marker, markersize)
2322:  |                                                           1
2323:  Warning: Unused dummy argument ‘color’ at (1) [-Wunused-dummy-argument]
2324:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:259:91:
2325:  259 |     subroutine add_errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2326:  |                                                                                           1
...

2382:  |                    1
2383:  Warning: Unused variable ‘i’ declared at (1) [-Wunused-variable]
2384:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:54:57:
2385:  54 |     subroutine bar(x, height, width, bottom, label, color, edgecolor, align)
2386:  |                                                         1
2387:  Warning: Unused dummy argument ‘color’ at (1) [-Wunused-dummy-argument]
2388:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:54:68:
2389:  54 |     subroutine bar(x, height, width, bottom, label, color, edgecolor, align)
2390:  |                                                                    1
2391:  Warning: Unused dummy argument ‘edgecolor’ at (1) [-Wunused-dummy-argument]
2392:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:65:20:
2393:  65 |         integer :: i
2394:  |                    1
2395:  Warning: Unused variable ‘i’ declared at (1) [-Wunused-variable]
2396:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:61:
2397:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2398:  |                                                             1
2399:  Warning: Unused dummy argument ‘capsize’ at (1) [-Wunused-dummy-argument]
2400:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:87:
2401:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2402:  |                                                                                       1
2403:  Warning: Unused dummy argument ‘color’ at (1) [-Wunused-dummy-argument]
2404:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:45:
2405:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2406:  |                                             1
2407:  Warning: Unused dummy argument ‘fmt’ at (1) [-Wunused-dummy-argument]
2408:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:80:
2409:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2410:  |                                                                                1
2411:  Warning: Unused dummy argument ‘marker’ at (1) [-Wunused-dummy-argument]
2412:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:34:
2413:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2414:  |                                  1
2415:  Warning: Unused dummy argument ‘xerr’ at (1) [-Wunused-dummy-argument]
2416:  /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/fortplot-src/src/fortplot_matplotlib_plotting.f90:41:40:
2417:  41 |     subroutine errorbar(x, y, xerr, yerr, fmt, label, capsize, linestyle, marker, color)
2418:  |                                        1
...

2795:  [716/945] Building Fortran preprocessed _deps/libneo-build/CMakeFiles/_magfie.dir/_magfie-f2pywrappers.f-pp.f
2796:  [717/945] Building Fortran preprocessed _deps/libneo-build/CMakeFiles/_magfie.dir/_magfie-f2pywrappers2.f90-pp.f90
2797:  [718/945] Building Fortran preprocessed _deps/libneo-build/CMakeFiles/_magfie.dir/src/magfie/magfie_vmec.f90-pp.f90
2798:  [719/945] Building Fortran preprocessed _deps/libneo-build/CMakeFiles/_magfie.dir/src/f2py_interfaces/f2py_vmec_support.f90-pp.f90
2799:  [720/945] Building Fortran object src/CMakeFiles/simple.dir/field/field_splined.f90.o
2800:  [721/945] Building Fortran preprocessed _deps/libneo-build/CMakeFiles/_magfie.dir/src/f2py_interfaces/f2py_magfie.f90-pp.f90
2801:  [722/945] Generating Fortran dyndep file _deps/libneo-build/CMakeFiles/_magfie.dir/Fortran.dd
2802:  [723/945] Converting STELLOPT coils to SIMPLE format
2803:  Converted 18690 coil segments from /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/test/test_data/coils.c09r00 to /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/test/tests/coils.simple
2804:  [724/945] Building Fortran object _deps/libneo-build/CMakeFiles/_magfie.dir/_magfie-f2pywrappers.f.o
2805:  [725/945] Building Fortran object _deps/libneo-build/CMakeFiles/_magfie.dir/src/f2py_interfaces/f2py_vmec_support.f90.o
2806:  [726/945] Building Fortran object _deps/libneo-build/CMakeFiles/_magfie.dir/src/f2py_interfaces/f2py_magfie.f90.o
2807:  [727/945] Building Fortran object _deps/libneo-build/CMakeFiles/_magfie.dir/src/f2py_interfaces/f2py_vmec_wrappers.f90.o
2808:  [728/945] Building Fortran object _deps/libneo-build/CMakeFiles/_magfie.dir/_magfie-f2pywrappers2.f90.o
2809:  [729/945] Generating _efit_to_boozermodule.c, _efit_to_boozer-f2pywrappers.f, _efit_to_boozer-f2pywrappers2.f90
2810:  OSError: [Errno 2] No such file or directory: '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/magfie/field_divB0.f90'. Skipping file "/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/magfie/field_divB0.f90".
2811:  OSError: [Errno 2] No such file or directory: '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/magfie/field_eq_mod.f90'. Skipping file "/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/magfie/field_eq_mod.f90".
2812:  OSError: [Errno 2] No such file or directory: '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/spl_three_to_five.f90'. Skipping file "/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/spl_three_to_five.f90".
2813:  OSError: [Errno 2] No such file or directory: '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/plag_coeff.f90'. Skipping file "/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/plag_coeff.f90".
2814:  OSError: [Errno 2] No such file or directory: '/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/binsrc.f90'. Skipping file "/home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/src/binsrc.f90".
2815:  get_useparameters: mapping for {'only': 1, 'map': {'psimax': 'psimax'}} not impl.
...

3530:  40/47 Test #54: test_orbit_refcoords_rk45_plot ..................   Passed    0.87 sec
3531:  Start 55: test_orbit_chartmap_comparison
3532:  41/47 Test #55: test_orbit_chartmap_comparison ..................   Passed    6.02 sec
3533:  Start 56: test_chartmap_refcoords_config
3534:  42/47 Test #56: test_chartmap_refcoords_config ..................   Passed    0.38 sec
3535:  Start 59: test_orbit_chartmap_comparison_plot
3536:  43/47 Test #59: test_orbit_chartmap_comparison_plot .............   Passed    0.78 sec
3537:  Start 60: test_orbit_chartmap_comparison_map2disc
3538:  44/47 Test #60: test_orbit_chartmap_comparison_map2disc .........   Passed    6.00 sec
3539:  Start 61: test_orbit_chartmap_comparison_plot_map2disc
3540:  45/47 Test #61: test_orbit_chartmap_comparison_plot_map2disc ....   Passed    0.80 sec
3541:  Start 62: test_chartmap_refcoords_config_map2disc
3542:  46/47 Test #62: test_chartmap_refcoords_config_map2disc .........   Passed    0.37 sec
3543:  Start 73: test_engineering
3544:  47/47 Test #73: test_engineering ................................   Passed    1.31 sec
3545:  100% tests passed, 0 tests failed out of 47
3546:  Label Time Summary:
...

3578:  Successfully uninstalled pysimple-1.2.0
3579:  Successfully installed pysimple-1.2.0
3580:  ##[group]Run make test-slow
3581:  �[36;1mmake test-slow�[0m
3582:  shell: /usr/bin/bash -e {0}
3583:  env:
3584:  LIBNEO_BRANCH: feature/port-coil-clearance
3585:  ##[endgroup]
3586:  cmake --build build --config Release
3587:  [1/1] cd /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/libneo-src/extra/MyMPILib && /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/_deps/libneo-src/extra/MyMPILib/Scripts/do_versioning.sh
3588:  Versioning MyMPILib...
3589:  cd build && ctest --test-dir test --output-on-failure   -L "slow" -LE "regression"
3590:  Internal ctest changing into directory: /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/test
3591:  Test project /home/github-runner/actions-runner-2/_work/SIMPLE/SIMPLE/build/test
3592:  Start  1: generate_chartmap_map2disc
3593:  1/15 Test  #1: generate_chartmap_map2disc ................***Failed    0.32 sec
3594:  Traceback (most recent call last):
...

3613:  from . import core, zernike, types, utils
3614:  File "/home/github-runner/.local/lib/python3.13/site-packages/map2disc/core.py", line 14, in <module>
3615:  from pybie2d.boundaries.global_smooth_boundary.global_smooth_boundary import (
3616:  Global_Smooth_Boundary as GSB,
3617:  )
3618:  File "/home/github-runner/.local/lib/python3.13/site-packages/pybie2d/__init__.py", line 8, in <module>
3619:  from . import misc
3620:  File "/home/github-runner/.local/lib/python3.13/site-packages/pybie2d/misc/__init__.py", line 3, in <module>
3621:  from . import basic_functions
3622:  File "/home/github-runner/.local/lib/python3.13/site-packages/pybie2d/misc/basic_functions.py", line 5, in <module>
3623:  import numba
3624:  File "/home/github-runner/.local/lib/python3.13/site-packages/numba/__init__.py", line 59, in <module>
3625:  _ensure_critical_deps()
3626:  ~~~~~~~~~~~~~~~~~~~~~^^
3627:  File "/home/github-runner/.local/lib/python3.13/site-packages/numba/__init__.py", line 45, in _ensure_critical_deps
3628:  raise ImportError(msg)
3629:  ImportError: Numba needs NumPy 2.3 or less. Got NumPy 2.4.
3630:  Start 45: test_coord_transform_roundtrip
3631:  2/15 Test #45: test_coord_transform_roundtrip ............   Passed    1.28 sec
3632:  Start 46: test_scaling_abstraction
3633:  3/15 Test #46: test_scaling_abstraction ..................   Passed    0.97 sec
3634:  Start 57: test_chartmap_wall_losses
3635:  4/15 Test #57: test_chartmap_wall_losses .................   Passed   26.65 sec
3636:  Start 58: test_chartmap_wall_losses_plot
3637:  5/15 Test #58: test_chartmap_wall_losses_plot ............   Passed    0.86 sec
3638:  Start 63: test_chartmap_wall_losses_map2disc
3639:  Failed test dependencies: generate_chartmap_map2disc
3640:  6/15 Test #63: test_chartmap_wall_losses_map2disc ........***Not Run   0.00 sec
3641:  Start 64: test_chartmap_wall_losses_plot_map2disc
3642:  7/15 Test #64: test_chartmap_wall_losses_plot_map2disc ...***Failed    0.20 sec
3643:  Error: chartmap_wall_losses_map2disc.nc not found
3644:  Run test_chartmap_wall_losses first
...

3646:  8/15 Test #65: test_simple_api ...........................   Passed   74.58 sec
3647:  Start 66: test_batch_api
3648:  9/15 Test #66: test_batch_api ............................   Passed   14.06 sec
3649:  Start 67: test_classification_api
3650:  10/15 Test #67: test_classification_api ...................   Passed    7.22 sec
3651:  Start 68: test_orbit_macro
3652:  11/15 Test #68: test_orbit_macro ..........................   Passed    8.03 sec
3653:  Start 69: test_examples
3654:  12/15 Test #69: test_examples .............................   Passed   15.08 sec
3655:  Start 70: test_batch_api_performance
3656:  13/15 Test #70: test_batch_api_performance ................   Passed    0.16 sec
3657:  Start 71: test_batch_api_scalability
3658:  14/15 Test #71: test_batch_api_scalability ................   Passed    0.15 sec
3659:  Start 72: test_netcdf_results
3660:  15/15 Test #72: test_netcdf_results .......................   Passed   37.99 sec
3661:  80% tests passed, 3 tests failed out of 15
3662:  Label Time Summary:
3663:  Errors while running CTest
3664:  batch_api         =  14.37 sec*proc (3 tests)
3665:  classification    =   7.22 sec*proc (1 test)
3666:  examples          =  15.08 sec*proc (1 test)
3667:  integration       =  30.27 sec*proc (7 tests)
3668:  netcdf            =  37.99 sec*proc (1 test)
3669:  orbit             =   8.03 sec*proc (1 test)
3670:  performance       =   0.16 sec*proc (1 test)
3671:  plot              =   1.06 sec*proc (2 tests)
3672:  python            = 158.65 sec*proc (12 tests)
3673:  scalability       =   0.15 sec*proc (1 test)
3674:  simple_api        =  74.58 sec*proc (1 test)
3675:  slow              = 187.22 sec*proc (14 tests)
3676:  Total Test time (real) = 187.56 sec
3677:  The following tests FAILED:
3678:  1 - generate_chartmap_map2disc (Failed)               integration python
3679:  63 - test_chartmap_wall_losses_map2disc (Not Run)      integration python slow
3680:  64 - test_chartmap_wall_losses_plot_map2disc (Failed)  integration plot python slow
3681:  make: *** [Makefile:51: test-slow] Error 8
3682:  ##[error]Process completed with exit code 2.
3683:  ##[group]Run actions/upload-artifact@v4
3684:  with:
3685:  name: test-results
3686:  path: build/Testing/
3687:  
3688:  if-no-files-found: warn
3689:  compression-level: 6
3690:  overwrite: false
3691:  include-hidden-files: false
3692:  env:
3693:  LIBNEO_BRANCH: feature/port-coil-clearance
3694:  ##[endgroup]
3695:  ##[warning]No files were found with the provided path: build/Testing/. No artifacts will be uploaded.
3696:  Post job cleanup.
3697:  Unexpected error attempting to determine if executable file exists '/home/ert/.npm-global/bin/git': Error: EACCES: permission denied, stat '/home/ert/.npm-global/bin/git'
3698:  Unexpected error attempting to determine if executable file exists '/home/ert/code/.venv/bin/git': Error: EACCES: permission denied, stat '/home/ert/code/.venv/bin/git'
3699:  Unexpected error attempting to determine if executable file exists '/home/ert/code/scripts/git': Error: EACCES: permission denied, stat '/home/ert/code/scripts/git'
3700:  [command]/usr/bin/git version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants