similar to: setulb() from lbfgsb.c not exported

Displaying 20 results from an estimated 1000 matches similar to: "setulb() from lbfgsb.c not exported"

2014 Sep 07
1
lbfgsb from C/C++
Hi, I would like to call R's lbfgsb function from my C/C++ code by including R_ext/Applic.h and linking against libR. Currently, I am allocating memory for x (and the other input arrays for lbfgsb) in my C/C++ code via malloc/new. However, this gives a segmentation fault when executing the program. I tried to allocate x via PROTECT(x = NEW_NUMERIC(n)); x_p = NUMERIC_POINTER(x);. This compiles
2012 Oct 28
0
lbfgsb from C
Hi, I wanted to use R's lbfgsb method for minimization from C. Unfortunately, my toy examples always crashes (segmentation fault). What's wrong with it? double eval(int n, double* par, void *ex) { double result = 0; for (int i=0; i<n; ++i) { result += par[i]*par[i]; } printf("result=%.2f\n", result); return result; } void grad(int n, double *par, double *gr,
2020 May 04
0
Error in message printed by lbfgsb
Hi I have a FORTRAN version of the L-BFGS-B algorithm and I was comparing it to the code in the lbfgsb.c file available at R-4.0.0.tar.gz Everithing looks the same, except for those two lines that must be printed by the prn3lb function in case of an error (lines 3559 and 3561 in lbfgsb.c): case -5: Rprintf("l(%d) > u(%d). No feasible solution", k, k); break; case -7:
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at
2023 Jan 19
2
Problem installing gdb into Rtools42
On second thought, there is a lot of metapramming code in Rcpp that runs before main, so I was wrong to say nothing can happen before main() is called. Strategically placed print statements may be the best strategy. On Wed, Jan 18, 2023 at 8:17 PM Dominick Samperi <djsamperi at gmail.com> wrote: > Since these ?stray threads? were appearing before I installed gdb into > Rtools42, this
2023 Jan 18
1
Problem installing gdb into Rtools42
Thanks for the detailed feedback Tomas, I ran the command 'pacman -Syuu' again, just to be sure, and this time it says "there is nothing to do." It appears that gdb is working. I was spooked by the diagnostics that you say is a known (not serious) issue. My mistake was not setting a breakpoint on main, so I confused problems with gdb with problems with the program I'm
2023 Jan 18
2
Problem installing gdb into Rtools42
On 1/18/23 19:41, Dominick Samperi wrote: > Thanks for the detailed feedback Tomas, > > I ran the command 'pacman -Syuu' again, just to be sure, and this time > it says "there is nothing to do." > > It appears that gdb is working. I was spooked by the diagnostics that > you say is a known (not serious) issue. > > My mistake was not setting a
2023 Jan 18
1
Problem installing gdb into Rtools42
On 1/18/23 04:33, Dominick Samperi wrote: > Hello, > > I tried installing gdb into Rtools42 following the instructions here > https://cran.r-project.org/bin/windows/base/howto-R-4.2.html > > I ran 'pacman -Sy gdb', and the installation seemed to complete without > problems. > > But gdb could not be started because incorrect DLL versions were installed, > in
2015 Sep 12
1
rgl/webGL complains about Javascript, even in recent online docs?
FYI, one platform where I have not been able to get interactive rgl working is iOS 8. iOS 8 is supposed to support WebGL, and Javascript is enabled. On Sat, Sep 12, 2015 at 4:33 PM, Dominick Samperi <djsamperi at gmail.com> wrote: > Thanks for the pointers and the quick fix. > > Perhaps the generated HTML code should issue a > message like "Javascript load problem"
2023 Jan 18
1
Problem installing gdb into Rtools42
On 1/18/23 17:39, Dominick Samperi wrote: > Thanks, > > But this didn't work. It installs msys2 along with lots of other > stuff, and gdb would not start as before (missing DLL's). > > Then I tried to run the command you suggested again, and there was a > warning from the package manager about a cycle detected, but now gdb > starts with the following messages...
2023 Jan 18
1
Problem installing gdb into Rtools42
Thanks, But this didn't work. It installs msys2 along with lots of other stuff, and gdb would not start as before (missing DLL's). Then I tried to run the command you suggested again, and there was a warning from the package manager about a cycle detected, but now gdb starts with the following messages... Traceback (most recent call last): File "<string>", ine 3, in
2010 Dec 01
6
GPL and R Community Policies (Rcpp)
This post asks members of the R community, users and developers, to comment on issues related to the GNU Public License and R community policies more generally. The GPL says very little about protecting the the rights of original contributors by not disseminating misleading information about them. Indeed, for pragmatic reasons it effectively assumes that original authors have no rights regarding
2010 Jul 09
3
Telling Windows how to find DLL's from R?
Is it possible to set Windows' search path from within R, or to tell Windows how to find a DLL in some other way from R? Specifically, if a package DLL depends on another DLL the normal requirement is that the second DLL be in the search path so Windows can find it (there are other tricks, but they apply at the Windows level, not at the R level). Thanks, Dominick [[alternative HTML version
2011 Jan 11
0
[Rcpp-devel] Loading a package using Rcpp Modules results in memory corruption
On Tue, Jan 11, 2011 at 2:41 PM, Romain Francois <romain@r-enthusiasts.com>wrote: > Le 11/01/11 19:57, Romain Francois a écrit : > > Le 11/01/11 19:46, Douglas Bates a écrit : >> >>> On Tue, Jan 11, 2011 at 12:27 PM, Dominick >>> Samperi<djsamperi@gmail.com> wrote: >>> >>>> >>>> >>>> On Tue, Jan 11, 2011 at
2010 Apr 27
2
Resolving functions using R's namespace mechanism can double runtime
It appears that the runtime for an R script can more than double if a few references to a function foo() are replaced by more explict references of the form pkgname::foo(). The more explicit references are of course required when two loaded packages define the same function. I can understand why use of this mechanism is not free in an interpreted environment like R, but the cost seems rather
2010 Apr 14
2
Why no race condition when returning UNPROTECT-ed memory from C?
Consider the C (or C++) code called from the .Call interface: SEXP foo() { SEXP *p = PROTECT(allocVector(REALSXP, 10)); ... UNPROTECT(1); return p; } Why is there no danger that the allocated memory will be garbage collected after the UNPROTECT, but before the return of p? I have used code like this for some time and have never had a problem, but I'm not sure if/why it is guaranteed
2004 Mar 30
5
optim-Bug (PR#6720)
Full_Name: Dr. Hans A. Kestler Version: 1.8.1. OS: Linux, Win, Mac OSX Submission from: (NULL) (134.60.73.116) The code below produces after a different number of iterations i the following error: Error in optim(par = rep(0.5, length(edges)), loglik, method = "L-BFGS-B", : non-finite value supplied by optim This was reproducible on different machines (Mac G4 OSX, AMD Opteron
2010 Apr 30
2
Memory allocation in C/C++ vs R?
The R docs say that there are two methods that the C programmer can allocate memory, one where R automatically frees the memory on return from .C/.Call, and the other where the user takes responsibility for freeing the storage. Both methods involve using R-provided functions. What happens when the user uses the standard "new" allocator? What about when a C++ application uses STL and
2009 Dec 22
2
Rcpp: Clarifying the meaning of GPL?
I wrote the Rcpp library and the RcppTemplate package to make it easier for developers to contribute packages to the R community. In addition to providing detailed documentation on package creation it provides a clean object mapping between R anc C++ that helps developers to implement packages that benefit from the performance of C++ and the flexibility of R. The package named 'Rcpp' was
2005 Oct 31
0
New version of RQuantLib
A new version of RQuantLib has been uploaded to CRAN a few days ago (and should be available at http://cran.r-project.org and all mirrors). Debian binaries are also available. Among the new features in version 0.2.0, all of which are due to excellent contributions by Dominick Samperi, are - new functions for Fixed Income support: * DiscountCurve for discount / forward / zero curve construction