[R-pkg-devel] LAPACK errors in r-devel only

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Tue Nov 29 02:27:04 CET 2022


Louis,

you didn't provide any details (please always post a link to the sources you're talking about!), but I suspect you are missing character length arguments, Lapack.h has:

F77_NAME(dgeevx)(const char* balanc, const char* jobvl, const char* jobvr,
                 const char* sense, const int* n, double* a, const int* lda,
                 double* wr, double* wi, double* vl, const int* ldvl,
                 double* vr, const int* ldvr, int* ilo, int* ihi,
                 double* scale, double* abnrm, double* rconde, double* rcondv,
                 double* work, const int* lwork, int* iwork, int* info
                 FCLEN FCLEN FCLEN FCLEN);

23 = without lengths, 27 = with lengths, so presumably the R in question is compiled with USE_FC_LEN_T and thus your call is missing the corresponding FCONE entries - see R-ext 6.6.1 Fortran character strings.

Cheers,
Simon


> On 29/11/2022, at 12:36 PM, ASLETT, LOUIS J.M. <louis.aslett using durham.ac.uk> wrote:
> 
> I submitted a package update to CRAN in the hopes of reinstating an archived package, {PhaseType}.  The update is mostly to remove a dependency on another archived package, and to add registrations of C functions.
> 
> Everything is fine on r-release, but on r-devel I have errors.  I tested this with r-hub prior to submission, but wondered if there were issues there because the errors didn't make any sense, so I (perhaps wrongly) submitted to CRAN and the errors have been repeated but again *only* for r-devel.
> 
> The full error log (so long as it lasts) is here: https://win-builder.r-project.org/incoming_pretest/PhaseType_0.2.0_20221124_233702/
> 
> Essentially, the compile errors exclusively relate to LAPACK functions which should be completely stable.  As far as I can tell (welcome any correction) the r-devel build is expecting a different number of arguments for these LAPACK functions than r-release, which honestly baffles me.
> 
> For example, I note the error:
> 
> #> PHT_MCMC_Aslett.c:180:157: error: too few arguments to function call, expected 27, have 23
> #> F77_CALL(dgeevx)(&balanc, &jobvl, &jobvr, &sense, n, NULL, n, NULL, NULL, NULL, n, NULL, n, NULL, NULL, NULL, NULL, NULL, NULL, &work, &lwork, NULL, &info);
> 1721
> 
> However, the standard LAPACK interface documentation for dgeevx (see eg https://netlib.org/lapack/explore-html/d9/d8e/group__double_g_eeigen_ga4e35e1d4e9b63ba9eef4ba8aff3debae.html ) shows that the 23 arguments I am passing is correct (and has been for years), not the 27 the r-devel build for some reason expects.
> 
> Any help greatly appreciated.  I've replied along these lines to CRAN rejection message, but opening this question to the list in the hope of assistance in understanding what's going on with r-devel on such a bog-standard LAPACK function, which must have been stable for over a decade.
> 
> Thanks in anticipation!
> 
> Louis
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 



More information about the R-package-devel mailing list