ToFuProject / tofu

Project for an open-source python library for synthetic diagnostics and tomography for Fusion devices
https://tofuproject.github.io/tofu/index.html
MIT License
72 stars 11 forks source link

`long` vs `long long` #960

Closed dvezinet closed 2 months ago

dvezinet commented 2 months ago

Overview:

New error showing up in unit tests since recently, presumably due to new version of numpy or cython.

The problem is specific to:

3.8, 3.9, 3.10 3.11, 3.12
image image
windows 3.10 fails due to dtype=int vs long long same error for windows 3.11
others fail for other py3.12-specific reasons, see #962
not sure why MacOS 3.11 refuses to rerun

General clarification about numpy vs python int types, and differences between linux and windows interpretations (read all posts): https://stackoverflow.com/questions/21851985/difference-between-np-int-np-int-int-and-np-int-t-in-cython

Details:

Test environment:

Failed run Last successful run
Runner Runner version: 2.319.1 identical
OS Microsoft Windows Server 2022 10.0.20348 Datacenter identical
Python CPython (3.10.11) identical
numpy numpy-2.1.1-cp310-cp310-win_amd64.whl numpy-2.0.1-cp310-cp310-win_amd64.whl
Cython Cython-3.0.11-cp310-cp310-win_amd64.whl Cython-3.0.10-cp310-cp310-win_amd64.whl

Exception raised:

image image

Code parts involved:

Cython module (routine definition): geom/_GG.pyx image

Python module (run-time call): geom/_core.py image

Temporary solution: