Re: [Rd] Fw: Calling a LAPACK subroutine from R

2019-09-12 Thread Göran Broström
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, &

Re: [Rd] Fw: Calling a LAPACK subroutine from R

2019-09-12 Thread Berend Hasselman
> On 12 Sep 2019, at 10:36, Serguei Sokol wrote: > > On 11/09/2019 21:38, Berend Hasselman wrote: >> The Lapack library is loaded automatically by R itself when it needs it for >> doing some calculation. >> You can force it to do that with a (dummy) solve for example. >> Put this at start of

Re: [Rd] Calling a LAPACK subroutine from R

2019-09-12 Thread Göran Broström
Thanks Berend, I got curious and checked your package, and no errors. However, two open questions: 1. You invoke the call to dgemv from a Fortran subroutine that is called from a C function, which in turn is called in R by .Call. I go directly via .Fortran, no C involved, except by "base R",

Re: [Rd] Fw: Calling a LAPACK subroutine from R

2019-09-12 Thread Serguei Sokol
On 11/09/2019 21:38, Berend Hasselman wrote: The Lapack library is loaded automatically by R itself when it needs it for doing some calculation. You can force it to do that with a (dummy) solve for example. Put this at start of your script: # dummy code to get LAPACK library loaded X1 <- diag

[Rd] NiceBayes filtered "[ALTREP] ... return value ..."

2019-09-12 Thread Martin Maechler
> Wang Jiefei > on Wed, 11 Sep 2019 14:49:13 -0400 writes: > Hi Gabriel, > Thanks for your answer and future update plan. Somehow this email has been > delayed for a week, so there might be a wired reply from me saying that I > have found the answer from the R source c

Re: [Rd] Calling a LAPACK subroutine from R

2019-09-12 Thread Berend Hasselman
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 wrote: > > > I have tried what I proposed in a virtual Kubuntu 18.04 which uses gfor