[f2py] Getting error while using f2py for large fortran code.

swayambhoo jain swayambhoo.jain at gmail.com
Mon Apr 4 20:41:47 EEST 2011


Hi All,
          I am trying to build a module for SPARSKIT (A fortran code
base for sparse matrices). It contains fortran files in multiple
directories. I am able to generate the signature file successfully but
when I am trying to compile the I am getting lots of similar error.
Below are the errors I am getting. I will really appreciate if someone
can help in this.

$ f2py -m SPARSKIT2  SPARSKIT2/BLASSM/*.f SPARSKIT2/FORMATS/*.f
SPARSKIT2/INOUT/*.F SPARSKIT2/ITSOL/*.f SPARSKIT2/MATGEN/FDIF/*.f
SPARSKIT2/MATGEN/FEM/*.f SPARSKIT2/ORDERINGS/*.f -h SPARSKIT2.pyf
<This command was successful>

I am getting lots of below error when I execute this command.

/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53085: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_stripes’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53086: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53086: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_stripes0’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53087: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53087: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_maskdeg’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53088: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53088: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_perphn’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53089: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53089: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_mapper4’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53090: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53090: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_get_domns2’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53091: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53091: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_mindom’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53092: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53092: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_add_lk’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53093: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53093: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_find_ctr’
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53094: warning:
initialization from incompatible pointer type
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c:53094: error:
expected ‘}’ before ‘f2py_rout_SPARSKIT2_rversp’
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv
-O2 -Wall -Wstrict-prototypes -fPIC
-I/tmp/tmpdRDFbe/src.linux-i686-2.6
-I/usr/lib/python2.6/dist-packages/numpy/core/include
-I/usr/include/python2.6 -c
/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.c -o
/tmp/tmpdRDFbe/tmp/tmpdRDFbe/src.linux-i686-2.6/SPARSKIT2module.o"
failed with exit status 1


Thanks in Advance
-- 
Swayambhoo jain,
Graduate Student, MSEE
Electrical and Computer Engineering Dept.
University of Minnesota, Twin Cities



More information about the f2py-users mailing list