Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the archives, though it is in the R FAQ and Brian R. mentions they are in libR in a 2009 post. Are the xxxPR routines now deprecated (particularly for 64 bit systems) or still OK to use? If OK, can anyone point to documentation and examples? JN
Reply redirected to the R-devel list. On Tue, Nov 16, 2010 at 1:02 PM, Prof. John C Nash <nashjc at uottawa.ca> wrote:> Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional > (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its > use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can > find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the > archives, though it is in the R FAQ and Brian R. mentions they are in libR in a 2009 post. > Are the xxxPR routines now deprecated (particularly for 64 bit systems) or still OK to > use? ?If OK, can anyone point to documentation and examples?Can you give more context? What is UNCMINF? Is it a package? Is it a file? There is a file R_SRC/src/appl/uncmin.c but it doesn't use DBLEPR because it is C source code. As stated in the comments /* ../appl/uncmin.f -- translated by f2c (version of 1 June 1993 23:00:00). -- and hand edited by Saikat DebRoy */ /*--- The Dennis + Schnabel Minimizer -- used by R's nlm() ---*/
I normally see digest once per day, but got msg from Doug Bates so responding with context. UCMINF is a package on CRAN that implements a variable metric minimizer. It does quite well on unconstrained problems. Stig Mortensen packaged the Fortran version for R, but is not at moment responding to emails. There's also a Matlab version. We have it in optimx and get some occasions where it just stops if we set trace>0. Other times we can't get it to fail. My guess is something like an undefined variable or a bad declaration of a pointer, but C and C++ are not languages I've much experience with. JN
My reaction is leaning heavily towards "Virtuoso!" as opposed to "Show Off!". Thanks very much. JN On 11/16/2010 05:39 PM, Douglas Bates wrote:> Try this. > > On Tue, Nov 16, 2010 at 4:06 PM, Prof. John C Nash <nashjc at uottawa.ca> wrote: >> We've tried to contact Stig since July. Possibly he changed emails. >> >> My thought was to use Rprintf as suggested and was looking into doing that to see if our >> optimx problems would go away. Will keep it as open issue while we give a bit more time >> for response, and welcome input from others. >> >> JN >> >> >> On 11/16/2010 04:52 PM, Douglas Bates wrote: >>> On Tue, Nov 16, 2010 at 2:35 PM, Prof. John C Nash <nashjc at uottawa.ca> wrote: >>>> I normally see digest once per day, but got msg from Doug Bates so responding with context. >>> >>>> UCMINF is a package on CRAN that implements a variable metric minimizer. >>> >>> A pedant might point out that the package is called "ucminf". >>> >>>> It does quite >>>> well on unconstrained problems. Stig Mortensen packaged the Fortran version for R, but is >>>> not at moment responding to emails. There's also a Matlab version. We have it in optimx >>>> and get some occasions where it just stops if we set trace>0. Other times we can't get it >>>> to fail. My guess is something like an undefined variable or a bad declaration of a >>>> pointer, but C and C++ are not languages I've much experience with. >>> >>> Well, it doesn't work well for me because my version of gfortran (GNU >>> Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5) objects to the format >>> strings in some of the Fortran WRITE statements. >>> >>> The recommended approach is to avoid all Fortran I/O including writing >>> to a Fortran character array. As there are only 3 such WRITE >>> statements in the Fortran code it would be very simple to replace them >>> with calls to C functions that in turn call Rprintf. However, it >>> would be best if Stig could take ownership of the modifications. >>
G'day John, On Tue, 16 Nov 2010 14:02:57 -0500 "Prof. John C Nash" <nashjc at uottawa.ca> wrote:> Are the xxxPR routines now deprecated (particularly for 64 bit > systems) or still OK to use?They are still OK to use, and I use them occasionally.> If OK, can anyone point to documentation and examples?Section 6.5.1 "Printing from Fortran" in the "Writing R Extensions" manual has documentation (but no examples). Luckily, Section 5.7 "Fortran I/O", the section that I always look at first, has a link to Section 6.5.1. :) Cheers, Berwin ========================== Full address ===========================Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019) +61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009 e-mail: berwin at maths.uwa.edu.au Australia http://www.maths.uwa.edu.au/~berwin
Possibly Parallel Threads
- DBLEPR?
- Title case in DESCRIPTION for package where a word is a function name
- Title case in DESCRIPTION for package where a word is a function namei
- Title case in DESCRIPTION for package where a word is a function name
- Subject: Re ZINB by Newton Raphson??