Re: [Rd] nlminb with constraints failing on some platforms

2019-02-08 Thread ProfJCNash
It may be worth noting that both Avraham and I are members of the histoRicalg project (https://gitlab.com/nashjc/histoRicalg) that has some modest funding from R-Consortium. The type of concern this nlminb thread raises is why the project was proposed. That is, older codes that may predate IEEE

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-06 Thread Avraham Adler
If it helps, the BLAS I used is compiled to use 6 threads. On Wed, Feb 6, 2019 at 3:47 AM Berend Hasselman wrote: > > > > On 6 Feb 2019, at 10:58, Martin Maechler > wrote: > > > > . > > > --- > > > > I summarize what

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-06 Thread Berend Hasselman
> On 6 Feb 2019, at 10:58, Martin Maechler wrote: > . > --- > > I summarize what has been reported till: > > Failure in these cases > > 1. Kasper K ("Scientific Linux", self compiled R, using Intel's MKL >

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-06 Thread Martin Maechler
Thank you, Brad (and others), > Brad Bell on Mon, 4 Feb 2019 07:21:18 -0700 writes: > I get the failure message. To be specific: adcomp.git> R CMD BATCH --quiet test_nlminb.R adcomp.git> cat test_nlminb.Rout >> f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) >>

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-04 Thread Brad Bell
I get the failure message. To be specific: adcomp.git>R CMD BATCH --quiet test_nlminb.R adcomp.git>cat test_nlminb.Rout > f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) > opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) > xhat <- rep(1, 10) > abs( opt$objective - f(xhat) ) < 1e-4  ##

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-02 Thread William Dunlap via R-devel
Microsoft R Open 3.4.2 The enhanced R distribution from Microsoft Microsoft packages Copyright (C) 2017 Microsoft Corporation Using the Intel MKL for parallel mathematical computing (using 12 cores). Default CRAN mirror snapshot taken on 2017-10-15. See: https://mran.microsoft.com/. > f <-

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-02 Thread Oliver Dechant
Hello, > sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 9 (stretch) Matrix products: default BLAS/LAPACK: /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin/libmkl_rt.so locale: [1] LC_CTYPE=en_CA.UTF-8

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-02 Thread Stefan Evert
Also no error on MacOS 10.13.6, R 3.5.1 with system-supplied VecLib BLAS. > > f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) > > opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) > > str(opt) > List of 6 > $ par: num [1:10] 1 1 1 1 1 ... > $ objective : num -41.4 > $

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Avraham Adler
No error on Windows 10, R.3.5.2 patched, Rblas compiled with OpenBLAS 0.20, Rlapack is base. > f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) > opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) > str(opt) List of 6 $ par: num [1:10] 1 1 1 1 1 ... $ objective : num -41.4 $

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Rui Barradas
Hello, R 3.5.2 on ubuntu 18.04. sessionInfo() at the end. Works with me, same results, cannot reproduce the error. f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) str(opt) xhat <- rep(1, 10) all.equal(opt$par, xhat, tol=0) #

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Martin Maechler
> Berend Hasselman > on Fri, 1 Feb 2019 15:59:58 +0100 writes: >> On 1 Feb 2019, at 10:00, Martin Maechler wrote: >> >> sessionInfo() >>> R version 3.5.2 (2018-12-20) >>> Platform: x86_64-pc-linux-gnu (64-bit) >>> Running under: Scientific

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Berend Hasselman
> On 1 Feb 2019, at 10:00, Martin Maechler wrote: > > >>> sessionInfo() >> R version 3.5.2 (2018-12-20) >> Platform: x86_64-pc-linux-gnu (64-bit) >> Running under: Scientific Linux release 6.4 (Carbon) > >> Matrix products: default >> BLAS/LAPACK: >>

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Ralf Stubner
On 01.02.19 10:00, Martin Maechler wrote: >> f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) >> opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) >> str(opt) > List of 6 > $ par: num [1:10] 1 1 1 1 1 ... > $ objective : num -41.4 > $ convergence: int 0 > $ iterations : int 66 >

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Martin Maechler
> Kasper Kristensen via R-devel > on Mon, 28 Jan 2019 08:56:39 + writes: > I've noticed unstable behavior of nlminb on some Linux > systems. The problem can be reproduced by compiling > R-3.5.2 using gcc-8.2 and running the following snippet: > f <- function(x)

Re: [Rd] nlminb with constraints failing on some platforms

2019-01-31 Thread ProfJCNash
I'm not entirely sure what you are asking. However, optimx is really NOT meant as a production tool. I intend it as a way to 1) try out a lot of optimizers quickly on a user's problem or problem class to select a method or methods that suit well; 2) to provide (in the source code of optimr()) an

Re: [Rd] nlminb with constraints failing on some platforms

2019-01-31 Thread Amit Mittal
Prof Nash, Prof Galanos Is it possible to use a generic code stub in front of packages that use optimx to improve optimx use or curtail it according to the requirements? Best Regards Amit +91 7899381263

Re: [Rd] nlminb with constraints failing on some platforms

2019-01-31 Thread ProfJCNash
This is not about the failure on some platforms, which is an important issue. However, what is below may provide a temporary workaround until the source of the problem is uncovered. FWIW, the problem seems fairly straightforward for most optimizers at my disposal in the R-forge (developmental)

[Rd] nlminb with constraints failing on some platforms

2019-01-29 Thread Kasper Kristensen via R-devel
I've noticed unstable behavior of nlminb on some Linux systems. The problem can be reproduced by compiling R-3.5.2 using gcc-8.2 and running the following snippet: f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) xhat <- rep(1, 10) abs(