Skip to content

[R-pkg-devel] CRAN review

12 messages · Τόλης Χαλκής, Henrik Bengtsson, Vissarion Fisikopoulos +3 more

#
Of course we will resubmit. Thank you all for the info.

Chalkis Apostolos

On Wed, 13 Mar 2019 at 10:05, Ma?lle SALMON via R-package-devel <
r-package-devel at r-project.org> wrote:

            

  
  
9 days later
#
Hello,

we have resubmitted the package 'volesti'. I got the email and
confirmed submission. Later I got the confirmation email starting:
"The following package was uploaded to CRAN:..." and then the email on
automated check complaining about the same 2 notes as in the previous
submission. I answered (reply to all) explaining why those notes are
false positives. Then no news for 9 days. Could you please update us
on this.

Best regards,
Vissarion
On Wed, 13 Mar 2019 at 10:15, ????? ?????? <tolis.chal at gmail.com> wrote:
#
Not a CRAN maintainer, but from my experience, it sounds like you're
hitting some very unusual hiccup here - that's unfortunate.  I just
had a look around at ftp://cran.r-project.org/incoming/ and your
package is not there anymore. Just a wild guess but I wonder if your
email reply back to CRAN ends up in their spam folders?

BTW, what are the two NOTEs you're getting?  Maybe they're avoidable.
Since packages with all OKs can go straight through the CRAN incoming
checks and be published automatically (at least if the package is
already on CRAN), I try to walk an extra mile just avoid NOTEs in my
packages even if I know they're false positives.

My $.02

/Henrik

On Fri, Mar 22, 2019 at 6:28 AM Vissarion Fisikopoulos
<fisikop at gmail.com> wrote:
6 days later
#
Dear all,

@Henrik: thanks a lot for your reply.

I did one more submission (the third) and I am posting below my answer
to the automatic cran email with 2 NOTES.

Looking forward to your feedback.

Best regards,
Vissarion.
On Fri, 29 Mar 2019 at 11:04, Vissarion Fisikopoulos <fisikop at gmail.com> wrote:
On Fri, 22 Mar 2019 at 22:03, Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote:
#
I don't think the note about using 'rand' comes from looking at strings
in the source code.  It is probably looking at undefined symbols in the
symbol table of the compiled and linked code with something like the
following

% find volesti -iname "*o" | xargs nm -A -g --demangle | grep ' U ' | grep
rand
volesti/src/lp_solve/lp_rlp.o:                 U storevarandweight
volesti/src/lp_solve/lp_price.o:                 U rand_uniform
volesti/src/lp_solve/lp_utils.o:                 U unif_rand
volesti/src/lp_solve/lp_lib.o:                 U rand_uniform
volesti/src/rotating.o:                 U rand
volesti/src/volesti.so:                 U rand@@GLIBC_2.2.5
volesti/src/volesti.so:                 U unif_rand

You will have to poke through the boost headers or docs to see how to avoid
using rand in volesti/src/rotating.cpp.

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Fri, Mar 29, 2019 at 2:12 AM Vissarion Fisikopoulos <fisikop at gmail.com>
wrote:

  
  
#
It looks like it is not boost but RcppEigen that has the call to
std::rand() that volesti/src/rotating.cpp contains.

RcppEigen/include/Eigen/src/Core/MathFunctions.h:
  static inline Scalar run(const Scalar& x, const Scalar& y)
  {
    return x + (y-x) * Scalar(std::rand()) / Scalar(RAND_MAX);
  }


Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Mar 29, 2019 at 8:43 AM William Dunlap <wdunlap at tibco.com> wrote:

            

  
  
#
Hi Bill,

Maybe I'm missing something, but if RcppEigen were the cause of the NOTE, wouldn't RcppEigen also get the same NOTE? However, it does not: https://cran.r-project.org/web/checks/check_results_RcppEigen.html

And for what it's worth, neither does BH: https://cran.r-project.org/web/checks/check_results_BH.html

Max
#
The check only looks at compiled code.  BH contains only headers, no
compiled code.

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Fri, Mar 29, 2019 at 9:27 AM Maxime Turgeon <
maxime.turgeon at mail.mcgill.ca> wrote:

            

  
  
#
Oops, RcppEigen does contain compiled code, but its header files include
much more code that doesn't get checked because it is not used in
RcppEigen.so.

Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Mar 29, 2019 at 9:35 AM William Dunlap <wdunlap at tibco.com> wrote:

            

  
  
#
On 29.03.19 17:27, Maxime Turgeon wrote:
Both RcppEigen and BH provide header only libraries which are only
compiled by packages making use of it. And the rand symbol is only
searched for in the resulting/compiled libraries.

Greetings
Ralf
#
One can use 'g++ -E' to find the which include file is the culprit.  E.g.,

% g++ -c -E -I`R RHOME`/include -I`R RHOME`/site-library/Rcpp/include -I`R
RHOME`/site-library/RcppEigen/include -Iexternal/LPsolve_src/run_headers
-Iexternal/minimum_ellipsoid -Iinclude -Iinclude/volume
-Iinclude/generators -Iinclude/samplers -Iinclude/annealing
-Iinclude/convex_bodies -std=gnu++11 rotating.cpp | egrep '\<rand\>|^#
*[0-9]+' | grep -C 1 '\<rand\>'
# 315 "/usr/include/stdlib.h" 2 3 4
extern int rand (void) throw ();
# 1 "/usr/include/alloca.h" 1 3 4
--
# 114 "/usr/include/c++/4.8.2/cstdlib" 3
  using ::rand;
# 196 "/usr/include/c++/4.8.2/cstdlib" 3
--
# 5185 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3
     + std::rand() % ((__i - __first) + 1);
# 5218 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3
--
# 455
"/home/R/R-3.5.2/lib64/R/site-library/RcppEigen/include/Eigen/src/Core/MathFunctions.h"
    return x + (y-x) * Scalar(std::rand()) / Scalar(2147483647);
      offset = (std::size_t(std::rand()) * multiplier) / divisor;
    return Scalar((std::rand() >> shift) - offset);
# 689
"/home/R/R-3.5.2/lib64/R/site-library/RcppEigen/include/Eigen/src/Core/MathFunctions.h"
--
# 295
"/home/R/R-3.5.2/lib64/R/site-library/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h"
    return x + (y-x) * half(float(std::rand()) / float(2147483647));
# 412 "/home/R/R-3.5.2/lib64/R/site-library/RcppEigen/include/Eigen/Core" 2

Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Mar 29, 2019 at 9:37 AM William Dunlap <wdunlap at tibco.com> wrote:

            

  
  
#
On 29.03.19 17:05, William Dunlap wrote:
The link between the two seems to be rounding.h which contains:

  // pick a random rotation
  MT R = MT::Random(n,n);

cheerio
ralf