Skip to content

GX wrapper with ExternalObjective#2150

Draft
YigitElma wants to merge 9 commits intomasterfrom
yge/gx
Draft

GX wrapper with ExternalObjective#2150
YigitElma wants to merge 9 commits intomasterfrom
yge/gx

Conversation

@YigitElma
Copy link
Copy Markdown
Collaborator

@YigitElma YigitElma commented Apr 2, 2026

An updated version of the GX wrapper with ExternalObjective similar to Terpsichore one.

Summary of the wrapper:

  • Takes in DESC equilibrium object
  • Computes field line quantities on chosen alpha
  • Writes the GX geometry input file (updates the main GX input file to point to this file)
  • Calls GX in a subprocess (user can pass custom CLI commands)
  • Reads the GX output
  • Returns the averaged heat flux

Things to consider:

Note: I used Patrick's original PR (#1001), Byoungchan's new PR (#2080) and GX's internal DESC geometry creator as reference for the implementation.

#1001 can be closed after this

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    1.33 %    |     4.191e+03      |     4.247e+03      |    55.72     |       43.27        |       39.76        |
  test_proximal_jac_w7x_with_eq_update   |   -0.66 %    |     6.534e+03      |     6.491e+03      |    -43.42    |       158.74       |       162.19       |
  test_proximal_freeb_jac                |   -0.27 %    |     1.340e+04      |     1.337e+04      |    -35.56    |       88.45        |       86.83        |
  test_proximal_freeb_jac_blocked        |   -0.66 %    |     7.743e+03      |     7.692e+03      |    -51.18    |       77.70        |       77.00        |
  test_proximal_freeb_jac_batched        |    0.14 %    |     7.673e+03      |     7.684e+03      |    10.62     |       76.69        |       78.22        |
  test_proximal_jac_ripple               |   -0.71 %    |     3.653e+03      |     3.627e+03      |    -25.92    |       63.28        |       62.77        |
  test_proximal_jac_ripple_bounce1d      |   -3.81 %    |     3.890e+03      |     3.742e+03      |   -148.40    |       77.67        |       77.04        |
  test_eq_solve                          |   -0.22 %    |     2.221e+03      |     2.216e+03      |    -4.89     |       98.68        |       97.03        |

For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.72%. Comparing base (f8c0ec0) to head (b59a15b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2150      +/-   ##
==========================================
+ Coverage   94.48%   95.72%   +1.24%     
==========================================
  Files         102      101       -1     
  Lines       28721    28351     -370     
==========================================
+ Hits        27137    27139       +2     
+ Misses       1584     1212     -372     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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