PrincetonUniversity / SPEC

The Stepped-Pressure Equilibrium Code, an advanced MRxMHD equilibrium solver.
https://princetonuniversity.github.io/SPEC/
GNU General Public License v3.0
24 stars 4 forks source link

Fix Nvol=1 bug in py_spec #188

Closed abaillod closed 1 year ago

abaillod commented 1 year ago

This small change fixes a bug in py_spec.SPECout.get_average_beta() for equilibria with a single volume.

abaillod commented 1 year ago

@zhucaoxiang any idea why the ci tests are failing with coilpy?

zhucaoxiang commented 1 year ago

@abaillod It seems not related to coilpy.

Successfully built coilpy
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
    status = run_func(*args)
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 389, in run
    to_install = resolver.get_installation_order(requirement_set)
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 188, in get_installation_order
    weights = get_topological_weights(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 276, in get_topological_weights
    assert len(weights) == expected_node_count
AssertionError
zhucaoxiang commented 1 year ago

It seems working after I added a line pip install --upgrade pip