CRAN Package Check Results for Package inline

Last updated on 2015-11-20 00:47:31.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-gcc 0.3.14 0.82 12.26 13.08 OK
r-devel-linux-x86_64-fedora-clang 0.3.14 26.02 OK
r-devel-linux-x86_64-fedora-gcc 0.3.14 23.40 OK
r-devel-osx-x86_64-clang 0.3.14 29.27 OK
r-devel-windows-ix86+x86_64 0.3.14 5.00 30.00 35.00 OK
r-patched-linux-x86_64 0.3.14 0.82 13.24 14.06 OK
r-patched-solaris-sparc 0.3.14 169.30 OK
r-patched-solaris-x86 0.3.14 34.50 ERROR
r-release-linux-x86_64 0.3.14 0.76 14.30 15.06 OK
r-release-osx-x86_64-mavericks 0.3.14 OK
r-release-windows-ix86+x86_64 0.3.14 5.00 32.00 37.00 OK
r-oldrel-windows-ix86+x86_64 0.3.14 4.00 38.00 42.00 OK

Check Details

Version: 0.3.14
Check: examples
Result: ERROR
    Running examples in ‘inline-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: cfunction
    > ### Title: Inline C, C++, Fortran function calls from R
    > ### Aliases: cfunction setCMethod
    > ### Keywords: file
    >
    > ### ** Examples
    >
    >
    > x <- as.numeric(1:10)
    > n <- as.integer(10)
    >
    > ## Not run:
    > ##D ## A simple Fortran example - n and x: assumed-size vector
    > ##D code <- "
    > ##D integer i
    > ##D do 1 i=1, n(1)
    > ##D 1 x(i) = x(i)**3
    > ##D "
    > ##D cubefn <- cfunction(signature(n="integer", x="numeric"), code, convention=".Fortran")
    > ##D print(cubefn)
    > ##D
    > ##D cubefn(n, x)$x
    > ##D
    > ##D ## Same Fortran example - now n is one number
    > ##D code2 <- "
    > ##D integer i
    > ##D do 1 i=1, n
    > ##D 1 x(i) = x(i)**3
    > ##D "
    > ##D cubefn2 <- cfunction(signature(n="integer", x="numeric"), implicit = "none",
    > ##D dim = c("", "(*)"), code2, convention=".Fortran")
    > ##D
    > ##D cubefn2(n, x)$x
    > ##D
    > ##D ## Same in F95, now x is fixed-size vector (length = n)
    > ##D code3 <- "x = x*x*x"
    > ##D cubefn3 <- cfunction(sig = signature(n="integer", x="numeric"), implicit = "none",
    > ##D dim = c("", "(n)"), code3, language="F95")
    > ##D cubefn3(20, 1:20)
    > ##D print(cubefn3)
    > ##D
    > ##D ## Same example in C
    > ##D code4 <- "
    > ##D int i;
    > ##D for (i = 0; i < *n; i++)
    > ##D x[i] = x[i]*x[i]*x[i];
    > ##D "
    > ##D cubefn4 <- cfunction(signature(n="integer", x="numeric"), code4, language = "C", convention = ".C")
    > ##D cubefn4(20, 1:20)
    > ##D
    > ## End(Not run)
    >
    > ## use of a module in F95
    > modct <- "module modcts
    + double precision, parameter :: pi = 3.14159265358979
    + double precision, parameter :: e = 2.71828182845905
    + end"
    >
    > getconstants <- "x(1) = pi
    + x(2) = e"
    >
    > cgetcts <- cfunction(getconstants, module = "modcts", implicit = "none",
    + includes = modct, sig = c(x = "double"), dim = c("(2)"), language = "F95")
    >
    > cgetcts(x = 1:2)
    $x
    [1] 3.141593 2.718282
    
    > print(cgetcts)
    An object of class 'CFunc'
    function (x)
    .Primitive(".Fortran")(<pointer: fd5f0580>, x = as.double(x))
    <environment: 8719570>
    code:
     1: module modcts
     2: double precision, parameter :: pi = 3.14159265358979
     3: double precision, parameter :: e = 2.71828182845905
     4: end
     5: SUBROUTINE file6aea755d26fb ( x )
     6: USE modcts
     7: IMPLICIT none
     8: DOUBLE PRECISION x(2)
     9: x(1) = pi
     10: x(2) = e
     11: RETURN
     12: END
     13:
    >
    > ## Use of .C convention with C code
    > ## Defining two functions, one of which calls the other
    > sigSq <- signature(n="integer", x="numeric")
    > codeSq <- "
    + for (int i=0; i < *n; i++) {
    + x[i] = x[i]*x[i];
    + }"
    > sigQd <- signature(n="integer", x="numeric")
    > codeQd <- "
    + squarefn(n, x);
    + squarefn(n, x);
    + "
    >
    > fns <- cfunction( list(squarefn=sigSq, quadfn=sigQd),
    + list(codeSq, codeQd),
    + convention=".C")
    >
    > squarefn <- fns[["squarefn"]]
    > quadfn <- fns[["quadfn"]]
    >
    > squarefn(n, x)$x
    
     *** caught segfault ***
    address fd520760, cause 'memory not mapped'
    
    Traceback:
     1: .Primitive(".C")(<pointer: fd520760>, n = as.integer(n), x = as.double(x))
     2: squarefn(n, x)
    aborting ...
Flavor: r-patched-solaris-x86