Hi, I have attempted to run the first cfunction
example in the inline package and it has failed. I have not attempted any of the other examples yet.
Thank you.
Package: inline
Version: 0.3.14
Date: 2015-04-11
R version 3.2.0 (GNU/Linux) & R version 3.1.3-patched (Microsoft Windows)
library("inline", lib.loc="~/R/x86_64-pc-linux-gnu-library/library")
x <- as.numeric(1:10)
n <- as.integer(10)
Not run:
A simple Fortran example - n and x: assumed-size vector
code <- "
- integer i
- do 1 i=1, n(1)
- 1 x(i) = x(i)**3
- "
cubefn <- cfunction(signature(n="integer", x="numeric"), code, convention=".Fortran")
file48a67a1ab38c.f:6.1:
integer i
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:6.1:
integer i
1
Error: Unclassifiable statement at (1)
file48a67a1ab38c.f:7.1:
do 1 i=1, n(1)
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:7.1:
do 1 i=1, n(1)
1
Error: Unclassifiable statement at (1)
file48a67a1ab38c.f:8.3:
1 x(i) = x(i)**3
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:8.3:
1 x(i) = x(i)*3
1
Error: Unclassifiable statement at (1)
make: ** [file48a67a1ab38c.o] Error 1
ERROR(s) during compilation: source code errors or compiler configuration errors!
Program source:
1:
2: SUBROUTINE file48a67a1ab38c ( n, x )
3: INTEGER n()
4: DOUBLE PRECISION x()
5:
6: integer i
7: do 1 i=1, n(1)
8: 1 x(i) = x(i)**3
9:
10: RETURN
11: END
12:
Error in compileCode(f, code, language, verbose) :
Compilation ERROR, function(s)/method(s) not created! file48a67a1ab38c.f:6.1:
integer i
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:6.1:
integer i
1
Error: Unclassifiable statement at (1)
file48a67a1ab38c.f:7.1:
do 1 i=1, n(1)
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:7.1:
do 1 i=1, n(1)
1
Error: Unclassifiable statement at (1)
file48a67a1ab38c.f:8.3:
1 x(i) = x(i)**3
1
Error: Non-numeric character in statement label at (1)
file48a67a1ab38c.f:8.3:
1 x(i) = x(i)*3
1
Error: Unclassifiable statement at (1)
make: ** [file48a67a1ab38c.o] Error 1
In addition: Warning message:
running command '/usr/lib/R/bin/R CMD SHLIB file48a67a1ab38c.f 2> file48a67a1ab38c.f.err.txt' had status 1
print(cubefn)
Error in print(cubefn) :
error in evaluating the argument 'x' in selecting a method for function 'print': Error: object 'cubefn' not found