From edd @end|ng |rom deb|@n@org  Sun Aug  4 16:41:00 2019
From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel)
Date: Sun, 4 Aug 2019 09:41:00 -0500
Subject: [Rd] gfortran 9 quantreg bug
In-Reply-To: <F22FFF48-C157-4269-ACD4-3B58DD83FCCE@illinois.edu>
References: <F22FFF48-C157-4269-ACD4-3B58DD83FCCE@illinois.edu>
Message-ID: <23878.61052.305001.554120@rob.eddelbuettel.com>


Roger,

On 4 August 2019 at 06:48, Koenker, Roger W wrote:
| I?d like to solicit some advice on a debugging problem I have in the quantreg package.
| Kurt and Brian have reported to me that on Debian machines with gfortran 9
| 
| library(quantreg)
| f = summary(rq(foodexp ~ income, data = engel, tau = 1:4/5))
| plot(f)
| 
| fails because summary() produces bogus estimates of the coefficient bounds.
| This example has been around in my R package from the earliest days of R, and
| before that in various incarnations of S.  The culprit is apparently rqbr.f which is
| even more ancient, but must have something that gfortran 9 doesn?t approve of.
| 
| I note that in R-devel there have been some other issues with gfortran 9, but these seem
| unrelated to my problem.  Not having access to a machine with an R/gfortran9
| configuration, I can?t  apply my rudimentary debugging methods.  I?ve considered
| trying to build gfortran on my mac air and then building R from source, but before
| going down this road, I wondered whether others had other suggestions, or
| advice about  my proposed route.  As far as I can see there are not yet
| binaries for gfortran 9 for osx.

Maybe installing and running Docker on your mac is an alternative?

Minimally viable example using

  a) docker (on Linux, but it is portable) and
  
  b) the current official 'r-base' container (an alias to our Rocker r-base container)

r-base is begged to Debian testing, and also allows you to get Debian
unstable.  Below I fire up the container, tell it to use bash (not R) and update

  edd at rob:~/git$ docker run --rm -ti r-base bash
  root at 1307193fadf4:/# 
  root at 1307193fadf4:/# apt-get update
  Get:1 http://cdn-fastly.deb.debian.org/debian sid InRelease [149 kB]
  Get:2 http://cdn-fastly.deb.debian.org/debian testing InRelease [117 kB]
  Get:3 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [8,385 kB]
  Get:4 http://cdn-fastly.deb.debian.org/debian testing/main amd64 Packages [7,918 kB]
  Fetched 16.6 MB in 4s (4,649 kB/s)                           
  Reading package lists... Done
  root at 1307193fadf4:/# apt-cache policy gcc-9
  gcc-9:
    Installed: (none)
    Candidate: 9.1.0-10
    Version table:
       9.1.0-10 990
          990 http://deb.debian.org/debian testing/main amd64 Packages
          500 http://http.debian.net/debian sid/main amd64 Packages
  root at 1307193fadf4:/# apt-cache policy gfortran-9
  gfortran-9:
    Installed: (none)
    Candidate: 9.1.0-10
    Version table:
       9.1.0-10 990
          990 http://deb.debian.org/debian testing/main amd64 Packages
          500 http://http.debian.net/debian sid/main amd64 Packages
  root at 1307193fadf4:/# 

At this point it just a matter of actually installing gcc-9 and gfortran-9
(via apt-get install ...), and setting CC, FC, F77 and whichever other
environment variables the R build reflect to build quantreg.

That said, this will be Debian's standard gfortran-9.  What is at times a
little frustrating is that some of the builds used by some of the CRAN tests
use local modifications which make their behaviour a little harder to
reproduce.  I have an open issue with my (also old and stable) digest package
which goes belly-up on a clang-on-Fedora build and nowhere else -- and I have
been unable to reproduce this too.

For such cases, having Docker container would be one possible way of
giving access to the test environment to make it accessible to more users.

Best,  Dirk


| 
| Thanks,
| Roger
| 
| Roger Koenker
| r.koenker at ucl.ac.uk<mailto:r.koenker at ucl.ac.uk>
| Department of Economics, UCL
| London  WC1H 0AX.
| 
| 
| 
| 	[[alternative HTML version deleted]]
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] gfortran 9 quantreg bug
Dirk Eddelbuettel