的Fortran源在一個項目中,我對我們工作的Python C模塊中使用來自Fortran語言編譯f2py一個Python C模塊中。我在使用Windows 7 32位(使用mingw32)和構建在32位Linux上的服務器上沒有任何問題。 但我最近安裝了Ubuntu 10.04 LTS 64位我的筆記本電腦,我使用的發展,當我建造它,我得到了很多的警告(即使我顯然安裝了所有的gcc/FORTRAN庫/編譯器),但它完成構建。然而,當我嘗試使用內置模塊中的應用,大部分似乎運行良好,但隨後一個錯誤崩潰:上運行f2py -c -m MODULE_NAME ./fortran/source創建從在Ubuntu 10.04 LTS
* glibc detected * /home/botondus/Envs/gasit/bin/python: free(): invalid next size (fast): 0x0000000006a44760 ***
警告.F90
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize GnuFCompiler
Could not locate executable g77
Found executable /usr/bin/f77
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize LaheyFCompiler
Could not locate executable lf95
customize PGroupFCompiler
Could not locate executable pgf90
Could not locate executable pgf77
customize AbsoftFCompiler
Could not locate executable f90
absoft: no Fortran 90 compiler found
absoft: no Fortran 90 compiler found
absoft: no Fortran 90 compiler found
absoft: no Fortran 90 compiler found
absoft: no Fortran 90 compiler found
absoft: no Fortran 90 compiler found
customize NAGFCompiler
Found executable /usr/bin/f95
customize VastFCompiler
customize GnuFCompiler
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize CompaqFCompiler
Could not locate executable fort
customize IntelItaniumFCompiler
Could not locate executable efort
Could not locate executable efc
customize IntelEM64TFCompiler
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
我試圖通過安裝gfortran multilib的包,正在運行f2py使用-m32選項(但沒有成功)建立一個32位版本:
f2py -c -m module_name ./fortran/source.f90 --f77flags="-m32" --f90flags="-m32"
什麼我可以嘗試來完成構建32位版本或建立正確的64位版本有什麼建議?
編輯:它看起來像是在子程序末尾崩潰了。 '寫'執行得很好......這很奇怪。
write(6,*)'Eh=',Eh
end subroutine calcolo_involucro
完整回溯很長,我不知道,如果是任何幫助,但在這裏它是:
*** glibc detected *** /home/botondus/Envs/gasit/bin/python: free(): invalid next size (fast): 0x0000000007884690 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7fe24f8f05b6]
/lib/libc.so.6(cfree+0x73)[0x7fe24f8f6e53]
/usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x4183c)[0x7fe24a18183c]
/home/botondus/Envs/gasit/bin/python[0x46a50d]
/usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x4fbd8)[0x7fe24a18fbd8]
/usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x5aded)[0x7fe24a19aded]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x516e)[0x4a7c5e]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x5a60)[0x4a8550]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671]
/home/botondus/Envs/gasit/bin/python[0x537620]
/home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7]
/home/botondus/Envs/gasit/bin/python[0x427dff]
/home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7]
/home/botondus/Envs/gasit/bin/python[0x477bff]
/home/botondus/Envs/gasit/bin/python[0x46f47f]
/home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4888)[0x4a7378]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671]
/home/botondus/Envs/gasit/bin/python[0x537620]
/home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7]
/home/botondus/Envs/gasit/bin/python(PyEval_CallObjectWithKeywords+0x43)[0x4a1b03]
/usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x2ee94)[0x7fe24a16ee94]
/home/botondus/Envs/gasit/bin/python(_PyObject_Str+0x61)[0x454a81]
/home/botondus/Envs/gasit/bin/python(PyObject_Str+0xa)[0x454b3a]
/home/botondus/Envs/gasit/bin/python[0x461ad3]
/home/botondus/Envs/gasit/bin/python[0x46f3b3]
/home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4888)[0x4a7378]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809]
/home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x5a60)[0x4a8550]
======= Memory map: ========
00400000-0061c000 r-xp 00000000 08:05 399145 /home/botondus/Envs/gasit/bin/python
0081b000-0081c000 r--p 0021b000 08:05 399145 /home/botondus/Envs/gasit/bin/python
0081c000-0087e000 rw-p 0021c000 08:05 399145 /home/botondus/Envs/gasit/bin/python
0087e000-0088d000 rw-p 00000000 00:00 0
01877000-07a83000 rw-p 00000000 00:00 0 [heap]
7fe240000000-7fe240021000 rw-p 00000000 00:00 0
7fe240021000-7fe244000000 ---p 00000000 00:00 0
7fe247631000-7fe2476b1000 r-xp 00000000 08:03 140646 /usr/lib/libfreetype.so.6.3.22
7fe2476b1000-7fe2478b1000 ---p 00080000 08:03 140646 /usr/lib/libfreetype.so.6.3.22
7fe2478b1000-7fe2478b6000 r--p 00080000 08:03 140646 /usr/lib/libfreetype.so.6.3.22
7fe2478b6000-7fe2478b7000 rw-p 00085000 08:03 140646 /usr/lib/libfreetype.so.6.3.22
7fe2478b7000-7fe2478bb000 r-xp 00000000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so
7fe2478bb000-7fe247aba000 ---p 00004000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so
7fe247aba000-7fe247abb000 r--p 00003000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so
7fe247abb000-7fe247abc000 rw-p 00004000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so
7fe247abc000-7fe247abf000 r-xp 00000000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so
7fe247abf000-7fe247cbf000 ---p 00003000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so
7fe247cbf000-7fe247cc0000 r--p 00003000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so
7fe247cc0000-7fe247cc1000 rw-p 00004000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so
7fe247cc1000-7fe247cc5000 r-xp 00000000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so
7fe247cc5000-7fe247ec4000 ---p 00004000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so
7fe247ec4000-7fe247ec5000 r--p 00003000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so
7fe247ec5000-7fe247ec6000 rw-p 00004000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so
7fe247ec6000-7fe24800c000 r-xp 00000000 08:03 141358 /usr/lib/libxml2.so.2.7.6
7fe24800c000-7fe24820b000 ---p 00146000 08:03 141358 /usr/lib/libxml2.so.2.7.6
7fe24820b000-7fe248213000 r--p 00145000 08:03 141358 /usr/lib/libxml2.so.2.7.6
7fe248213000-7fe248215000 rw-p 0014d000 08:03 141358 /usr/lib/libxml2.so.2.7.6
7fe248215000-7fe248216000 rw-p 00000000 00:00 0
7fe248216000-7fe248229000 r-xp 00000000 08:03 140632 /usr/lib/libexslt.so.0.8.15
7fe248229000-7fe248428000 ---p 00013000 08:03 140632 /usr/lib/libexslt.so.0.8.15
7fe248428000-7fe248429000 r--p 00012000 08:03 140632 /usr/lib/libexslt.so.0.8.15
7fe248429000-7fe24842a000 rw-p 00013000 08:03 140632 /usr/lib/libexslt.so.0.8.15
7fe24842a000-7fe248464000 r-xp 00000000 08:03 141360 /usr/lib/libxslt.so.1.1.26
7fe248464000-7fe248663000 ---p 0003a000 08:03 141360 /usr/lib/libxslt.so.1.1.26
7fe248663000-7fe248664000 r--p 00039000 08:03 141360 /usr/lib/libxslt.so.1.1.26
7fe248664000-7fe248665000 rw-p 0003a000 08:03 141360 /usr/lib/libxslt.so.1.1.26
7fe248665000-7fe24876e000 r-xp 00000000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so
7fe24876e000-7fe24896d000 ---p 00109000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so
7fe24896d000-7fe24896e000 r--p 00108000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so
7fe24896e000-7fe248999000 rw-p 00109000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so
7fe248999000-7fe2489a7000 rw-p 00000000 00:00 0
7fe2489a7000-7fe2489bd000 r-xp 00000000 08:03 132934 /lib/libgcc_s.so.1
我的猜測是構建爲64位時Fortran部件中的一個錯誤。但是沒有任何資料來源,我們只能推測。你能提供一個簡單的例子來說明問題嗎? – janneb 2010-05-04 19:40:47