On Tue, Jun 23, 2009 at 10:17 PM, David Cournapeau<courn...@gmail.com> wrote:

> If possible, you should not build executables, it is not portable.
> Compiling and linking is Ok, running is not. For a tool which is aimed
> a general use, I think this is important. Knowing the exact tests
> needed by the OP would help me to give more detailed advices.

Hmmm.  Thanks for the input.

Ironically, the reason we're building the executable is for
portability of the interoperable types.  By running the genconfig
program it guarantees that we get the correct C type <-> Fortran type
correspondence set up.  This is especially desirable given that
compiler flags can change the size of some datatypes, which would be
captured correctly by the genconfig program's output -- if everything
goes as planned ;-)  We'd like to make it so that any fortran
procedure can be wrapped without having to modify the kind type
parameters of the arguments.

For clarity: is it the actual steps to run the executable that isn't
portable (spawning, etc)?  Or is the problem in compiling the object
file to an executable?  Would it be possible to compile the
executable, have it run on those systems that 'work' -- which would
hopefully be any Unix-flavor system, and have the user do it manually
otherwise?  That's suboptimal to say the least, but possibly worth it
for the benefits of complete type interoperability.

FYI, the genconfig.f95 file is completely self-contained, i.e. we just
need to do, essentially,

$ fort-compiler <type-altering-flags> genconfig.f95 -o genconfig && ./genconfig

(adapted to the platform, of course).

This would need to be run before compiling the extension module.  Is
it possible to make this portable?

Thanks again,

Kurt
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to