Re: F2CL under LWW a few warnings
Marco Antoniotti <[email protected]> Wed, 11 Aug 2004 12:10:27 -0400
| Newsgroups | gmane.lisp.clocc.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks. Is there a place where I should have RTFMed a little more? :) Cheers marco On Aug 11, 2004, at 11:43 AM, Raymond Toy wrote: > Marco Antoniotti wrote: >> More on F2CL >> I am trying to convert the odepack-lsode library from netlib. >> The library comes in two flavors: single and double precision. >> The double precision library consists of three files. >> opkda1.f >> opkda2.f >> opkdmain.f >> The first two get converted with a few warnings, but the thirds >> generates a coercion error. >> Here is a report. >> Cheers >> Marco >> CL-USER 8 > (f2cl:f2cl "opkdmain.f" :verbose t) >> ;; "opkdmain.f" -> #P"opkdmain.lisp" >> preprocessing begins ... >> SUBROUTINE DLSODE (F, NEQ, Y, T, TOUT, ITOL, RTOL, ATOL, ITASK, >> 1 ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF) >> EXTERNAL F, JAC >> INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK, LIW, MF >> DOUBLE PRECISION Y, T, TOUT, RTOL, ATOL, RWORK >> DIMENSION NEQ(*), Y(*), RTOL(*), ATOL(*), RWORK(LRW), IWORK(LIW) >> EXTERNAL DPREPJ, DSOLSY >> DOUBLE PRECISION DUMACH, DVNORM >> INTEGER INIT, MXSTEP, MXHNIL, NHNIL, NSLAST, NYH, IOWNS, >> .... >> (call dintdy (tout \, 0 \, rwork (lyh) \, nyh \, y \, iflag)) >> Warning: Generating call to unknown function (DINTDY). Check >> generated call!(if (iflag >< 0) go to 627) >> (go to 627) >> (t = tout) >> (go to 420) >> (tcrit = rwork (1)) >> (if ((tn - tcrit) * h > 0.0) go to 624) >> (go to 624) >> (hmx = abs (tn) + abs (h)) >> (ihit = abs (tn - tcrit) <= 100.0 * uround * hmx) > > That last line is the problem. It's a known bug in f2cl that I've > never been able to fix. It parses the Fortran expression > > x .le.y*z > > as > > (x .le. y)*z > > which is obviously wrong. > > Fortunately, there's a workaround. Change it to x .le. (y*z). > > I'll look again at fixing this, but I'm not hopeful. I don't > understand that part of f2cl very well. > > Ray > -- Marco Antoniotti http://bioinformatics.nyu.edu NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285