[SciPy-dev] Re: build_flib.py again

Berthold Höllmann hoel at gl-group.com
Wed Oct 29 05:01:21 EST 2003


Pearu Peterson <pearu at scipy.org> writes:

> On Wed, 29 Oct 2003, [iso-8859-15] Berthold Höllmann wrote:
>
>> > The rationale is that all supported compilers should behave in 
>> > the same way, that is, lower cases and append underscore to fortran 
>> > symbols. Different compilers may behave differently in this respect and
>> > with additional switches one can "tune" a compiler as needed.
>> > Earlier compaq_visual_fortran_compiler did not follow this
>> > convention and hence the changes. Sorry that it broke some of your 
>> > codes and I hope it is not too much trouble for you to fix them.
>> 
>> But do you do with Third party delivered libraries you want to
>> wrap. We have a set of huge libraries where we can't compile of our
>> own. From time to time we need/have fortran wrapper around these
>> libraries that then need to be wrapped for python. These Fortran
>> wrapper are only needed for the Python wrapper and as such are
>> compiled as library unsing distutils. Would it be possible to provide
>> a mechanism to allow user defined settings for the "switches" to make
>> the libraries work?
>
> Could you give a more detailed example of the fortran wrapper and how do 
> you wrap it to Python? If these wrappers can be modified e.g. by inserting 
> f2py directives, then `fortranname` .pyf file command might be what you 
> need.

Now i have a binary Fortran library named 'provided'. 'provided'
provides a function 'subroutine foo()' which leads to a symol '_FOO at 0'
in the library. Now i want to write a function that makes intensive
use of 'foo', so I write a Fortran routine 'subroutine usefoo()' that
is specific to python ant I wrap it unsing f2py. Because 'usefoo' is
only usefull for my Python extension library I include it's sourcecode
in my Python Project and build it as 'fortran_libraries' using scipy
distutils. With the switches' settings as they are now this does not
work, because the linker looks for '_foo_' instead of '_FOO' or
'_FOO at 0'.

Kind regards

Berthold Höllmann
-- 
Germanischer Lloyd AG
CAE Development
Vorsetzen 35
20459 Hamburg
Phone: +49(0)40 36149-7374
Fax: +49(0)40 36149-7320
e-mail: hoel at gl-group.com
Internet: http://www.gl-group.com 
 
 
 
****************************************************  
 
Please notice: We would like to inform you that the e-mail address of Germanischer Lloyd as well as our internet address had been changed to  gl-group.com with effect from 1st March 2003. 
 
This means that the previous address shortmark at germanlloyd.org will be replaced by shortmark at gl-group.com. From now on the GL homepage can be accessed at the address 'http://www.gl-group.com'. The old addresses remain valid for a transitional period. 
 
 
**************************************************** 
 
 
 
This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail.  
 
GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc.  
 


More information about the SciPy-Dev mailing list