Skip to content

Commit

Permalink
Mention github issue and PR in comments related to spec CI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
landreman committed Jul 3, 2024
1 parent d11685b commit 7bc1e4c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/simsopt/mhd/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def __init__(self,
filename = f"{filename}.sp"
logger.info(f"Initializing a SPEC object from file: {filename}")

#If spec has run before, clear the f90wrap array caches.
# If spec has run before, clear the f90wrap array caches.
# See https://github.com/hiddenSymmetries/simsopt/pull/431
# This addresses the issue https://github.com/hiddenSymmetries/simsopt/issues/357
if spec.allglobal._arrays:
self._clear_f90wrap_array_caches()

Expand Down Expand Up @@ -722,7 +724,12 @@ def set_dofs(self, x):

def _clear_f90wrap_array_caches(self):
"""
Clear the f90wrap array caches. This is necessary when a new file is read after SPEC has run before.
Clear the f90wrap array caches. This is necessary when a new file is
read after SPEC has run before.
See https://github.com/hiddenSymmetries/simsopt/pull/431
This function is for addressing the issue https://github.com/hiddenSymmetries/simsopt/issues/357
"""
spec.allglobal._arrays = {}
spec.inputlist._arrays = {}
Expand Down

0 comments on commit 7bc1e4c

Please sign in to comment.