Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown instruction 'LOAD_FAST_LOAD_FAST' with SciPy #1094

Closed
guyer opened this issue Feb 12, 2025 · 5 comments · Fixed by #1095
Closed

Unknown instruction 'LOAD_FAST_LOAD_FAST' with SciPy #1094

guyer opened this issue Feb 12, 2025 · 5 comments · Fixed by #1095
Milestone

Comments

@guyer
Copy link
Member

guyer commented Feb 12, 2025

https://dev.azure.com/guyer/FiPy/_build/results?buildId=1543

SyntaxError: Unknown instruction: Instruction(opname='LOAD_FAST_LOAD_FAST', opcode=88, ...
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/myEnvironment/lib/python3.13/doctest.py", line 1395, in __run
    exec(compile(example.source, filename, "single",
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 compileflags, True), test.globs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<doctest examples.elphf.diffusion.mesh1D[15]>", line 8, in <module>
    convectionCoeff = CkSum.faceGrad \
                      ~~~~~~~~~~~~~~~~
                      * (Cj.diffusivity / (1. - CkFaceSum))
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  File "/home/vsts/work/1/s/fipy/variables/variable.py", line 1120, in __mul__
    return self._BinaryOperatorVariable(lambda a, b: a*b, other)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/variable.py", line 1083, in _BinaryOperatorVariable
    if not v.unit.isDimensionless() or len(v.shape) > 3:
           ^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/variable.py", line 226, in _getUnit
    return self._extractUnit(self.value)
                             ^^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/variable.py", line 490, in _getValue
    value = self._calcValue()
  File "/home/vsts/work/1/s/fipy/variables/faceGradVariable.py", line 48, in _calcValue
    return self._calcValueNoInline()
           ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/vsts/work/1/s/fipy/variables/faceGradVariable.py", line 130, in _calcValueNoInline
    cellGrad = self.var.grad.numericValue
               ^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/cellVariable.py", line 233, in grad
    return self.gaussGrad
           ^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/cellVariable.py", line 244, in gaussGrad
    self._gaussGrad = _GaussCellGradVariable(var = self, name = "%s_gauss_grad" % self.name)
                                                                                  ^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/operatorVariable.py", line 319, in _getName
    name = self._getRepresentation(style="name")
  File "/home/vsts/work/1/s/fipy/variables/binaryOperatorVariable.py", line 70, in _getRepresentation
    return "(" + operatorClass._getRepresentation(self, style=style, argDict=argDict, id=id, freshen=freshen) + ")"
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/fipy/variables/operatorVariable.py", line 88, in _getRepresentation
    representation = self._py3kInstructions(op=self.op, style=style, argDict=argDict, id=id, freshen=freshen)
  File "/home/vsts/work/1/s/fipy/variables/operatorVariable.py", line 291, in _py3kInstructions
    raise SyntaxError("Unknown instruction: %s" % repr(ins))
SyntaxError: Unknown instruction: Instruction(opname='LOAD_FAST_LOAD_FAST', opcode=88, arg=1, argval=('a', 'b'), argrepr='a, b', offset=2, start_offset=2, starts_line=False, line_number=1101, label=None, positions=Positions(lineno=1101, end_lineno=1101, col_offset=61, end_col_offset=62), cache_info=None)
@guyer
Copy link
Member Author

guyer commented Feb 12, 2025

Always from _getRepresentation(), usually in gaussGrad

@guyer
Copy link
Member Author

guyer commented Feb 12, 2025

Just started failing nightly job (20250212.1) on all platforms, but only with SciPy solvers.

ubuntu

  - python=3.13.1=ha99a958_105_cp313
  - scipy=1.15.1=py313h750cbce_0

macOS

  - python=3.13.1=h2334245_105_cp313
  - scipy=1.15.1=py313h1cb6e1a_0

Windows

  - python=3.13.1=h071d269_105_cp313
  - scipy=1.15.1=py313hdc736f6_0

@guyer
Copy link
Member Author

guyer commented Feb 12, 2025

Worked the night before with

Ubuntu

  - python=3.12.8=h9e4cc4f_1_cpython
  - scipy=1.15.1=py312h180e4f1_0

macOS

  - python=3.12.8=h9ccd52b_1_cpython
  - scipy=1.15.1=py312hb4e66ee_0

Windows

  - python=3.12.8=h3f84c4b_1_cpython
  - scipy=1.15.1=py312h928f2a1_0

@guyer
Copy link
Member Author

guyer commented Feb 12, 2025

On failing build,

Ubuntu

PETSc

  - python=3.12.3=hab00c5b_0_cpython

Trilinos

  - python=3.7.12=hb7a2778_100_cpython

Of course. Trilinos and PySparse both pinned to older Python versions.

macOS

PETSc

  - python=3.12.3=h1411813_0_cpython

@guyer
Copy link
Member Author

guyer commented Feb 12, 2025

So, it's Python 3.13 that's causing the problem, and it's only coincidental that it's happening for FIPY_SOLVERS=scipy, because that's the only case that conda provides Python 3.13.

@guyer guyer added the bug label Feb 12, 2025
@guyer guyer added this to the 4.0 milestone Feb 12, 2025
@guyer guyer linked a pull request Feb 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant