Skip to content

Conversation

@dalcinl
Copy link
Owner

@dalcinl dalcinl commented Jul 11, 2024

@dalcinl dalcinl self-assigned this Jul 11, 2024
@yguclu
Copy link

yguclu commented Aug 5, 2024

Hi @dalcinl, what is the status of this PR? It looks like it is ready for being merged into master.

@dalcinl
Copy link
Owner Author

dalcinl commented Aug 5, 2024

@yguclu I'm waiting for confirmation that things are working fine for others. Are you able to install? Any chance you could try things out with your own code and tell me whether things are OK?

@yguclu
Copy link

yguclu commented Aug 5, 2024

@yguclu I'm waiting for confirmation that things are working fine for others. Are you able to install? Any chance you could try things out with your own code and tell me whether things are OK?

Yes, I am going to try later today. I will keep you posted.

@yguclu
Copy link

yguclu commented Aug 5, 2024

I have tested this on a separate Psydac branch. I can confirm that we are able to install Igakit as part of our build pipeline. Numpy 2 is giving us some troubles, so I had to read through the error logs. As far as I can tell the unit tests which use Igakit all pass, so I would say that this PR can be merged.

@dalcinl dalcinl merged commit 8f8a649 into master Aug 6, 2024
@kvrigor
Copy link
Contributor

kvrigor commented Aug 7, 2024

Apologies for not noticing this much sooner! Anyway, I ran tox and got the tests passing on all Python versions except py3.10. I didn't dig deeper, but this problem could be due to my machine (Ubuntu22.04) or a particular bug specific to py3.10. Anyway it'd be good if somebody could replicate this failure.

$ cd /home/user/igakit
$ tox

py38: skipped because could not find python interpreter with spec(s): py38
py38: SKIP ⚠ in 0.1 seconds
py39: recreate env because requirements removed: numpy
py39: remove tox env folder /home/user/igakit/.tox/py39
.pkg: recreate env because dependencies removed: numpy<2.0.0, setuptools
.pkg: remove tox env folder /home/user/igakit/.tox/.pkg
.pkg: install_requires> python -I -m pip install meson-python numpy
.pkg: _optional_hooks> python /home/user/igakit-python3.12-env/lib/python3.12/site-packages/pyproject_api/_backend.py True mesonpy
.pkg: get_requires_for_build_sdist> python /home/user/igakit-python3.12-env/lib/python3.12/site-packages/pyproject_api/_backend.py True mesonpy
.pkg: build_sdist> python /home/user/igakit-python3.12-env/lib/python3.12/site-packages/pyproject_api/_backend.py True mesonpy
py39: install_package_deps> python -I -m pip install numpy
py39: install_package> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/8/igakit-0.1.0.tar.gz
py39: commands[0]> .tox/py39/bin/python test/runtests.py
.................................
----------------------------------------------------------------------
Ran 33 tests in 0.852s

OK
py39: commands[1]> .tox/py39/bin/python demo/plot_crv.py none
py39: commands[2]> .tox/py39/bin/python demo/plot_srf.py none
py39: commands[3]> .tox/py39/bin/python demo/plot_vol.py none
py39: commands[4]> .tox/py39/bin/python demo/pipe.py none
py39: commands[5]> .tox/py39/bin/python demo/bentpipe.py none
py39: commands[6]> .tox/py39/bin/python demo/unclamp.py none
py39: commands[7]> .tox/py39/bin/python demo/sweep.py none
py39: commands[8]> .tox/py39/bin/python demo/ruled.py none
py39: commands[9]> .tox/py39/bin/python demo/revolve.py none
py39: commands[10]> .tox/py39/bin/python demo/refine.py none
py39: OK ✔ in 19.99 seconds
py310: recreate env because requirements removed: numpy
py310: remove tox env folder /home/user/igakit/.tox/py310
py310: install_package_deps> python -I -m pip install numpy
py310: install_package> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/9/igakit-0.1.0.tar.gz
py310: commands[0]> .tox/py310/bin/python test/runtests.py
Traceback (most recent call last):
  File "/home/user/igakit/test/runtests.py", line 45, in <module>
    main()
  File "/home/user/igakit/test/runtests.py", line 38, in main
    return main_legacy()
  File "/home/user/igakit/test/runtests.py", line 22, in main_legacy
    module = __import__(testname)
  File "/home/user/igakit/test/test_bsp.py", line 3, in <module>
    from igakit.igalib import bsp
ImportError: /home/user/igakit/.tox/py310/lib/python3.10/site-packages/igakit/igalib.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyDataType_SET_ELSIZE
py310: exit 1 (0.18 seconds) /home/user/igakit> .tox/py310/bin/python test/runtests.py pid=16968
py310: FAIL ✖ in 14.29 seconds
py311: recreate env because python changed virtualenv version='20.26.1'->'20.26.3'
py311: remove tox env folder /home/user/igakit/.tox/py311
py311: install_package_deps> python -I -m pip install numpy
py311: install_package> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/10/igakit-0.1.0.tar.gz
py311: commands[0]> .tox/py311/bin/python test/runtests.py
.................................
----------------------------------------------------------------------
Ran 33 tests in 0.905s

