0

I am using Ubuntu 14.04. I converted Fortran subroutine to a python module using f2py via numpy, and when I imported it in python2.7, I got an error message,

undefined_symbol: __svml_cos4

when I imported it in python3, I got

undefined_symbol: PyCObject_Type

While my colleague imported the same module in python on Gentoo Linux with no issue...

Here is the fortran code

subroutine   callsub(var_1,var_2,var_3,var_4)
implicit none
  INTEGER, PARAMETER :: ngr1 = selected_real_kind(p=7)
  INTEGER, PARAMETER :: ngr2 = selected_real_kind(p=15)
  INTEGER, PARAMETER :: ngi1 = selected_int_kind(r=9)
  INTEGER, PARAMETER :: ngi2 = selected_int_kind(r=1)

integer(ngi1) var_1
real(ngr2) var_2(*)
logical var_3
character(*) var_4

call sub(var_1,var_2,var_3,var_4)
end

The "sub" is a complex subroutine using "libtobeused.a"

The conversion is done with

 f2py -c path/to/callsub.f90 -m callsub -L. -ltobeused

Any help is appreciated.

hsingtzu
  • 1
  • 2

0 Answers0