Re: F2CL under LWW a few warnings

Marco Antoniotti <[email protected]> Wed, 11 Aug 2004 17:37:51 -0400
Newsgroups gmane.lisp.clocc.general
Message-ID <[email protected]>
On Aug 11, 2004, at 4:27 PM, Raymond Toy wrote:

>>>>>> "Marco" == Marco Antoniotti <[email protected]> writes:
>
>     Marco> I have a problem.
>
>     Marco> Trying to set :declare-common t in all the files, I see 
> that the
>     Marco> definition of the common blocks (the DEFSTRUCTS) are 
> different.
>     Marco> Not all fields are generated all the time.
>
>     Marco> If I try to selectively :declare-common t, then I get 
> errors stating
>     Marco> that this or that function is undefined.
>
>     Marco> Any suggestion?
>
>     Marco> Note that the instruction in the opkdmain.f file itself 
> state that
>     Marco> COMMON blocks should be treated specially, but mu Fortran 
> is too weak
>     Marco> to understand that comment.
>
> Yuck.  You are now going to have to examine all declarations of common
> blocks and make sure they're all consistently named and find (or
> create) the one definition that includes all variables.  Then you can
> :declare-common that particular definition and it should work for the
> rest.

I was afraid you answered like that.


>
> This is really a deficiency in f2cl that I've never bothered to fix
> because in most well-written Fortran code, common blocks are all
> declared consistently with the same variable names and length,
> although, I'm not sure that's a requirement.

I don't know either.

>
> I also see in opkdmain.f, there are two declarations for the dlss01
> common block.  I don't know if that means to concatenate them or not,
> but f2cl definitely doesn't handle that.

How are the common blocks defstruct's generated?

>  I'll have to read up on
> Fortran to see what that means.
>
> Sounds like you have a lot of fun ahead of you. :-(

Don't mention it.

>
> And all bets are off if the code does type-punning on the common
> blocks.   Give up now, if so.

I am ready to, but the alternatives are not all that fun either.
1 - rewrite a CL implementation of the integrator
2 - use f2c to generate C that I can call from the FFI
3 - Use Python (or C, or Perl, or Java)

Can we give it another round before 1, 2, or 3? :)

Cheers

Marco
--
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