connortannahill / bacoli_py

Python package for the error controlled numerical solution of 1D time-dependent PDEs
Other
3 stars 2 forks source link

ExampleSeven gives warnings about deprecated NumPY API #3

Closed cbm755 closed 5 years ago

cbm755 commented 5 years ago

I ran python3 ExampleSeven.py:

In file included from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /tmp/tmp7mii4wsi/src.linux-x86_64-3.7/fortranobject.h:13,
                 from /tmp/tmp7mii4wsi/src.linux-x86_64-3.7/fortranobject.c:2:
/usr/lib64/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
In file included from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib64/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /tmp/tmp7mii4wsi/src.linux-x86_64-3.7/fortranobject.h:13,
                 from /tmp/tmp7mii4wsi/src.linux-x86_64-3.7/problemdefmodule.c:16:
/usr/lib64/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
/tmp/tmp7mii4wsi/src.linux-x86_64-3.7/problemdefmodule.c:102:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
  102 | static int f2py_size(PyArrayObject* var, ...)
      |            ^~~~~~~~~
/tmp/tmpgdvl2pvm.f:2:20:

    2 |       subroutine f(t, x, u, ux, uxx, fval)
      |                    1
Warning: Unused dummy argument ‘t’ at (1) [-Wunused-dummy-argument]
/tmp/tmpgdvl2pvm.f:2:23:

    2 |       subroutine f(t, x, u, ux, uxx, fval)
      |                       1
Warning: Unused dummy argument ‘x’ at (1) [-Wunused-dummy-argument]
/tmp/tmpgdvl2pvm.f:15:31:

   15 |       subroutine bndxa(t, u, ux, bval)
      |                               1
Warning: Unused dummy argument ‘ux’ at (1) [-Wunused-dummy-argument]
/tmp/tmpgdvl2pvm.f:39:31:

   39 |       subroutine bndxb(t, u, ux, bval)
      |                               1
Warning: Unused dummy argument ‘ux’ at (1) [-Wunused-dummy-argument]

(It then dies with a Segmentation fault (core dumped), which I assume is Issue #2.)

connortannahill commented 5 years ago

This warning is a known problem with the f2py module.

See: https://github.com/cython/cython/issues/2498

I will look into the segfault (and issue #2).