Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-05 Thread Peter Dunn
Impossible or not… it just happened (unless I am being really stupid, which is 
entirely possible, indeed probable).  I confirmed again this morning: After 
rebuilding (R CMD build) and checking (R CMD check) without any errors, I used 
rhub and the command line again:


Running valgrind at the command line, I get this error:

==5097== Conditional jump or move depends on uninitialised value(s)
==5097==at 0x1118F61FB: smallp_ (in 
/Users/pdunn2/Library/R/3.4/library/tweedie/libs/tweedie.so)

…when I am here:

$ pwd
/Users/pdunn2/Documents/Research/Rpackages/tweedie/tweedie-debug/CRAN-update/tweedie.Rcheck



In rhub:

check_with_valgrind("tweedie")

gives:

── 0 errors ✔ | 0 warnings ✔ | 0 notes ✔
─  Done with R CMD check
─  Saving artifacts

…when I am here:

> getwd()
[1] 
"/Users/pdunn2/Documents/Research/Rpackages/tweedie/tweedie-debug/CRAN-update"




I will take this to mean that there really is no problem… and put this down to 
things I don’t understand and “experience”.

Thanks for everyone’s help.

P.

From: Iñaki Úcar 
Date: Friday, 3 November 2017 at 7:45 pm
To: Peter Dunn 
Cc: "r-package-devel@r-project.org" 
Subject: Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-03 6:01 GMT+01:00 Peter Dunn :
> Iñaki and all
>
> Well, thanks for pointers to rhub. Wonderful. Moving things to github, but
> have to go home now…
>
> So, when I download CRAN code, initialise w and lambda (which workled for
> Iñaki), and run
>
> rhub::check_with_valgrind()
>
> on the code, I get no errors
> (https://builder.r-hub.io/status/tweedie_2.2.5.tar.gz-c8873979fcf84b4f8a0a4d5a47175f63).
>
>
> But running
>
> R -d "valgrind --tool=memcheck --leak-check=full --track-origins=yes"
> --vanilla < tweedie-Ex.R
>
> from the command line *still* gives me errors about “Conditional jump or
> move depends on uninitialised value(s)” in the subroutine smallp”.

That's impossible. Did you rebuild and reinstall the package after
making those changes?

Iñaki



USC, Locked Bag 4, Maroochydore DC, Queensland, 4558 Australia.
CRICOS Provider No: 01595D
Please consider the environment before printing this email.
This email is confidential. If received in error, please delete it from your 
system.

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-05 Thread Iñaki Úcar
2017-11-06 0:09 GMT+01:00 Peter Dunn :
> Impossible or not… it just happened (unless I am being really stupid, which
> is entirely possible, indeed probable). I confirmed again this morning:
> After rebuilding (R CMD build) and checking (R CMD check) without any
> errors, I used rhub and the command line again:
>
>
> Running valgrind at the command line, I get this error:
>
> ==5097== Conditional jump or move depends on uninitialised value(s)
> ==5097== at 0x1118F61FB: smallp_ (in
> /Users/pdunn2/Library/R/3.4/library/tweedie/libs/tweedie.so)

What I meant is that, if you run the script in tweedie.Rcheck from the
command line, Rscript uses your *installed* version of tweedie, not
the tarball you built with R CMD build. So if you didn't run R CMD
INSTALL, Rscript is running an old version without any fix, hence the
disagreement with R CMD check.

Iñaki

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-05 Thread Peter Dunn
“unless I am being really stupid”

Lucky for that caveat. Feeling rather stupid for this late effort.

Thanks so much.  Help greatly appreciated.

P.



On 6/Nov/17, 9:51 am, "Iñaki Úcar"  wrote:

2017-11-06 0:09 GMT+01:00 Peter Dunn :
> Impossible or not… it just happened (unless I am being really stupid, 
which
> is entirely possible, indeed probable). I confirmed again this morning:
> After rebuilding (R CMD build) and checking (R CMD check) without any
> errors, I used rhub and the command line again:
>
>
> Running valgrind at the command line, I get this error:
>
> ==5097== Conditional jump or move depends on uninitialised value(s)
> ==5097== at 0x1118F61FB: smallp_ (in
> /Users/pdunn2/Library/R/3.4/library/tweedie/libs/tweedie.so)

What I meant is that, if you run the script in tweedie.Rcheck from the
command line, Rscript uses your *installed* version of tweedie, not
the tarball you built with R CMD build. So if you didn't run R CMD
INSTALL, Rscript is running an old version without any fix, hence the
disagreement with R CMD check.

Iñaki



USC, Locked Bag 4, Maroochydore DC, Queensland, 4558 Australia.
CRICOS Provider No: 01595D
Please consider the environment before printing this email.
This email is confidential. If received in error, please delete it from your 
system.

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Package valgrind problem I can't solve: Direction?

2017-11-05 Thread Merlise Clyde, Ph.D.
Peter,

I ran into similar problems with using valgrind to check  my package  BAS

From my understanding using valgrind with rhub does not run the same checks as

R -d "valgrind --tool=memcheck --leak-check=full" --vanilla < mypkg-Ex.R


see https://github.com/r-hub/rhub/issues/23
which might explain why it will run without errors there but the CRAN check 
will flag errors/warnings.  (perhaps someone else can confirm)


best,
Merlise


Merlise A Clyde
Professor & Chair Department of Statistical Science
Duke University
http://stat.duke.edu/~clyde

cl...@duke.edu
919 681 8440




On Nov 5, 2017, at 7:05 PM, Peter Dunn 
mailto:pdu...@usc.edu.au>> wrote:

“unless I am being really stupid”

Lucky for that caveat. Feeling rather stupid for this late effort.

Thanks so much.  Help greatly appreciated.

P.



On 6/Nov/17, 9:51 am, "Iñaki Úcar" 
mailto:i.uca...@gmail.com>> wrote:

   2017-11-06 0:09 GMT+01:00 Peter Dunn 
mailto:pdu...@usc.edu.au>>:
Impossible or not… it just happened (unless I am being really stupid, which
is entirely possible, indeed probable). I confirmed again this morning:
After rebuilding (R CMD build) and checking (R CMD check) without any
errors, I used rhub and the command line again:


Running valgrind at the command line, I get this error:

==5097== Conditional jump or move depends on uninitialised value(s)
==5097== at 0x1118F61FB: smallp_ (in
/Users/pdunn2/Library/R/3.4/library/tweedie/libs/tweedie.so)

   What I meant is that, if you run the script in tweedie.Rcheck from the
   command line, Rscript uses your *installed* version of tweedie, not
   the tarball you built with R CMD build. So if you didn't run R CMD
   INSTALL, Rscript is running an old version without any fix, hence the
   disagreement with R CMD check.

   Iñaki



USC, Locked Bag 4, Maroochydore DC, Queensland, 4558 Australia.
CRICOS Provider No: 01595D
Please consider the environment before printing this email.
This email is confidential. If received in error, please delete it from your 
system.

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel&d=DwIGaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=NOkxkvdFOOffXzeTY2kgZQ&m=wQM2pJJEon1zRq8pImHXAnjSO5MT728HIQf-oNWJfAo&s=VTJwkGdmvI9lNBVHxBc_38mQ16_pBYZ3dLnKdZBvBwg&e=


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel