Re: [f2py] Helping wrapping Multi Taper Spectral Analysis Fortran code
Pearu Peterson <[email protected]> Sat, 28 Jul 2012 08:33:29 +0300
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <CAPpwKczVZMdSAbMQRjd3SvCRQU49hPoH8y7bPCnAHr=wEyOGyA@mail.gmail.com> |
--===============6849439318052521681== Content-Type: multipart/alternative; boundary=e0cb4efe33902fd95b04c5dd2b46 --e0cb4efe33902fd95b04c5dd2b46 Content-Type: text/plain; charset=ISO-8859-1 Hi, The problem is in Fortran file mtm2.f. Go to line #2599 and change the statement COMPLEX FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY) to COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY) After this change gfortran should compile the mtm2.f file and f2py will be able to build the corresponding extension module. HTH, Pearu On Sat, Jul 28, 2012 at 1:14 AM, Filipe Pires Alvarenga Fernandes < [email protected]> wrote: > Hi, I am trying to wrap the following code, > > http://db.tt/CnZ6xqY3 > > using f2py. The commands I am using are: > > f2py mtm2.f -m mtm2 -h mtm2.pyf > f2py -c mtm2.pyf mtm2.f > > However, I am facing the following error: > > error: Command "/usr/bin/gfortran -Wall -ffixed-form > -fno-second-underscore -fPIC -O3 -funroll-loops > -I/tmp/tmp_oV9I4/src.linux-x86_64-2.7 > -I/usr/lib64/python2.7/site-packages/numpy/core/include > -I/usr/include/python2.7 -c -c mtm2.f -o /tmp/tmp_oV9I4/mtm2.o" failed > with exit status 1 > > The full log with warnings is attached. Both my Fortran and python > are a little at a beginner level, so any help is welcome. > > Thanks. > > > ********************************************************** > Filipe Pires Alvarenga Fernandes, PhD Candidate > School of Marine Science and Technology > University of Massachusetts at Dartmouth > 706 Rodney French Blvd., New Bedford, MA 02744 > > Email: [email protected] > [email protected] > > http://ocefpaf.tiddlyspot.com/ > ********************************************************** > > _______________________________________________ > f2py-users mailing list > f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] > http://cens.ioc.ee/mailman/listinfo/f2py-users > > --e0cb4efe33902fd95b04c5dd2b46 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,<br><br>The problem is in Fortran file mtm2.f. Go to line #2599 and chan= ge the statement<br>=A0 <br>=A0 COMPLEX FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)<b= r><br>to<br><br>=A0 COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)<br><br>Aft= er this change gfortran should compile the mtm2.f file and f2py<br> will be able to build the corresponding extension module.<br><br>HTH,<br>Pe= aru<br><br><div class=3D"gmail_quote">On Sat, Jul 28, 2012 at 1:14 AM, Fili= pe Pires Alvarenga Fernandes <span dir=3D"ltr"><<a href=3D"mailto:ocefpa= [email protected]" target=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Hi, I am trying to wrap the following code,<= br> <br> <a href=3D"http://db.tt/CnZ6xqY3" target=3D"_blank">http://db.tt/CnZ6xqY3</= a><br> <br> using f2py. =A0The commands I am using are:<br> <br> f2py mtm2.f -m mtm2 -h mtm2.pyf<br> f2py -c mtm2.pyf mtm2.f<br> <br> However, I am facing the following error:<br> <br> error: Command "/usr/bin/gfortran -Wall -ffixed-form<br> -fno-second-underscore -fPIC -O3 -funroll-loops<br> -I/tmp/tmp_oV9I4/src.linux-x86_64-2.7<br> -I/usr/lib64/python2.7/site-packages/numpy/core/include<br> -I/usr/include/python2.7 -c -c mtm2.f -o /tmp/tmp_oV9I4/mtm2.o" failed= <br> with exit status 1<br> <br> The full log with warnings is attached. =A0Both my Fortran and python<br> are a little at a beginner level, so any help is welcome.<br> <br> Thanks.<br> <br> <br> **********************************************************<br> Filipe Pires Alvarenga Fernandes, PhD Candidate<br> School of Marine Science and Technology<br> University of Massachusetts at Dartmouth<br> 706 Rodney French Blvd., New Bedford, MA 02744<br> <br> Email: <a href=3D"mailto:[email protected]">falvarengafernande= [email protected]</a><br> =A0 =A0 =A0 =A0 =A0 <a href=3D"mailto:[email protected]">[email protected]<= /a><br> <br> <a href=3D"http://ocefpaf.tiddlyspot.com/" target=3D"_blank">http://ocefpaf= .tiddlyspot.com/</a><br> **********************************************************<br> <br>_______________________________________________<br> f2py-users mailing list<br> <a href=3D"mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]">f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]</a><br> <a href=3D"http://cens.ioc.ee/mailman/listinfo/f2py-users" target=3D"_blank= ">http://cens.ioc.ee/mailman/listinfo/f2py-users</a><br> <br></blockquote></div><br> --e0cb4efe33902fd95b04c5dd2b46-- --===============6849439318052521681== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ f2py-users mailing list f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users --===============6849439318052521681==--