Skip to content

Possible numba version conflict #79

Description

@HenryRWinterbottom

The following exception is being raised when executing the PI application.

Traceback (most recent call last):
  File "/scratch/henrywinterbottom/trunk/stoa/stoa_diags/sorc/stoa_diags/tc/be2002_pi.py", line 161, in compute
    results = pi(
              ^^^
  File "/scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/numba/core/dispatcher.py", line 468, in _compile_for_args
    error_rewrite(e, 'typing')
  File "/scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/numba/core/dispatcher.py", line 409, in error_rewrite
    raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function min>) found for signature:
 
 >>> min(LiteralList((Array(float64, 1, 'C', False, aligned=True), float64)))
 
There are 8 candidate implementations:
     - Of which 4 did not match due to:
     Overload in function 'MinMaxBase.generic': File: numba/core/typing/builtins.py: Line 906.
       With argument(s): '(Poison<LiteralList((Array(float64, 1, 'C', False, aligned=True), float64))>)':
      Rejected as the implementation raised a specific error:
        TypingError: Poison type used in arguments; got Poison<LiteralList((Array(float64, 1, 'C', False, aligned=True), float64))>
  raised from /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/numba/core/types/functions.py:236
     - Of which 2 did not match due to:
     Overload of function 'min': File: <numerous>: Line N/A.
       With argument(s): '(LiteralList((Array(float64, 1, 'C', False, aligned=True), float64)))':
      No match.
     - Of which 1 did not match due to:
     Overload in function 'indval_min': File: numba/cpython/builtins.py: Line 550.
       With argument(s): '(LiteralList((Array(float64, 1, 'C', False, aligned=True), float64)))':
      Rejected as the implementation raised a specific error:
        TypingError: missing a required argument: 'indval2'
  raised from /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/numba/core/typing/templates.py:784
     - Of which 1 did not match due to:
     Overload in function 'boolval_min': File: numba/cpython/builtins.py: Line 579.
       With argument(s): '(LiteralList((Array(float64, 1, 'C', False, aligned=True), float64)))':
      Rejected as the implementation raised a specific error:
        TypingError: missing a required argument: 'val2'
  raised from /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/numba/core/typing/templates.py:784

During: resolving callee type: Function(<built-in function min>)
During: typing of call at /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/tcpyPI/pi.py (162)


File "../venv/lib/python3.11/site-packages/tcpyPI/pi.py", line 162:
def cape(TP,RP,PP,T,R,P,ascent_flag=0,ptop=50,miss_handle=1):
    <source elided>
    RH=EVP/ESP                              # Parcel's relative humidity
    RH=min([RH,1.0])                        # ensure that the relatively humidity does not exceed 1.0
    ^

During: resolving callee type: type(CPUDispatcher(<function cape at 0x743bcce47560>))
During: typing of call at /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/tcpyPI/pi.py (610)

During: resolving callee type: type(CPUDispatcher(<function cape at 0x743bcce47560>))
During: typing of call at /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/tcpyPI/pi.py (610)

During: resolving callee type: type(CPUDispatcher(<function cape at 0x743bcce47560>))
During: typing of call at /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages/tcpyPI/pi.py (610)


File "../venv/lib/python3.11/site-packages/tcpyPI/pi.py", line 610:
def pi(SSTC,MSL,P,TC,R,CKCD=0.9,ascent_flag=0,diss_flag=1,V_reduc=0.8,ptop=50,miss_handle=1):
    <source elided>
        RP=constants.EPS*R[NK]*MSL/(PP*(constants.EPS+R[NK])-R[NK]*MSL)
        result = cape(TP,RP,PP,T,R,P,ascent_flag,ptop,miss_handle)

The versions of numpy and numba related to this exception are:

(venv) (base) henrywinterbottom@lilith: pip show numpy
Name: numpy
Version: 1.24.4
Summary: Fundamental package for array computing in Python
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: 
License: BSD-3-Clause
Location: /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages
Requires: 
Required-by: astropy, Cartopy, cftime, cgen, contourpy, copernicusmarine, gsw, h5py, matplotlib, MetPy, netCDF4, numba, numcodecs, pandas, parcels, pyerfa, pyspharm, scipy, shapely, tcpyPI, windspharm, xarray, zarr

and

Name: numba
Version: 0.57.0
Summary: compiling Python code using LLVM
Home-page: https://numba.pydata.org
Author: 
Author-email: 
License: BSD
Location: /scratch/henrywinterbottom/trunk/stoa/stoa_diags/venv/lib/python3.11/site-packages
Requires: llvmlite, numpy
Required-by: tcpyPI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions