comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: CALL_EXTERNAL to FORTRAN under SOLARIS

CALL_EXTERNAL to FORTRAN under SOLARIS
type: item
description: There has been some talk in this newsgroup about the use of CALL_EXTERNAL under the SOLARIS operating system. I must admit that I have had numerous difficulties with this myself. I certainly have not done exhaustive testing of the problems involved, but I have had some success using CALL_EXTERNAL to access FORTRAN subroutines. Paul Mix of Sandia National Laboratories provided most of the information I needed, but there was a great deal of trial-and-error when it came to finding the necessary libraries to link to in order to avoid errors of the type which claim that certain symbols are not found. If it is helpful, I would like to provide one IDL procedure, and two FORTRAN subroutines which can be used ON OUR SYSTEM (SUNOS 5.3 -- SOLARIS) to pass information back-and-forth between IDL and a FORTRAN subroutine. All compilation and link statements are done within the procedure using the spawn command, so I am not providing a MAKE file. Note, there are a large number of "nonsense" function calls at the end of the second subroutine. These are designed to test the robust nature of the link. *** One great lesson I have learned is that it appears to be necessary *** to exit and re-enter IDL each time you wish to test the success *** of linking different libraries. I have found that if you continue *** to work within one IDL session, you may get things to work and not *** know which combination produced the success, and therefore when you *** "come in cold" to run the procedure, you may find it does not work! ;=========================================================== ============ ; Originator: Andrew F. Loughe ; ; *** SUN SOLARIS TEST *** ; Procedure to call a FORTRAN program from within IDL. ; The first 100 primes are computed in the FORTRAN program and ; passed into an IDL vector called prime_nums. ; We pass into the subroutine the number of primes desired. ; ; NOTE: A large number of "nonsense" function calls are made ; from within the FORTRAN subroutine in order to test…
creator: afl
date: 1995-02-24T22:36:43-00:00