[R] Fortran (77) in R

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Tue Apr 9 10:30:13 CEST 2002


On 9 Apr 2002, Peter Dalgaard BSA wrote:

> Date: 09 Apr 2002 10:13:30 +0200
> From: Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk>
> To: Ko-Kang Kevin Wang <kwan022 at stat.auckland.ac.nz>
> Cc: R Help <r-help at stat.math.ethz.ch>
> Subject: Re: [R] Fortran (77)  in R
> 
> Ko-Kang Kevin Wang <kwan022 at stat.auckland.ac.nz> writes:
> 
> > Hi,
> > 
> 
> It cannot find the entry point "Fibonacci" in your .so file. What is
> the name of the subroutine you are trying to call? One possible issue
> is that Fortran is not case sensitive, so it might be "fibonacci",
> whichever way you spelled it originally. "nm Fibonacci.so" could be
> enlightening.

I've doubled checked my spelling, my Fortran program looks like:
c23456789
      SUBROUTINE Fibonacci(num)
      IMPLICIT NONE
      INTEGER num, i, fib, prev1, prev2
      prev1 = 1
      prev2 = 0
      DO 10 i = 0, num
        fib = prev1 + prev2
        prev2 = prev1
        prev1 = fib
10     continue
       return
      END SUBROUTINE

The first couple of lines from "nm Fibonacci.so" looks like:
Fibonacci.so:

[Index]   Value      Size    Type  Bind  Other Shndx   Name

[16]    |     84368|       0|SECT |LOCL |0    |15     |
[2]     |       148|       0|SECT |LOCL |0    |1      |
[3]     |      1000|       0|SECT |LOCL |0    |2      |
[4]     |      2728|       0|SECT |LOCL |0    |3      |
[5]     |      3672|       0|SECT |LOCL |0    |4      |
[6]     |      3704|       0|SECT |LOCL |0    |5      |
[7]     |      9860|       0|SECT |LOCL |0    |6      |
[8]     |     10352|       0|SECT |LOCL |0    |7      |
[9]     |     10436|       0|SECT |LOCL |0    |8      |
[snip]

Cheers,

Kevin

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand

Homepage: http://www.stat.auckland.ac.nz/~kwan022

E-mail: kwan022 at stat.auckland.ac.nz

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list