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

Home » Public Forums » archive » Re: Linking IDL with FORTRAN routines under UNIX
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Linking IDL with FORTRAN routines under UNIX [message #181] Tue, 24 September 1991 12:32
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
In article <1991Sep19.222159.22206@riacs.edu>, lord@pioneer.arc.nasa.gov
(Steven D. Lord SSA) writes...

> Has anyone out there successfully called user-written FORTRAN routines from
> an IDL routine? Under UNIX? I would greatly appreciate an example (including
> the explicit compile and load commands and the IDL call).

I use IDL on a Sun workstation, and have been successful with calling FORTRAN
routines from IDL using CALL_EXTERNAL. I include an example below that
actually works on my system.

It is true that one needs to write an interface routine between the FORTRAN
routine and the IDL routine, and this is most easily written in C. However,
this routine is so simple that it really comes down to a "fill-in-the-blanks"
kind of problem. Actually, I'm not all the comfortable in C myself.

I will post the following files on this newsgroup:

Makefile UNIX makefile
INTERPOL.F FORTRAN program
INTERPOL_C.C C interface routine
INTERPOL.PRO IDL procedure

The IDL procedure refers to an environment variable called SERTS_EXTERNAL.
This is just a device I use to allow me to copy the files between the Sun
workstation and VAX/VMS without having to make any changes in the routines.

I can also compile and link this routine in VMS. I use the following command:

$ FORTRAN INTERPOL
$ LINK/SHARE=EXTERNAL.EXE INTERPOL,EXTERNAL.OPT/OPT

where EXTERNAL.OPT contains the following.

universal = INTERPOL

Bill Thompson
[Message index]
 
Read Message
Previous Topic: PVWAVE and NCAR mapping
Next Topic: Re: Linking IDL with FORTRAN routines under UNIX -- Makefile

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

Current Time: Fri Oct 10 07:06:18 PDT 2025

Total time taken to generate the page: 0.07911 seconds