[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling Fortran from MCL?



Hi,
	I'm trying to call a Fortran subroutine from MCL.  I'm not very
experienced at this stuff, so, first of all, is this able to be done?
	If it is, how should I compile the Fortran source using MPW-LS Fortran? 
Can it be a simple object file or does it need to be a code resource?
	When I've tried to make it a code resource, I get strange compiler
errors.  When I try to make it a simple object file and install it in MCL
using ff-load with the Fortran libraries, I get errors such as:

;Warning: Duplicate definition for "#0002"
; While executing: CCL::FF-READOBJ
;Warning: Duplicate definition for "#0001"
; While executing: CCL::FF-READOBJ
;Warning: Duplicate definition for "#0001"
; While executing: CCL::FF-READOBJ
> Error: Offset #x-9746 too large to fit in a word
> While executing: CCL::ADD-REF
> Type Command-/ to continue, Command-. to abort.
> If continued: Truncate to fit
See the Restarts! menu item for further choices.
1>

The simple object file does work correctly when I link to it from Fortran.

Even if I can get it installed, how do I use the Argspecs to check for an
array?  I don't see this type in the choices of flags.

	Finally, will the Fortran subroutine act as a Lisp function returning
multiple values, one for each argument of the subroutine?

	The reason I'm trying to do this is so that I can use the Fortran LAPACK
linear algebra package to calculate eigenvalues and eigenvectors.

Any help that can be provided would be greatly appreciated.
--- Steve Riley ---
riley@engin.umich.edu
Graduate Student Reseach Assistant
Univ. of Mich. Trans. Res. Inst.  (UMTRI)