pisa icon indicating copy to clipboard operation
pisa copied to clipboard

test_osc_probs_layers_kernel complex division by zero for fp32

Open jllanfranchi opened this issue 4 years ago • 0 comments

Test only runs on CPU; if done so with fp64 it succeeds; if fp32, we get

$ export PISA_TARGET=cpu ; export PISA_FTYPE=fp32 ; python ~/src/pisa/pisa/stages/osc/prob3numba/numba_osc.py                  
<< PISA_FTYPE env var is defined as: "fp32"; PISA_TARGET env var is defined as: "cpu"; PISA is running in single precision (FP32) mode; numba is running on CPU (single core) >>
Traceback (most recent call last):
  File "/home/justin/src/pisa/pisa/stages/osc/prob3numba/numba_osc.py", line 857, in <module>
    test_osc_probs_layers_kernel()
  File "/home/justin/src/pisa/pisa/stages/osc/prob3numba/numba_osc.py", line 821, in test_osc_probs_layers_kernel
    osc_probs)
  File "/home/justin/anaconda2/lib/python3.7/site-packages/numba/targets/numbers.py", line 1082, in complex_div
    raise ZeroDivisionError("complex division by zero")
ZeroDivisionError: complex division by zero

Refer to: https://github.com/IceCubeOpenSource/pisa/blob/b2688a0d94ab6ec1957c4ca96f6cfd393da4a6f7/pisa/stages/osc/prob3numba/numba_osc.py#L802-L821

jllanfranchi avatar Mar 20 '20 14:03 jllanfranchi