CEMeNT-PSAAP/MCDC

SEED_SPLIT_UQ OverflowError on PC

Closed this issue · 5 comments

I'm running into the error below on all MC/DC runs but only on my desktop PC. Everything runs fine on my Mac laptop.

Traceback (most recent call last):
  File "C:\Users\Sam\Documents\Github\MCDC\test\regression\c5g7_2d_k_eigenvalue\input.py", line 4, in <module>
    import mcdc
  File "c:\users\sam\documents\github\mcdc\mcdc\__init__.py", line 2, in <module>
    from mcdc.input_ import (
  File "c:\users\sam\documents\github\mcdc\mcdc\input_.py", line 11, in <module>
    from mcdc.card import (
  File "c:\users\sam\documents\github\mcdc\mcdc\card.py", line 3, in <module>
    from mcdc.constant import INF, GYRATION_RADIUS_ALL, PCT_NONE, PI, SHIFT
  File "c:\users\sam\documents\github\mcdc\mcdc\constant.py", line 51, in <module>
    SEED_SPLIT_UQ = nb.uint(0x5368656261)
  File "C:\Users\Sam\mambaforge\envs\mcdc_env\lib\site-packages\numba\core\types\abstract.py", line 176, in __call__
    return self.cast_python_value(args[0])
  File "C:\Users\Sam\mambaforge\envs\mcdc_env\lib\site-packages\numba\core\types\scalars.py", line 49, in cast_python_value
    return getattr(np, self.name)(value)
OverflowError: Python int too large to convert to C long

I'd bet this is an environment issue. Few questions:

  1. Is this windows or wsl or linux?
  2. can you run conda list in your current env and reply with the results

Is the error suggesting that SEED_SPLIT_UQ = nb.uint(0x5368656261) is too large?

This looks like a known standing issue on WIndows (see [1], [2]). I think the solution should be to change this line to nb.unint64 instead of nb.uint

If this is the solution @clemekay or @braxtoncuneo please comment on if this screws with the hashing at all

This looks like a known standing issue on WIndows (see [1], [2]). I think the solution should be to change this line to nb.unint64 instead of nb.uint

This suggested change fixed the bug. Submitted a PR and will close the issue.