Skip to content

[codex] restore current core deallocation interface#30

Open
krystophny wants to merge 5 commits intomainfrom
ert/build-fix-core-interface
Open

[codex] restore current core deallocation interface#30
krystophny wants to merge 5 commits intomainfrom
ert/build-fix-core-interface

Conversation

@krystophny
Copy link
Copy Markdown
Member

Summary

Restore the core helper and teardown interfaces that GORILLA_APPLETS still expects from the shared core modules.

Root Cause

GORILLA_APPLETS currently builds against helper routines and exported interfaces that are no longer present in GORILLA main. The missing setters, deallocation routines, and public exports leave the downstream applets build broken even though the underlying core data structures are still present.

What Changed

  • reintroduced set_n2 and set_n3 in tetra_grid_settings_mod
  • added deallocation entry points for grid, physics, precomputation, find-tetra, and symmetry-flux magnetic data
  • exported the current tetra-physics teardown interface explicitly

Impact

This restores the core side of the current GORILLA <-> GORILLA_APPLETS interface so the paired applets fix can build cleanly again.

Verification

Test fails on main

$ make -C /home/ert/code/GORILLA-dev/GORILLA_APPLETS
...
/home/ert/code/GORILLA-dev/GORILLA_APPLETS/SRC/anomalous_transport/utils_anomalous_transport_mod.f90:678:38:
Error: Symbol 'set_n2' referenced at (1) not found in module 'tetra_grid_settings_mod'
/home/ert/code/GORILLA-dev/GORILLA_APPLETS/SRC/anomalous_transport/utils_anomalous_transport_mod.f90:717:59:
Error: Symbol 'deallocate_tetra_grid' referenced at (1) not found in module 'tetra_grid_mod'
/home/ert/code/GORILLA-dev/GORILLA_APPLETS/SRC/anomalous_transport/utils_anomalous_transport_mod.f90:722:50:
Error: Symbol 'deallocate_find_tetra_arrays' referenced at (1) not found in module 'find_tetra_mod'
...
ninja: build stopped: subcommand failed.
make: *** [Makefile:17: build] Error 1

Test passes after fix

$ make -C /home/ert/code/GORILLA-dev/GORILLA
...
[97/98] Linking Fortran static library SRC/libGORILLA.a
[98/98] Linking Fortran executable test_gorilla_main.x
make: Leaving directory '/home/ert/code/GORILLA-dev/GORILLA'

$ make -C /home/ert/code/GORILLA-dev/GORILLA_APPLETS
...
[161/162] Linking Fortran static library SRC/libGORILLA_APPLETS.a
[162/162] Linking Fortran executable gorilla_applets_main.x
make: Leaving directory '/home/ert/code/GORILLA-dev/GORILLA_APPLETS'

@krystophny krystophny marked this pull request as ready for review March 28, 2026 18:25
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