Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* interfacing FORTRAN/OCAML??
@ 1999-08-30 12:54 karine CHEVALIER-JABET
  1999-08-30 19:25 ` Xavier Leroy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: karine CHEVALIER-JABET @ 1999-08-30 12:54 UTC (permalink / raw)
  To: caml-list

Hello,

I would like to know if interfacing FORTRAN with OCAML is possible(OCAML
calling FORTRAN) ; I read it for C, but didn t see for Fortran. Does it
mean I shoud call fortran with C then C with OCAML?

I guess this is a FAQ...
Thank you

Karine Chevalier-Jabet




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: interfacing FORTRAN/OCAML??
  1999-08-30 12:54 interfacing FORTRAN/OCAML?? karine CHEVALIER-JABET
@ 1999-08-30 19:25 ` Xavier Leroy
       [not found] ` <37CA99E6.F6616950@cea.fr>
  1999-09-01 14:24 ` William Chesters
  2 siblings, 0 replies; 4+ messages in thread
From: Xavier Leroy @ 1999-08-30 19:25 UTC (permalink / raw)
  To: karine CHEVALIER-JABET, caml-list

> I would like to know if interfacing FORTRAN with OCAML is possible(OCAML
> calling FORTRAN) ; I read it for C, but didn t see for Fortran. Does it
> mean I shoud call fortran with C then C with OCAML?

Yes, that's the basic idea.  Most Fortran compilers (except perhaps
some Fortran 9x stuff) have a pretty straightforward interface with C,
so it's not as bad as it sounds.

Several of your colleagues at CEA have significant experience on
interfacing Fortran libraries with Caml code.  You can look on the
archives of the Caml mailing list
(http://caml.inria.fr/bin/msearch/caml-list) for previous discussions
on this topic.

All the best,

- Xavier Leroy




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: interfacing FORTRAN/OCAML??
       [not found] ` <37CA99E6.F6616950@cea.fr>
@ 1999-08-31  7:27   ` Patrick Goldbronn - SYSCO
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Goldbronn - SYSCO @ 1999-08-31  7:27 UTC (permalink / raw)
  To: Pierre Weis

 karine CHEVALIER-JABET wrote:
 >
 > Hello,
 >
 > I would like to know if interfacing FORTRAN with OCAML is
possible(OCAML
 > calling FORTRAN) ; I read it for C, but didn t see for Fortran. Does
it
 > mean I shoud call fortran with C then C with OCAML?
 >
 > I guess this is a FAQ...
 > Thank you
 >
 > Karine Chevalier-Jabet
 
 In fact it is quite the same : you must interfacing C and fortran (it
 compiler dependent, for the name of function). You should read the
 compiler user guide (SUN is good for interfacing C and fortran)
 
 You can go in http://caml.inria.fr/hump.html#ffi (ocaml fortran
 interface)
 
 I know INRIA works on an libraries which allow facilities to use big
 array outside the heap (if you have such trouble).
 
 For instance I have wrote a litle interface between C and fortran
array.
 If you are interested, I can send it to you.
 
 
 Bests Regards
 
 --
 #####################################
 # Patrick GOLDBRONN                 #
 # CEA - DRN/DMT/SYSCO               #
 # CE-Saclay, Bâtiment 460           #
 # 91191 GIF/YVETTE CEDEX (FRANCE)   #
 #                                   #
 # Tél : 01 69 08 40 66              #
 # Fax : 01 69 08 96 96              #
 #####################################



^ permalink raw reply	[flat|nested] 4+ messages in thread

* interfacing FORTRAN/OCAML??
  1999-08-30 12:54 interfacing FORTRAN/OCAML?? karine CHEVALIER-JABET
  1999-08-30 19:25 ` Xavier Leroy
       [not found] ` <37CA99E6.F6616950@cea.fr>
@ 1999-09-01 14:24 ` William Chesters
  2 siblings, 0 replies; 4+ messages in thread
From: William Chesters @ 1999-09-01 14:24 UTC (permalink / raw)
  To: karine CHEVALIER-JABET; +Cc: caml-list

karine CHEVALIER-JABET writes:
 > Hello,
 > 
 > I would like to know if interfacing FORTRAN with OCAML is possible(OCAML
 > calling FORTRAN)

One issue that comes up if you are running on a 32-bit RISC machine is
alignment of doubles (8-byte floats): if you link against code which
has been compiled to assume that they are all 8-byte aligned, and use
it directly on ocaml float arrays, you get bus errors because ocaml
(on 32-bit machines) only aligns to 4-byte boundaries.  I have a patch
for ocaml which makes it align doubles on 8-byte boundaries.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-09-02 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-30 12:54 interfacing FORTRAN/OCAML?? karine CHEVALIER-JABET
1999-08-30 19:25 ` Xavier Leroy
     [not found] ` <37CA99E6.F6616950@cea.fr>
1999-08-31  7:27   ` Patrick Goldbronn - SYSCO
1999-09-01 14:24 ` William Chesters

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox