Displaying 20 results from an estimated 36 matches for "lbfgsb".
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...
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 n...
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)...
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: Rprintf("W...
2002 Jan 17
2
Solaris 2.6 Compile (PR#1268)
...)
Got the following error when compiling on Solaris 2.6 with the standard GNU
gcc package (from the Sun site). BTW - linux compiles no problem (and fast
too :-)
# make
`Makedeps' is up to date.
gcc -I. -I../../src/include -I../../src/include -I/usr/local/include
-DHAVE_CONFIG_H -g -O2 -c lbfgsb.c -o lbfgsb.o
/usr/ccs/bin/as: "/var/tmp/cccbNfee.s", line 12959: error: unknown opcode
".subsection"
/usr/ccs/bin/as: "/var/tmp/cccbNfee.s", line 12959: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/cccbNfee.s", line 12971: error: unknown opcode
"....
2023 Apr 02
0
setulb() from lbfgsb.c not exported
Hello,
It appears that the file ./appl/lbfgsb.c defines setulb() as a static
function, and it is included in optim.c, so setulb() is not exported
by the R library. I have some sofware that uses setulb() directly,
and I would prefer to avoid having to recompile this sofware to
export that function.
Is there any way to get access to setulb(), o...
2002 May 06
2
compiling on Solaris 7 (PR#1520)
...e following errors with make. I
searched through
the buglist and didn't see anything similar, although I wouldn't doubt if I was
just
using the wrong version of something.
gcc version 3.0.3
gcc -I. -I../../src/include -I../../src/include -I/usr/local/include
-DHAVE_CONFIG_H -g -O2 -c lbfgsb.c -o lbfgsb.o
/usr/ccs/bin/as: "/var/tmp/ccBVo80F.s", line 12970: error: unknown opcode
".subsection"
/usr/ccs/bin/as: "/var/tmp/ccBVo80F.s", line 12970: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccBVo80F.s", line 12982: error: unknown opcode
"....
2004 Mar 30
5
optim-Bug (PR#6720)
...c G4 OSX, AMD Opteron Linux SUSE
9.0, Intel P4 Suse 9.0, P4 Windows XP Prof), only with different i.
The non-deterministic behaviour made us recompile R with debug options and use
valgrind for memory-leak checking. The result was horrible. We are now in the
process of going through the f2c code of lbfgsb.c. The problem seems to be a
access violation of wn1 at run time.
Cheers
Hans
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for (i in 1:1000) {
set.seed(0,NULL)
cat(i,"\n")
pvec<-c(19,1,1,5,5,6,4,6,15,7,15,2,16,2,5,6,25,1,3,1,5,3,5,5,20,...
2000 Aug 15
1
Defective pointer to tech report (PR#634)
Full_Name: Rod Montgomery
Version: 1.1.0
OS: Windows-95
Submission from: (NULL) (38.26.56.3)
File R-1.1.0/src/appl/lbfgsb.c --
Comment in code says two papers describing underlying math are in
ftp://ece.nwu.edu/pub/lbfgs/lbfgs_bcm/
but that directory seems not to exist.
(Actually, the comment does not give a URL - it just says
to look in that directory on that FTP server.)
Paper [1] does exist in
ftp://ece.nwu.ed...
2020 May 04
1
error in message printed by L-BFGS-B
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: Rprintf("W...
2008 Jan 19
1
R_alloc segfaults
...-g -c main.c -o main.o
$ gcc -std=gnu99 -Wl,--export-dynamic [lots of R .o and .a files]
-lreadline -lncurses -ldl -lm
What could cause this strange memory problem? Is the compile command wrong/
I'd be happy to just call malloc instead of R_alloc, but what I
actually want to do is to call lbfgsb (see optim.c), and that uses
R_alloc. When I do call lbfgsb from my stand-alone C program, its
R_alloc call is evaluated with these arguments
> R_alloc (nelem=1, eltsize=-1073870176) at memory.c:1649
and I get a segfault again. When I modify the original optim.c to use
malloc instead of R_alloc,...
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi, Mark et al.:
Thanks, Mark.
Three comments:
1. Rvmmin was one of the methods I tried after Ravi
directed me to optimx. It returned NAs for essentially everything. See
my email of this subject stamped 4:43 PM Central time = 21:43 UTC.
2. It would be interesting to know if the current
algorithm behind optim and optimx with
2006 Sep 02
1
nonlinear least squares fitting Trust-Region"
...CLOSE TO ZERO. IT IS INCLUDED FOR PEDAGOGICAL REASONS AND SHOULD BE THE LAST CHOICE FOR MOST MODELS AND DATA SETS.
I browsed some literature about the garchfit function, but I did not see the "Trust-Region" algorithm there either: algorithm = c("sqp", "nlminb", "lbfgsb", "nlminb+nm", "lbfgsb+nm"), control = list(), title = NULL, description = NULL, ...)
Thank you for your attention. I am looking forward to your reply.
Regards,
Martin
-----------------------------------------------------------------
vbox7.com - ??????? ????? ???????!
2016 Oct 10
0
optim(…?=, =?utf-8?Q?method=‘L-BFGS-B’) stops with an error message while violating the lower bound
...r, make two remarks, the 2nd one
about the "machine epsilon" used, and I can assure you that R's
optim() version never suffered from that; we've always been
using a C translation of the fortran code, and then used DBL_EPSILON.
R's (main) source file for that is in .../src/appl/lbfgsb.c, e.g., here
https://svn.r-project.org/R/trunk/src/appl/lbfgsb.c
OTOH, their remark 1 is very relevant and promising faster /
more reliable convergence.
I'd be "happy" if optim() could gain a new option, say, "L-BFGS-B-2011"
which would incorporate what they call "mo...
2002 Jan 28
1
Symbol referencing errors...
...r/local/sparc-sun-solaris
2.6/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -lm
-L/usr/local/lib -l
z -lnsl -lsocket -lreadline -ldl -ltermcap -lm
Undefined first referenced
symbol in file
dscal_ ../appl/libappl.a(lbfgsb.o)
drot_ ../appl/libappl.a(dsvdc.o)
daxpy_ ../appl/libappl.a(lbfgsb.o)
ddot_ ../appl/libappl.a(lbfgsb.o)
dswap_ ../appl/libappl.a(dqrdc.o)
dnrm2_ ../app...
2000 Apr 24
1
compiling R-1.0.1 under Solaris
...GNU make):
----------------------------------------------------------------------------
----
...
make[3]: Entering directory `/home/ppp/paradis/R/R-1.0.1/src/appl'
cr libappl.a Rsock.o S_compat.o approx.o bakslv.o binning.o chisqsim.o
chull.o c
poly.o cumsum.o distance.o fft.o fmin.o fortran.o lbfgsb.o loglin.o
lowess.o mac
har.o massdist.o pretty.o pythag.o rowsum.o sock.o splines.o stem.o
strsignif.o
tabulate.o uncmin.o zeroin.o ch2inv.o chol.o dpbfa.o dpbsl.o dpoco.o
dpodi.o dpo
fa.o dposl.o dqrdc.o dqrdc2.o dqrls.o dqrsl.o dqrutl.o dsvdc.o dtrco.o
dtrsl.o e
igen.o lminfl.o blas.o
make[3]: c...
2010 Jan 03
3
F77_CALL, F77_NAME definition
I give up. Maybe it is my search (Windows) but I cannot seem to find the definition of the F77_CALL or F77_NAME macros. Either there are too many matches or the search just doesn't find it. For example where is the source for:
F77_CALL(dpotri)
?
Thank you.
Kevin
2006 Jul 21
0
(no subject)
...can see. Given that it was originally in Fortran, and Fortran
often does zero it seems a likely symptom, but it does mean that a
variable is being used uninitialized somewhere in the code (converted to
C). It would be better to leave vect alone and to zero the workspace with
a memset call in lbfgsb. (Incidentally, I don't know why S_alloc does not
use memset -- we do require standard C and use in seeral other places.)
--
Brian D. Ripley,
could be relevant to my case. The question is: How can I zero the workspace with a memset call in lbfgsb?
I have read the Rhelp for windows and...
2007 Oct 13
1
R API - optim
I am trying to use the R API to call optim functions (nmmin, vmmin, lbfgsb,
etc.) through a C program but I couldn't find the shared library to link
under the R-2.6.0 build which is compiled under Linux (REL5).
main.cpp:35: undefined reference to `Rf_initEmbeddedR(int, char**)'
main.cpp:41: undefined reference to `nmmin'
Thanks in advance for any help.
----...
2001 Jan 25
1
problems compiling R under digital unix 4.0d (PR#826)
.......]
g77 -mieee -g -O2 -c dtrco.f -o dtrco.o
g77 -mieee -g -O2 -c dtrsl.f -o dtrsl.o
g77 -mieee -g -O2 -c eigen.f -o eigen.o
g77 -mieee -g -O2 -c lminfl.f -o lminfl.o
ar cr libappl.a Rsock.o approx.o bakslv.o binning.o chisqsim.o chull.o
cpoly.o cumsum.o distance.o fft.o fmin.o fortran.o lbfgsb.o loglin.o
lowess.o machar.o maxcol.o massdist.o pretty.o rowsum.o sock.o
splines.o stem.o strsignif.o tabulate.o uncmin.o zeroin.o ch2inv.o
chol.o dpbfa.o dpbsl.o dpoco.o dpodi.o dpofa.o dposl.o dqrdc.o dqrdc2.o
dqrls.o dqrsl.o dqrutl.o dsvdc.o dtrco.o dtrsl.o eigen.o lminfl.o
ranlib l...