OK
py311: commands[1]> .tox/py311/bin/python demo/plot_crv.py none
py311: commands[2]> .tox/py311/bin/python demo/plot_srf.py none
py311: commands[3]> .tox/py311/bin/python demo/plot_vol.py none
py311: commands[4]> .tox/py311/bin/python demo/pipe.py none
py311: commands[5]> .tox/py311/bin/python demo/bentpipe.py none
py311: commands[6]> .tox/py311/bin/python demo/unclamp.py none
py311: commands[7]> .tox/py311/bin/python demo/sweep.py none
py311: commands[8]> .tox/py311/bin/python demo/ruled.py none
py311: commands[9]> .tox/py311/bin/python demo/revolve.py none
py311: commands[10]> .tox/py311/bin/python demo/refine.py none
py311: OK ✔ in 19.15 seconds
py312: install_package_deps> python -I -m pip install numpy
py312: install_package> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/11/igakit-0.1.0.tar.gz
py312: commands[0]> .tox/py312/bin/python test/runtests.py
.................................
----------------------------------------------------------------------
Ran 33 tests in 1.071s

OK
py312: commands[1]> .tox/py312/bin/python demo/plot_crv.py none
py312: commands[2]> .tox/py312/bin/python demo/plot_srf.py none
py312: commands[3]> .tox/py312/bin/python demo/plot_vol.py none
py312: commands[4]> .tox/py312/bin/python demo/pipe.py none
py312: commands[5]> .tox/py312/bin/python demo/bentpipe.py none
py312: commands[6]> .tox/py312/bin/python demo/unclamp.py none
py312: commands[7]> .tox/py312/bin/python demo/sweep.py none
py312: commands[8]> .tox/py312/bin/python demo/ruled.py none
py312: commands[9]> .tox/py312/bin/python demo/revolve.py none
py312: commands[10]> .tox/py312/bin/python demo/refine.py none
.pkg: _exit> python /home/user/igakit-python3.12-env/lib/python3.12/site-packages/pyproject_api/_backend.py True mesonpy
  py38: SKIP (0.10 seconds)
  py39: OK (19.99=setup[17.97]+cmd[0.99,0.10,0.10,0.11,0.11,0.11,0.10,0.10,0.10,0.11,0.10] seconds)
  py310: FAIL code 1 (14.29=setup[14.12]+cmd[0.18] seconds)
  py311: OK (19.15=setup[17.03]+cmd[1.09,0.13,0.10,0.11,0.11,0.10,0.11,0.09,0.09,0.09,0.09] seconds)
  py312: OK (15.89=setup[13.65]+cmd[1.23,0.11,0.10,0.11,0.10,0.11,0.10,0.10,0.10,0.10,0.10] seconds)
  evaluation failed :( (69.49 seconds)

@dalcinl dalcinl deleted the meson branch August 7, 2024 07:07
@dalcinl
Copy link
Owner Author

dalcinl commented Aug 7, 2024

@kvrigor I cannot reproduce the issue. I would suggest to rm -rf .tox to start fresh. Afterwards, if the error persists, could you please send me the output of the following command? I would like to see what tox installed in the environment

$ .tox/py310/bin/pip list

@kvrigor
Copy link
Contributor

kvrigor commented Aug 7, 2024

Still failing even with fresh .tox directory. Here's a more verbose error log:

$ tox -vvvvv

py310: 27625 W install_package> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/2/igakit-0.1.0.tar.gz [tox/tox_env/api.py:426]
Processing ./.tox/.tmp/package/2/igakit-0.1.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: igakit
  Building wheel for igakit (pyproject.toml) ... done
  Created wheel for igakit: filename=igakit-0.1.0-cp310-cp310-linux_x86_64.whl size=128959 sha256=85985c7d49c5f5fcde5191b664d88cece18a9e7e9983923b2e3c4d09dcc0058e
  Stored in directory: /home/user/.cache/pip/wheels/86/3f/6a/3f6d7247228499948339eff76affa268822c28a0ece3f56ccd
Successfully built igakit
Installing collected packages: igakit
Successfully installed igakit-0.1.0
py310: 40040 I exit 0 (12.41 seconds) /home/user/igakit> python -I -m pip install --force-reinstall --no-deps /home/user/igakit/.tox/.tmp/package/2/igakit-0.1.0.tar.gz pid=43056 [tox/execute/api.py:286]
py310: 40042 W commands[0]> .tox/py310/bin/python test/runtests.py [tox/tox_env/api.py:426]
Traceback (most recent call last):
  File "/home/user/igakit/test/runtests.py", line 45, in <module>
    main()
  File "/home/user/igakit/test/runtests.py", line 38, in main
    return main_legacy()
  File "/home/user/igakit/test/runtests.py", line 22, in main_legacy
    module = __import__(testname)
  File "/home/user/igakit/test/test_bsp.py", line 3, in <module>
    from igakit.igalib import bsp
ImportError: /home/user/igakit/.tox/py310/lib/python3.10/site-packages/igakit/igalib.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyDataType_SET_ELSIZE
py310: 40198 C exit 1 (0.16 seconds) /home/user/igakit> .tox/py310/bin/python test/runtests.py pid=43238 [tox/execute/api.py:286]
py310: FAIL ✖ in 16.43 seconds

$ .tox/py310/bin/pip list
Package    Version
---------- -------
igakit     0.1.0
numpy      2.0.1
pip        24.1
setuptools 70.1.0
wheel      0.43.0

The C API changes in Numpy 2.0 might be related to this issue.

@dalcinl
Copy link
Owner Author

dalcinl commented Aug 7, 2024

@kvrigor Yes, for sure this is related to NumPy 2.0 C API changes, but I do not think the problem is in igakit. I'm wondering whether igakit is being built with NumPy headers from an older NumPy version installed in your system. Also, you are most likely using a relatively old version of tox. Perhaps you could try creating a virtual environment, install latest tox there, and try with that?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants