Closed ankourtis closed 2 years ago
I have seen this issue in the past, and have had trouble replicating it on different machines. What versions of Numpy / f2py and GCC / gfortran are you using?
Thank you for your prompt response, please see below the versions that I am using:
Would you mind trying to move back to an earlier version of Numpy, such as 1.19, and cleaning the build with make clean
and then rebuilding it?
I've tried it but still the libspline.so cannot be imported.
make[1]: Entering directory '/home/user/Documents/pyspline'
mkdir -p obj
ln -sf config/config.mk config.mk
making module in src/
make[2]: Entering directory '/home/user/Documents/pyspline/src'
make precision.o adtProjections.o
make[3]: Entering directory '/home/user/Documents/pyspline/src'
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c precision.f90 -o ..//obj/precision.o
--- Compiled precision.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c adtProjections.F90 -o ..//obj/adtProjections.o
--- Compiled adtProjections.F90 successfully ---
make[3]: Leaving directory '/home/user/Documents/pyspline/src'
cp -f *.mod ../mod
make evaluations.o basis.o knots.o insertKnot.o getBasisPt.o parameterizations.o findSpan.o compute_curve.o compute_surface.o compute_volume.o eval_curve.o eval_surface.o eval_volume.o projections.o tfi2d.o
make[3]: Entering directory '/home/anast/Documents/pyspline/src'
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c evaluations.f90 -o ..//obj/evaluations.o
--- Compiled evaluations.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c basis.f90 -o ..//obj/basis.o
--- Compiled basis.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c knots.f90 -o ..//obj/knots.o
--- Compiled knots.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c insertKnot.f90 -o ..//obj/insertKnot.o
--- Compiled insertKnot.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c getBasisPt.f90 -o ..//obj/getBasisPt.o
--- Compiled getBasisPt.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c parameterizations.f90 -o ..//obj/parameterizations.o
parameterizations.f90:37:64:
37 | (X(3, K, J, I) - X(3, K, J, I - 1))**2)
| 1
Warning: Obsolescent feature: Statement function at (1)
parameterizations.f90:41:64:
41 | (X(3, K, J, I) - X(3, K, J - 1, I))**2)
| 1
Warning: Obsolescent feature: Statement function at (1)
parameterizations.f90:45:64:
45 | (X(3, K, J, I) - X(3, K - 1, J, I))**2)
| 1
Warning: Obsolescent feature: Statement function at (1)
--- Compiled parameterizations.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c findSpan.f90 -o ..//obj/findSpan.o
--- Compiled findSpan.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c compute_curve.f90 -o ..//obj/compute_curve.o
--- Compiled compute_curve.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c compute_surface.f90 -o ..//obj/compute_surface.o
--- Compiled compute_surface.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c compute_volume.f90 -o ..//obj/compute_volume.o
--- Compiled compute_volume.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c eval_curve.f90 -o ..//obj/eval_curve.o
--- Compiled eval_curve.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c eval_surface.f90 -o ..//obj/eval_surface.o
--- Compiled eval_surface.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c eval_volume.f90 -o ..//obj/eval_volume.o
--- Compiled eval_volume.f90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c projections.F90 -o ..//obj/projections.o
--- Compiled projections.F90 successfully ---
gfortran -I..//mod -fdefault-real-8 -O2 -fPIC -std=f2008 -c tfi2d.f90 -o ..//obj/tfi2d.o
--- Compiled tfi2d.f90 successfully ---
make[3]: Leaving directory '/home/user/Documents/pyspline/src'
make[2]: Leaving directory '/home/user/Documents/pyspline/src'
(cd lib && make)
make[2]: Entering directory '/home/user/Documents/pyspline/lib'
creating library ...
ar -rvs libspline.a ../obj/*.o
ar: creating libspline.a
a - ../obj/adtProjections.o
a - ../obj/basis.o
a - ../obj/compute_curve.o
a - ../obj/compute_surface.o
a - ../obj/compute_volume.o
a - ../obj/eval_curve.o
a - ../obj/eval_surface.o
a - ../obj/eval_volume.o
a - ../obj/evaluations.o
a - ../obj/findSpan.o
a - ../obj/getBasisPt.o
a - ../obj/insertKnot.o
a - ../obj/knots.o
a - ../obj/parameterizations.o
a - ../obj/precision.o
a - ../obj/projections.o
a - ../obj/tfi2d.o
library libspline.a created.
make[2]: Leaving directory '/home/user/Documents/pyspline/lib'
(cd src/f2py && make)
make[2]: Entering directory '/home/user/Documents/pyspline/src/f2py'
#------------------------------------------------------#
Python Inclue Flags -I/usr/include/python3.8 -I/usr/include/python3.8
#------------------------------------------------------#
#------------------------------------------------------#
Numpy Include Directory: /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include
#------------------------------------------------------#
#------------------------------------------------------#
f2py root directory: /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py
#------------------------------------------------------#
cp f2py_f2cmap.ref .f2py_f2cmap
f2py pyspline.pyf
Reading f2cmap from '.f2py_f2cmap' ...
Mapping "real(kind=realtype)" to "double"
Successfully applied user defined f2cmap changes
Reading fortran codes...
Reading file 'pyspline.pyf' (format:free)
Post-processing...
Block: libspline
Block: knots_interp
Block: knots_lms
Block: insertknot
Block: curve_jacobian_wrap
Block: constr_jac
Block: poly_length
Block: curve_para_corr
Block: surface_jacobian_wrap
Block: para3d
Block: tfi2d
Block: volume_jacobian_wrap
Block: eval_curve
Block: eval_curve_deriv
Block: eval_curve_deriv2
Block: eval_curve_c
Block: eval_curve_deriv_c
Block: eval_curve_deriv2_c
Block: eval_surface
Block: eval_surface_deriv
Block: eval_surface_deriv2
Block: eval_volume
Block: eval_volume_deriv
Block: eval_volume_deriv2
Block: point_curve
Block: point_surface
Block: point_volume
Block: curve_curve
Block: curve_surface
Block: point_curve_start
Block: point_surface_start
Block: point_volume_start
Block: curve_curve_start
Block: curve_surface_start
Block: line_plane
Block: plane_line
Block: point_plane
Block: getbasisptsurface
Block: getbasisptvolume
Block: basis
Block: derivbasis
Block: findspan
Block: adtprojections
Block: searchquads
Post-processing (stage 2)...
Block: libspline
Block: unknown_interface
Block: knots_interp
Block: knots_lms
Block: insertknot
Block: curve_jacobian_wrap
Block: constr_jac
Block: poly_length
Block: curve_para_corr
Block: surface_jacobian_wrap
Block: para3d
Block: tfi2d
Block: volume_jacobian_wrap
Block: eval_curve
Block: eval_curve_deriv
Block: eval_curve_deriv2
Block: eval_curve_c
Block: eval_curve_deriv_c
Block: eval_curve_deriv2_c
Block: eval_surface
Block: eval_surface_deriv
Block: eval_surface_deriv2
Block: eval_volume
Block: eval_volume_deriv
Block: eval_volume_deriv2
Block: point_curve
Block: point_surface
Block: point_volume
Block: curve_curve
Block: curve_surface
Block: point_curve_start
Block: point_surface_start
Block: point_volume_start
Block: curve_curve_start
Block: curve_surface_start
Block: line_plane
Block: plane_line
Block: point_plane
Block: getbasisptsurface
Block: getbasisptvolume
Block: basis
Block: derivbasis
Block: findspan
Block: adtprojections
Block: searchquads
Building modules...
Building module "libspline"...
Constructing wrapper function "knots_interp"...
t = knots_interp(x,deriv_ptr,k,[n,nd])
Constructing wrapper function "knots_lms"...
t = knots_lms(x,nctl,k,[n])
Constructing wrapper function "insertknot"...
r,t_new,coef_new,ileft = insertknot(u,r,t,k,coef,[nctl,ndim])
Constructing wrapper function "curve_jacobian_wrap"...
vals,row_ptr,col_ind = curve_jacobian_wrap(s,sd,t,k,nctl,vals,row_ptr,col_ind,[n,nd])
Constructing wrapper function "constr_jac"...
j_val,j_col_ind,j_row_ptr = constr_jac(a_val,a_row_ptr,a_col_ind,b_val,b_row_ptr,b_col_ind,c_val,c_row_ptr,c_col_ind,an,[am,cm,annz,bnnz,cnnz])
Constructing wrapper function "poly_length"...
length = poly_length(x,[n,ndim])
Constructing wrapper function "curve_para_corr"...
curve_para_corr(t,k,s,coef,length,x,[nctl,ndim,n])
Constructing wrapper function "surface_jacobian_wrap"...
vals,row_ptr,col_ind = surface_jacobian_wrap(u,v,tu,tv,ku,kv,nctlu,nctlv,[nu,nv])
Constructing wrapper function "para3d"...
s,u,v,w = para3d(x,[n,m,l,ndim])
Constructing wrapper function "tfi2d"...
x = tfi2d(e0,e1,e2,e3,[nu,nv])
Constructing wrapper function "volume_jacobian_wrap"...
vals,row_ptr,col_ind = volume_jacobian_wrap(u,v,w,tu,tv,tw,ku,kv,kw,nctlu,nctlv,nctlw,[nu,nv,nw])
Constructing wrapper function "eval_curve"...
val = eval_curve(s,t,k,coef,[nctl,ndim,n])
Constructing wrapper function "eval_curve_deriv"...
val = eval_curve_deriv(s,t,k,coef,[nctl,ndim])
Constructing wrapper function "eval_curve_deriv2"...
val = eval_curve_deriv2(s,t,k,coef,[nctl,ndim])
Constructing wrapper function "eval_curve_c"...
val = eval_curve_c(s,t,k,coef,[nctl,ndim,n])
Constructing wrapper function "eval_curve_deriv_c"...
val = eval_curve_deriv_c(s,t,k,coef,[nctl,ndim])
Constructing wrapper function "eval_curve_deriv2_c"...
val = eval_curve_deriv2_c(s,t,k,coef,[nctl,ndim])
Constructing wrapper function "eval_surface"...
val = eval_surface(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim,n,m])
Constructing wrapper function "eval_surface_deriv"...
val = eval_surface_deriv(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim])
Constructing wrapper function "eval_surface_deriv2"...
val = eval_surface_deriv2(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim])
Constructing wrapper function "eval_volume"...
val = eval_volume(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim,n,m,l])
Constructing wrapper function "eval_volume_deriv"...
val = eval_volume_deriv(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim])
Constructing wrapper function "eval_volume_deriv2"...
val = eval_volume_deriv2(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim])
Constructing wrapper function "point_curve"...
s,diff = point_curve(x0,t,k,coef,niter,eps,s,[nctl,ndim])
Constructing wrapper function "point_surface"...
u,v,diff = point_surface(x0,tu,tv,ku,kv,coef,niter,eps,u,v,[nctlu,nctlv,ndim])
Constructing wrapper function "point_volume"...
u,v,w,diff = point_volume(x0,tu,tv,tw,ku,kv,kw,coef,niter,eps,u,v,w,[nctlu,nctlv,nctlw,ndim])
Constructing wrapper function "curve_curve"...
s,t,diff = curve_curve(t1,k1,coef1,t2,k2,coef2,niter,eps,s,t,[n1,n2,ndim])
Constructing wrapper function "curve_surface"...
u,v,s,diff = curve_surface(tc,kc,coefc,tu,tv,ku,kv,coefs,niter,eps,u,v,s,[nctlc,nctlu,nctlv,ndim])
Constructing wrapper function "point_curve_start"...
u = point_curve_start(x0,uu,data,[nu,ndim,n])
Constructing wrapper function "point_surface_start"...
u,v = point_surface_start(x0,uu,vv,data,[nu,nv,ndim,n])
Constructing wrapper function "point_volume_start"...
u,v,w = point_volume_start(x0,uu,vv,ww,data,[nu,nv,nw,ndim,n])
Constructing wrapper function "curve_curve_start"...
s1,s2 = curve_curve_start(data1,uu1,data2,uu2,[nu1,nu2,ndim])
Constructing wrapper function "curve_surface_start"...
s,u,v = curve_surface_start(data1,uu1,data2,uu2,vv2,[nu1,nu2,nv2,ndim])
Constructing wrapper function "line_plane"...
sol,pid,n_sol = line_plane(ia,vc,p0,v1,v2,[n])
Constructing wrapper function "plane_line"...
sol,n_sol = plane_line(ia,vc,p0,v1,v2,[n])
Constructing wrapper function "point_plane"...
sol,n_sol,best_sol = point_plane(pt,p0,v1,v2,[n])
Constructing wrapper function "getbasisptsurface"...
vals,col_ind = getbasisptsurface(u,v,tu,tv,ku,kv,vals,col_ind,istart,l_index,[nctlu,nctlv,nnz])
Constructing wrapper function "getbasisptvolume"...
vals,col_ind = getbasisptvolume(u,v,w,tu,tv,tw,ku,kv,kw,vals,col_ind,istart,l_index,[nctlu,nctlv,nctlw,nnz])
Constructing wrapper function "basis"...
b = basis(t,nctl,k,u,ind)
Constructing wrapper function "derivbasis"...
bd = derivbasis(t,nctl,ku,u,ind,n)
Constructing wrapper function "findspan"...
ind = findspan(u,k,t,nctl)
Constructing F90 module support for "adtprojections"...
Constructing wrapper function "adtprojections.searchquads"...
faceid,uv = searchquads(pts,conn,searchpts,[npts,nconn,nsearchpts])
Wrote C/API module "libspline" to file "./libsplinemodule.c"
Fortran 90 wrappers are saved to "./libspline-f2pywrappers2.f90"
gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/anast/Documents/Thesis_Python/lib/python3.8/site-packages/numpy/core/include \
-I/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src -c libsplinemodule.c
In file included from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /usr/include/python3.8/fortranobject.h:13,
from libsplinemodule.c:16:
/home/user/Documents/T_Python/lib/python3.8/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 " \
| ^~~~~~~
libsplinemodule.c: In function ‘f2py_rout_libspline_knots_interp’:
libsplinemodule.c:325:5: warning: implicit declaration of function ‘npy_PyErr_ChainExceptionsCause’ [-Wimplicit-function-declaration]
325 | npy_PyErr_ChainExceptionsCause(exc, val, tb);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsplinemodule.c: In function ‘PyInit_libspline’:
libsplinemodule.c:9681:3: warning: implicit declaration of function ‘Py_SET_TYPE’; did you mean ‘Py_TYPE’? [-Wimplicit-function-declaration]
9681 | Py_SET_TYPE(&PyFortran_Type, &PyType_Type);
| ^~~~~~~~~~~
| Py_TYPE
gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include -c \
/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c -o fortranobject.o
In file included from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13,
from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c:2:
/home/user/Documents/T_Python/lib/python3.8/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 " \
| ^~~~~~~
gfortran -I../../mod -fdefault-real-8 -O2 -fPIC -std=f2008 -I./ -c libspline-f2pywrappers2.f90
gfortran -fPIC -shared fortranobject.o libsplinemodule.o libspline-f2pywrappers2.o -fdefault-real-8 -O2 -fPIC -std=f2008 -L../../lib -lspline -o libspline.so
python importTest.py
Testing if module pyspline can be imported...
Error importing libspline.so
make[2]: *** [Makefile:37: all] Error 1
make[2]: Leaving directory '/home/user/Documents/pyspline/src/f2py'
make[1]: *** [Makefile:36: module] Error 2
make[1]: Leaving directory '/home/user/Documents/pyspline'
make: *** [Makefile:7: default] Error 2
Sorry to hear that did not work. Would you mind trying an even earlier version, such as 1.17 or 1.18? This is a hard issue for us to catch as it is due to f2py and seems to only affect very specific configurations.
If 1.17 or 1.18 do not work, would you mind trying to directly importing the .so
library and posting the error here? I imagine it has to do with "missing symbols" in the library. The object will be in the build directory and you can import it by entering interactive python3 in the terminal.
The 1.18 version of Numpy worked, however the following error occurred while trying to install the pyspline.
Processing /home/user/Documents/pyspline
Requirement already satisfied: numpy>=1.16 in /home/user/Documents/T_Python/lib/python3.8/site-packages (from pyspline==1.5.1) (1.23.2)
Requirement already satisfied: scipy>=1.2 in /home/user/Documents/T_Python/lib/python3.8/site-packages (from pyspline==1.5.1) (1.8.0)
Building wheels for collected packages: pyspline
Building wheel for pyspline (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/user/Documents/T_Python/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-0ihk1ca_/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-0ihk1ca_/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-36646fhi
cwd: /tmp/pip-req-build-0ihk1ca_/
Complete output (8 lines):
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'extra_requires'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for pyspline
Running setup.py clean for pyspline
Failed to build pyspline
Installing collected packages: pyspline
Attempting uninstall: pyspline
Found existing installation: pyspline 1.5.1
Uninstalling pyspline-1.5.1:
Successfully uninstalled pyspline-1.5.1
Running setup.py install for pyspline ... done
Successfully installed pyspline-1.5.1
Great, I am glad to hear that worked. To use wheel
, please make sure you have the package installed. You can install it with:
pip install wheel
Try installing wheel and then reinstalling pySpline with pip.
Pyspline was successfully installed. Thank you very much for the assistance and the prompt responses.
Great, glad to here it!
Description
I was trying to compile the library, but although I don't receive any error the pyspline module cannot be imported. I also checked the config files according to the method described in the building manual. Below you can see attached the make and the config file. Any help will be appreciated. ### Compilation Output ~~~ make[1]: Entering directory '/home/user/Documents/pyspline' mkdir -p obj ln -sf config/config.mk config.mk making module in src/ make[2]: Entering directory '/home/user/Documents/pyspline/src' make precision.o adtProjections.o make[3]: Entering directory '/home/user/Documents/pyspline/src' make[3]: '..//obj/precision.o' is up to date. make[3]: '..//obj/adtProjections.o' is up to date. make[3]: Leaving directory '/home/user/Documents/pyspline/src' cp -f *.mod ../mod make evaluations.o basis.o knots.o insertKnot.o getBasisPt.o parameterizations.o findSpan.o compute_curve.o compute_surface.o compute_volume.o eval_curve.o eval_surface.o eval_volume.o projections.o tfi2d.o make[3]: Entering directory '/home/user/Documents/pyspline/src' make[3]: '..//obj/evaluations.o' is up to date. make[3]: '..//obj/basis.o' is up to date. make[3]: '..//obj/knots.o' is up to date. make[3]: '..//obj/insertKnot.o' is up to date. make[3]: '..//obj/getBasisPt.o' is up to date. make[3]: '..//obj/parameterizations.o' is up to date. make[3]: '..//obj/findSpan.o' is up to date. make[3]: '..//obj/compute_curve.o' is up to date. make[3]: '..//obj/compute_surface.o' is up to date. make[3]: '..//obj/compute_volume.o' is up to date. make[3]: '..//obj/eval_curve.o' is up to date. make[3]: '..//obj/eval_surface.o' is up to date. make[3]: '..//obj/eval_volume.o' is up to date. make[3]: '..//obj/projections.o' is up to date. make[3]: '..//obj/tfi2d.o' is up to date. make[3]: Leaving directory '/home/user/Documents/pyspline/src' make[2]: Leaving directory '/home/user/Documents/pyspline/src' (cd lib && make) make[2]: Entering directory '/home/user/Documents/pyspline/lib' creating library ... ar -rvs libspline.a ../obj/*.o r - ../obj/adtProjections.o r - ../obj/basis.o r - ../obj/compute_curve.o r - ../obj/compute_surface.o r - ../obj/compute_volume.o r - ../obj/eval_curve.o r - ../obj/eval_surface.o r - ../obj/eval_volume.o r - ../obj/evaluations.o r - ../obj/findSpan.o r - ../obj/getBasisPt.o r - ../obj/insertKnot.o r - ../obj/knots.o r - ../obj/parameterizations.o r - ../obj/precision.o r - ../obj/projections.o r - ../obj/tfi2d.o library libspline.a created. make[2]: Leaving directory '/home/user/Documents/pyspline/lib' (cd src/f2py && make) make[2]: Entering directory '/home/user/Documents/pyspline/src/f2py' #------------------------------------------------------# Python Inclue Flags -I/usr/include/python3.8 -I/usr/include/python3.8 #------------------------------------------------------# #------------------------------------------------------# Numpy Include Directory: /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include #------------------------------------------------------# #------------------------------------------------------# f2py root directory: /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py #------------------------------------------------------# cp f2py_f2cmap.ref .f2py_f2cmap f2py pyspline.pyf Reading f2cmap from '.f2py_f2cmap' ... Mapping "real(kind=realtype)" to "double" Successfully applied user defined f2cmap changes Reading fortran codes... Reading file 'pyspline.pyf' (format:free) Post-processing... Block: libspline Block: knots_interp Block: knots_lms Block: insertknot Block: curve_jacobian_wrap Block: constr_jac Block: poly_length Block: curve_para_corr Block: surface_jacobian_wrap Block: para3d Block: tfi2d Block: volume_jacobian_wrap Block: eval_curve Block: eval_curve_deriv Block: eval_curve_deriv2 Block: eval_curve_c Block: eval_curve_deriv_c Block: eval_curve_deriv2_c Block: eval_surface Block: eval_surface_deriv Block: eval_surface_deriv2 Block: eval_volume Block: eval_volume_deriv Block: eval_volume_deriv2 Block: point_curve Block: point_surface Block: point_volume Block: curve_curve Block: curve_surface Block: point_curve_start Block: point_surface_start Block: point_volume_start Block: curve_curve_start Block: curve_surface_start Block: line_plane Block: plane_line Block: point_plane Block: getbasisptsurface Block: getbasisptvolume Block: basis Block: derivbasis Block: findspan Block: adtprojections Block: searchquads Post-processing (stage 2)... Block: libspline Block: unknown_interface Block: knots_interp Block: knots_lms Block: insertknot Block: curve_jacobian_wrap Block: constr_jac Block: poly_length Block: curve_para_corr Block: surface_jacobian_wrap Block: para3d Block: tfi2d Block: volume_jacobian_wrap Block: eval_curve Block: eval_curve_deriv Block: eval_curve_deriv2 Block: eval_curve_c Block: eval_curve_deriv_c Block: eval_curve_deriv2_c Block: eval_surface Block: eval_surface_deriv Block: eval_surface_deriv2 Block: eval_volume Block: eval_volume_deriv Block: eval_volume_deriv2 Block: point_curve Block: point_surface Block: point_volume Block: curve_curve Block: curve_surface Block: point_curve_start Block: point_surface_start Block: point_volume_start Block: curve_curve_start Block: curve_surface_start Block: line_plane Block: plane_line Block: point_plane Block: getbasisptsurface Block: getbasisptvolume Block: basis Block: derivbasis Block: findspan Block: adtprojections Block: searchquads Building modules... Building module "libspline"... Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "knots_interp"... t = knots_interp(x,deriv_ptr,k,[n,nd]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "knots_lms"... t = knots_lms(x,nctl,k,[n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "insertknot"... r,t_new,coef_new,ileft = insertknot(u,r,t,k,coef,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_jacobian_wrap"... vals,row_ptr,col_ind = curve_jacobian_wrap(s,sd,t,k,nctl,vals,row_ptr,col_ind,[n,nd]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "constr_jac"... j_val,j_col_ind,j_row_ptr = constr_jac(a_val,a_row_ptr,a_col_ind,b_val,b_row_ptr,b_col_ind,c_val,c_row_ptr,c_col_ind,an,[am,cm,annz,bnnz,cnnz]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "poly_length"... length = poly_length(x,[n,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_para_corr"... curve_para_corr(t,k,s,coef,length,x,[nctl,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "surface_jacobian_wrap"... vals,row_ptr,col_ind = surface_jacobian_wrap(u,v,tu,tv,ku,kv,nctlu,nctlv,[nu,nv]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "para3d"... s,u,v,w = para3d(x,[n,m,l,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "tfi2d"... x = tfi2d(e0,e1,e2,e3,[nu,nv]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "volume_jacobian_wrap"... vals,row_ptr,col_ind = volume_jacobian_wrap(u,v,w,tu,tv,tw,ku,kv,kw,nctlu,nctlv,nctlw,[nu,nv,nw]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve"... val = eval_curve(s,t,k,coef,[nctl,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve_deriv"... val = eval_curve_deriv(s,t,k,coef,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve_deriv2"... val = eval_curve_deriv2(s,t,k,coef,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve_c"... val = eval_curve_c(s,t,k,coef,[nctl,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve_deriv_c"... val = eval_curve_deriv_c(s,t,k,coef,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_curve_deriv2_c"... val = eval_curve_deriv2_c(s,t,k,coef,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_surface"... val = eval_surface(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim,n,m]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_surface_deriv"... val = eval_surface_deriv(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_surface_deriv2"... val = eval_surface_deriv2(u,v,tu,tv,ku,kv,coef,[nctlu,nctlv,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_volume"... val = eval_volume(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim,n,m,l]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_volume_deriv"... val = eval_volume_deriv(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "eval_volume_deriv2"... val = eval_volume_deriv2(u,v,w,tu,tv,tw,ku,kv,kw,coef,[nctlu,nctlv,nctlw,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_curve"... s,diff = point_curve(x0,t,k,coef,niter,eps,s,[nctl,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_surface"... u,v,diff = point_surface(x0,tu,tv,ku,kv,coef,niter,eps,u,v,[nctlu,nctlv,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_volume"... u,v,w,diff = point_volume(x0,tu,tv,tw,ku,kv,kw,coef,niter,eps,u,v,w,[nctlu,nctlv,nctlw,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_curve"... s,t,diff = curve_curve(t1,k1,coef1,t2,k2,coef2,niter,eps,s,t,[n1,n2,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_surface"... u,v,s,diff = curve_surface(tc,kc,coefc,tu,tv,ku,kv,coefs,niter,eps,u,v,s,[nctlc,nctlu,nctlv,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_curve_start"... u = point_curve_start(x0,uu,data,[nu,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_surface_start"... u,v = point_surface_start(x0,uu,vv,data,[nu,nv,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_volume_start"... u,v,w = point_volume_start(x0,uu,vv,ww,data,[nu,nv,nw,ndim,n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_curve_start"... s1,s2 = curve_curve_start(data1,uu1,data2,uu2,[nu1,nu2,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "curve_surface_start"... s,u,v = curve_surface_start(data1,uu1,data2,uu2,vv2,[nu1,nu2,nv2,ndim]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "line_plane"... sol,pid,n_sol = line_plane(ia,vc,p0,v1,v2,[n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "plane_line"... sol,n_sol = plane_line(ia,vc,p0,v1,v2,[n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "point_plane"... sol,n_sol,best_sol = point_plane(pt,p0,v1,v2,[n]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "getbasisptsurface"... vals,col_ind = getbasisptsurface(u,v,tu,tv,ku,kv,vals,col_ind,istart,l_index,[nctlu,nctlv,nnz]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "getbasisptvolume"... vals,col_ind = getbasisptvolume(u,v,w,tu,tv,tw,ku,kv,kw,vals,col_ind,istart,l_index,[nctlu,nctlv,nctlw,nnz]) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "basis"... b = basis(t,nctl,k,u,ind) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "derivbasis"... bd = derivbasis(t,nctl,ku,u,ind,n) Generating possibly empty wrappers" Maybe empty "libspline-f2pywrappers.f" Constructing wrapper function "findspan"... ind = findspan(u,k,t,nctl) Constructing F90 module support for "adtprojections"... Constructing wrapper function "adtprojections.searchquads"... faceid,uv = searchquads(pts,conn,searchpts,[npts,nconn,nsearchpts]) Wrote C/API module "libspline" to file "./libsplinemodule.c" Fortran 90 wrappers are saved to "./libspline-f2pywrappers2.f90" gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include \ -I/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src -c libsplinemodule.c In file included from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5, from /usr/include/python3.8/fortranobject.h:13, from libsplinemodule.c:23: /home/user/Documents/T_Python/lib/python3.8/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 " \ | ^~~~~~~ libsplinemodule.c: In function ‘int_from_pyobj’: libsplinemodule.c:146:14: warning: implicit declaration of function ‘Npy__PyLong_AsInt’ [-Wimplicit-function-declaration] 146 | *v = Npy__PyLong_AsInt(obj); | ^~~~~~~~~~~~~~~~~ libsplinemodule.c: In function ‘f2py_rout_libspline_knots_interp’: libsplinemodule.c:349:9: warning: implicit declaration of function ‘npy_PyErr_ChainExceptionsCause’ [-Wimplicit-function-declaration] 349 | npy_PyErr_ChainExceptionsCause(exc, val, tb); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libsplinemodule.c: In function ‘PyInit_libspline’: libsplinemodule.c:9705:5: warning: implicit declaration of function ‘Py_SET_TYPE’; did you mean ‘Py_TYPE’? [-Wimplicit-function-declaration] 9705 | Py_SET_TYPE(&PyFortran_Type, &PyType_Type); | ^~~~~~~~~~~ | Py_TYPE gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I/home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include -c \ /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c -o fortranobject.o In file included from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.h:13, from /home/user/Documents/T_Python/lib/python3.8/site-packages/numpy/f2py/src/fortranobject.c:2: /home/user/Documents/T_Python/lib/python3.8/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 " \ | ^~~~~~~ gfortran -I../../mod -fdefault-real-8 -O2 -fPIC -std=f2008 -I./ -c libspline-f2pywrappers2.f90 gfortran -fPIC -shared fortranobject.o libsplinemodule.o libspline-f2pywrappers2.o -fdefault-real-8 -O2 -fPIC -std=f2008 -L../../lib -lspline -o libspline.so python importTest.py Testing if module pyspline can be imported... Error importing libspline.so make[2]: *** [Makefile:37: all] Error 1 make[2]: Leaving directory '/home/user/Documents/pyspline/src/f2py' make[1]: *** [Makefile:36: module] Error 2 make[1]: Leaving directory '/home/user/Documents/pyspline' make: *** [Makefile:7: default] Error 2 ~~~ ### Code versions