similar to: Performance of .C and .Call functions vs. native R code

Displaying 20 results from an estimated 2000 matches similar to: "Performance of .C and .Call functions vs. native R code"

2011 Aug 29
3
How to safely using OpenMP pragma inside a .C() function?
I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's "parallel for" pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing after issuing a long error message involving memory violations. I found this post, which describes how a .Call() function can be made to avoid crashing R by raising the stack limit:
2011 Sep 20
2
Is it possible to pass a function argument from R to compiled code in C?
I have a function in R that takes another function as argument: f <- function(g, ...) { #g is expected to be a function } I want to see if there is a way to implement "f" in C and calling it from R using ".C" interface. I know that I can use function pointers for my C implementation, but I imagine it's going to be nearly impossible to pass a function from R to C. Are
2011 Jul 22
2
Best practices for writing R functions
I am developing an R package for internal use, and eventually for public release. My understanding is that there is no easy way to avoid copying function arguments in R (i.e. we don't have the concept of pointers in R), which makes me wary of freely creating chains of function calls since each function call implies data copy overhead. Is the above assessment fair? Are there any good write-ups
2012 Jul 27
2
Assigning a new name to object loaded with "load()"
I would like to load a binary file into R using load(), and then assign a new name to it, regardless of the name it was saved under. Can you please provide a code sample? Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Assigning-a-new-name-to-object-loaded-with-load-tp4638144.html Sent from the R help mailing list archive at Nabble.com.
2014 Jul 07
1
R with external BLAS fails regression test
Dear Tom, The change in the Fedora RPM from using R's internal BLAS to external BLAS means the Fedora R binary now fails one of R's regression tests, specifically: tests/reg-BLAS.R. You can run this code by hand to verify the issue. As noted in the R administration and Installation Manual, "R relies on ISO/IEC 60559 compliance of an external BLAS. This can be broken if for example
2019 Sep 12
1
Calling a LAPACK subroutine from R
Followup: I have checked my package nleqslv which uses dgemv only from Fortran, on Kubuntu 18.04 with the development version of R. No errors or problems. Berend > On 12 Sep 2019, at 08:57, Berend Hasselman <bhh at xs4all.nl> wrote: > > > I have tried what I proposed in a virtual Kubuntu 18.04 which uses gfortran 7.4. > I used the latest development version of R. >
2000 Jun 19
2
dyn.load error:
Hi, I have some S functions plus Fortran routines that I want to use in R. They work in S, but when I try to use "dyn.load" to link fortran codes in R , I get the following error. thanks, reza (I am using R-1.0.1 on windows NT, The name of fortran file (compiled Ratfor) is deldirld.o and it's in the D:\Reza\476\tv.gonsrc.R\ directory) >dyn.load("deldirld.o") Error in
2019 Sep 11
1
Fw: Calling a LAPACK subroutine from R
On 2019-09-11 22:16, Avraham Adler wrote: > Can you write a small C function that calls LAPACK call that fro your > Fortran code? Yes, an extra step but maybe less traumatic than rewriting > parts of LAPACK directly. Yes, I know how to do that, but I find it somewhat bizarre that it is impossible to call a Fortran subroutine from Fortran. And rewriting 'dgemv' was simple:
2010 Jan 18
1
A question about build R-2.10.0 on HP-UX ia64 server.
Hi R usrs, I want to build R-2.10.0 on HP-UX, but I got following error message: ld: Unsatisfied symbol "zgemm" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "zgemv" in file CHOLMOD.a[cholmod_l_super_solve.o] ld: Unsatisfied symbol "zherk" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "ztrsm" in file
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Berend, I do not think this works with gfortran 7+. I am calling the BLAS subroutine dgemv from Fortran code in my package eha, and the check (with R-devel) gives: gmlfun.f:223:1: warning: type of ?dgemv? does not match original declaration [-Wlto-type-mismatch] & score, ione) ^ /home/gobr0002/R/src/R-devel/include/R_ext/BLAS.h:107:1: note: type mismatch in parameter 12
2011 Jul 18
1
Manipulating single-precision (float) arrays in .Call functions
I am writing a wrapper function in C++ that calls a GPU kernel. My array type for the GPU kernel is float, so I would like my wrapper function to receive float arrays from R. I understand that I can use 'as.single' in R to copy a double-precision vector from R in single-precision format while using the '.C' interface, but is there any way to do something similar for
2019 Sep 12
0
Fw: Calling a LAPACK subroutine from R
Hi guys, interestingly, my problem seems to be solved by writing a FORTRAN wrapper for the Fortran code! (As long as the check doesn't get smarter...). This is the relevant part of my Fortran code: ----------------------------------------------------------- subroutine gmlfun(what, & totevent, totrs, ns, & antrs, antevents, size, & totsize,
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Sorry for cross-posting, but I realized my question might be more appropriate for r-devel... Thank you, Giovanni ________________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of Giovanni Petris <gpetris at uark.edu> Sent: Tuesday, September 10, 2019 16:44 To: r-help at r-project.org Subject: [R] Calling a LAPACK subroutine from R Hello R-helpers!
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
Further pursuing my curiosity to measure the efficiency of R/C++ interface, I conducted a simple matrix-vector multiplication test using .C and .Call functions in R. In each case, I measured the execution time in R, as well as inside the C++ function. Subtracting the two, I came up with a measure of overhead associated with each call. I assume that this overhead would be non-existent of the entire
2010 Jan 18
0
Build R-2.10.0 on HP-UX ia64 server
Hi All, I want to build R-2.10.0 on HP-UX, but I got following error message: ld: Unsatisfied symbol "zgemm" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "zgemv" in file CHOLMOD.a[cholmod_l_super_solve.o] ld: Unsatisfied symbol "zherk" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "ztrsm" in file
2019 Sep 12
0
Calling a LAPACK subroutine from R
I have tried what I proposed in a virtual Kubuntu 18.04 which uses gfortran 7.4. I used the latest development version of R. It worked just as on macOS. Berend > On 11 Sep 2019, at 22:07, G?ran Brostr?m <goran.brostrom at umu.se> wrote: > > Berend, > > I do not think this works with gfortran 7+. I am calling the BLAS subroutine dgemv from Fortran code in my package eha,
2019 Sep 11
0
Fw: Calling a LAPACK subroutine from R
Can you write a small C function that calls LAPACK call that fro your Fortran code? Yes, an extra step but maybe less traumatic than rewriting parts of LAPACK directly. Avi On Wed, Sep 11, 2019 at 4:08 PM G?ran Brostr?m <goran.brostrom at umu.se> wrote: > Berend, > > I do not think this works with gfortran 7+. I am calling the BLAS > subroutine dgemv from Fortran code in my
2017 Dec 20
2
Question about : lprofValueProfNodes
What Vedant said -- the profiler runtime provides buffer API for profile dumping. Note that value profiling dumping is not yet supported for buffer API, but since you are using Front-end based instrumentation/profile-use, value profiler is not turned on by default anyway. David On Tue, Dec 19, 2017 at 5:29 PM, Vedant Kumar <vsk at apple.com> wrote: > > On Dec 19, 2017, at 5:16 PM,
2020 Nov 16
2
lld error: output file too large <some large number>
I can't send the exact objects, but I'll try to reproduce. Thanks A On 11/16/20, 9:48 AM, "Fāng-ruì Sòng" <maskray at google.com> wrote: NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, Nov 16, 2020 at 9:05 AM Moshtaghi, Alireza
2009 Mar 04
7
[LLVMdev] promotion of return value.
Below I have pasted the latest design that we discussed... Now we would like to pick it up and do the implementation. 1) Is there any last change that we would like to add? 2) Has anyone been working on it? I haven't seen any thing new in the code so I assume the answer is no... Thanks Alireza Moshtaghi Senior Software Engineer Development Systems, Microchip Technology Subject: Troubling