perftest demo fails to build: forminitial_c uses the same global identifier
Issue #112
resolved
When trying to build petsc4py demos for Debian, perftest fails:
make -f makefile.f2py
make[2]: Entering directory '/home/projects/petsc/build/petsc4py/demo/perftest'
f2py --quiet --noarch --f90flags='' -DF2PY_REPORT_ON_ARRAY_COPY=1 -m App -c App.pyf App.f90
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1816,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/tmpWNHZTb/src.linux-x86_64-2.7/fortranobject.h:13,
from /tmp/tmpWNHZTb/src.linux-x86_64-2.7/fortranobject.c:2:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^~~~~~~
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1816,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/tmpWNHZTb/src.linux-x86_64-2.7/fortranobject.h:13,
from /tmp/tmpWNHZTb/src.linux-x86_64-2.7/Appmodule.c:16:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^~~~~~~
/tmp/tmpWNHZTb/src.linux-x86_64-2.7/Appmodule.c:102:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
static int f2py_size(PyArrayObject* var, ...)
^~~~~~~~~
App.f90:11:24:
subroutine formInitial_C(nx, ny, nz, h, t, x) &
1
App.f90:42:22:
subroutine forminitial(nx, ny, nz, h, t, x)
2
Error: Procedure ‘forminitial_c’ with binding label ‘formInitial’ at (1) uses the same global identifier as entity at (2)
App.f90:11:24:
subroutine formInitial_C(nx, ny, nz, h, t, x) &
1
App.f90:42:22:
subroutine forminitial(nx, ny, nz, h, t, x)
2
Error: Procedure ‘forminitial_c’ with binding label ‘formInitial’ at (1) uses the same global identifier as entity at (2)
error: Command "/usr/bin/gfortran -fPIC -O3 -funroll-loops -DF2PY_REPORT_ON_ARRAY_COPY=1 -I/tmp/tmpWNHZTb/src.linux-x86_64-2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c -c App.f90 -o /tmp/tmpWNHZTb/App.o" failed with exit status 1
make[2]: *** [makefile.f2py:13: App.so] Error 1
make[2]: Leaving directory '/home/projects/petsc/build/petsc4py/demo/perftest'
make[1]: *** [makefile:24: App.so] Error 2
make[1]: Leaving directory '/home/projects/petsc/build/petsc4py/demo/perftest'
make: *** [makefile:9: all] Error 2
Comments (5)
-
-
This is the patch efcb00a. It should apply cleanly in petsc4py 3.9.x.
-
- changed status to resolved
-
reporter It was for 3.9. I'll upgrade to 3.10 once slepc is stabilised. Thanks for the patch in the meantime.
-
Just FYI, SLEPc 3.10.0 is out. You will have to wait a little longer for slepc4py 3.10.0 to be released.
- Log in to comment
Is this a build of release 3.9.x ?
This issue is already fixed in branches maint and master, and should be in the latest release tarball 3.10.0.