Core dumped error when multypling hilbert spaces
Created by: PhilipVinc
Came across this while discussing with Jannes. This is a numba error because it core-dumps and disabling numba makes it work, but maybe we can find a workaround.
This works
NUMBA_DISABLE_JIT=1 python -c 'import netket as nk; nk.hilbert.Fock(3)*nk.hilbert.Spin(0.5, 2, total_sz=0.0)'
This crashes with no info
➜ python -c 'import netket as nk; nk.hilbert.Fock(3)*nk.hilbert.Spin(0.5, 2, total_sz=0.0)'
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized
Current thread 0x00007f2289bee740 (most recent call first):
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 591 in _find_back_edges
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 207 in _back_edges
File "/usr/lib64/python3.8/functools.py", line 967 in __get__
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 665 in _find_loops
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 219 in _loops
File "/usr/lib64/python3.8/functools.py", line 967 in __get__
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 561 in _find_post_dominators
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 227 in _post_doms
File "/usr/lib64/python3.8/functools.py", line 967 in __get__
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/controlflow.py", line 268 in backbone
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/byteflow.py", line 1505 in __init__
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/interpreter.py", line 360 in interpret
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/untyped_passes.py", line 86 in run_pass
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 269 in check
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 296 in _runPass
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_lock.py", line 35 in _acquire_compile_lock
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 341 in run
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 463 in _compile_core
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 497 in _compile_bytecode
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 429 in compile_extra
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 693 in compile_extra
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 152 in _compile_core
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 139 in _compile_cached
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 125 in compile
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 965 in compile
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 363 in get_call_template
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/types/functions.py", line 541 in get_call_type
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/experimental/jitclass/base.py", line 417 in generic
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typing/templates.py", line 351 in apply
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/types/functions.py", line 400 in get_call_type
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typing/context.py", line 248 in _resolve_user_function_type
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typing/context.py", line 196 in resolve_function_type
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typeinfer.py", line 1555 in resolve_call
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typeinfer.py", line 601 in resolve
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typeinfer.py", line 578 in __call__
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typeinfer.py", line 155 in propagate
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typeinfer.py", line 1078 in propagate
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typed_passes.py", line 83 in type_inference_stage
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/typed_passes.py", line 105 in run_pass
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 269 in check
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 296 in _runPass
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_lock.py", line 35 in _acquire_compile_lock
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler_machinery.py", line 341 in run
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 463 in _compile_core
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 497 in _compile_bytecode
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 429 in compile_extra
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/compiler.py", line 693 in compile_extra
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 152 in _compile_core
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 139 in _compile_cached
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 125 in compile
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 965 in compile
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/core/dispatcher.py", line 420 in _compile_for_args
File "/home/filippovicentini/Documents/pythonenvs/netket_env/lib64/python3.8/site-packages/numba/experimental/jitclass/boxing.py", line 59 in wrapper
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/homogeneous.py", line 162 in _get_hilbert_index
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/homogeneous.py", line 117 in n_states
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 68 in <listcomp>
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 68 in __init__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 180 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/discrete_hilbert.py", line 227 in __mul__
File "/home/filippovicentini/Dropbox/Ricerca/Codes/Python/netket/netket/hilbert/tensor_hilbert.py", line 172 in __mul__
...
zsh: IOT instruction (core dumped) python -c