From p.dalgaard at biostat.ku.dk  Wed Apr 21 00:49:49 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Wed Apr 21 00:53:17 2004
Subject: [Rd] optim-Bug (PR#6720)
In-Reply-To: <20040330172140.8397D10432@slim.kubism.ku.dk>
References: <20040330172140.8397D10432@slim.kubism.ku.dk>
Message-ID: <x2isfufenm.fsf@biostat.ku.dk>

kestler@neuro.informatik.uni-ulm.de writes:

> 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 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. 

I have this down to the use of R_alloc in the vect() function (line
40, optim.c). Replacing with S_alloc (which zeros memory) removes the
issue for me on this machine and on the Opteron. Could you please
verify on other platforms? And if anyone actually understands the code
could you verify that it makes sense to require the workspace to be
initialized?


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] optim-Bug (PR#6720)
Peter Dalgaard