comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Fortran call_external under linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Fortran call_external under linux [message #24039] Tue, 06 March 2001 02:06 Go to next message
u600067138 is currently offline  u600067138
Messages: 3
Registered: March 2001
Junior Member
Dear all,

We are currently migrating from SGI IRIX to Red Hat 6.2 Linux. We rely on
some fortran code, and would prefer to be able to use call_external instead
of spawn with all its overhead etc.

Apparently IDL does not have any example fortran code to work with the g77
compiler, and the IRIX code does not compile. It seems that the
"structure" and "record" constructs which is used to pass
strings between IDL and fortran is not recognized by g77.

Does anybody have experience with compiling fortran under Linux and linking
it to IDL (5.4) ?

Greetings, Ole BC, Danish Met. Institute




--
Sent by obc from dmi subpart from dk
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new
Re: Fortran call_external under linux [message #24112 is a reply to message #24039] Thu, 08 March 2001 07:35 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
u600067138@spawnkill.ip-mobilphone.net wrote:

> We are currently migrating from SGI IRIX to Red Hat 6.2 Linux. We rely on
> some fortran code, and would prefer to be able to use call_external
> instead of spawn with all its overhead etc.
>
> Apparently IDL does not have any example fortran code to work with the g77
> compiler, and the IRIX code does not compile. It seems that the
> "structure" and "record" constructs which is used to pass
> strings between IDL and fortran is not recognized by g77.
>
> Does anybody have experience with compiling fortran under Linux and
> linking it to IDL (5.4) ?
>

Records/structures are indeed an extension that g77 doesn't support.

I haven't actually tried it, but I believe that passing the string by
value, which passes a normal C-type string pointer and passing the length
explicitly should do the job.

g77, like most modern fortrans, adds one extra argument for each string at
the end of the argument list.

You'll need a C-stub to convert the argc, argv arguments.

James

--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Overriding unfocussable Windows.
Next Topic: astronomical coordinate conversion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:59:11 PDT 2025

Total time taken to generate the page: 0.00353 seconds