Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential incompatibility with Numpy 1.26.4 #37

Open
bmlowe4 opened this issue Sep 7, 2024 · 1 comment
Open

Potential incompatibility with Numpy 1.26.4 #37

bmlowe4 opened this issue Sep 7, 2024 · 1 comment

Comments

@bmlowe4
Copy link

bmlowe4 commented Sep 7, 2024

Description

I've been getting some seg faults from the code when running with numpy 1.26.4. Behavior goes away when using numpy 1.22.4. If reproducible on your end, you could simply limit the numpy version in the setup.py.

Steps to reproduce issue

  1. pip install numpy==1.26.4
  2. cd /path/to/pysurf
  3. pip install .
  4. find yourself a nice cgns file
  5. run the python script:

    from pysurf import tsurf_tools
    from mpi4py import MPI
    nodes, sectionDict = tsurf_tools.getCGNSsections("path/to/file.cgns")

Current behavior

Seg fault, seems to be occuring on line 33 of tsurf_tools.py: arraySizes = cgnsAPI.cgnsapi.readcgns(inputFile, comm.py2f())
I put a print statement at the beginning of cgnsAPI.F90::readCGNS (line 70) in the Fortran code, but the code seg faults before getting there.
MPT ERROR: Rank 0(g:0) received signal SIGSEGV(11)

Expected behavior

No seg fault.

Code versions

  • Operating System: TOSS 4
  • Python: Python 3.9.5 and 3.12
  • MPI: HPE MPT 2.28 04/24/23 12:22:36-mraymond
  • CGNS: 4.3.0
  • PETSc: N/A
  • Compiler: ifort (IFORT) 19.1.3.304 20200925
  • This repository:
@eirikurj
Copy link
Contributor

Hi and thanks for the issue. We have had issues with some numpy versions in the past. However, I am not able to replicate this issue that you are describing using our Intel container mdolab/public:u22-intel-impi-latest. Updating numpy to 1.26.4 and importing one of the test CGNS files (e.g., ./input_files/cube.cgns) seems to work without issue. I also tested this on another system (using GCC compiler and OpenMPI, and Python 3.12) without any issues.
That being said, at the moment, we dont test nor support numpy 1.26.x, but we are in the process of updating the dependency versions we support and my quick test seems to work. For supported versions, please see our docs. The latest numpy version we support is 1.25.2, which I suggest you try. You might also want to try other patch version of numpy 1.26.

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

No branches or pull requests

2 participants