Skip to content
Prev 13113 / 21307 Next

[Bioc-devel] vignette problems

Please use 'reply all' so that the mailing list remains engaged.

Check out the release schedule

http://bioconductor.org/developers/release-schedule/

in particular

Wednesday April 25

- Deadline for packages passing ??R CMD build?? and ??R CMD check?? 
without errors or warnings.

so you still have time to get your package in order.

Using the same techniques as before, I still see valgrind problems, the 
first being

 > hmm_fitted_poilog = fitHMM(trainRegions, hmm_poilog, 
sizeFactors=sizeFactors, maxIters=10)
==24916== Invalid write of size 4
==24916==    at 0x4BA93FD7: 
TransitionMatrix::updateAuxiliaries(double**, double***, double*, int*, 
int, int**, int, double, int) (TransitionMatrix.cpp:292)
==24916==    by 0x4BA77934: HMM::updateSampleAux(double***, int*, int, 
double**, double**, double**, double***, double*, int*, int*, int*, 
int**, double***, SEXPREC*, SEXPREC*, int, double, int, int, int) 
(HMM.cpp:771)
==24916==    by 0x4BA7896D: HMM::BaumWelch[abi:cxx11](double***, int*, 
int, int, int**, int*, int*, int*, int, int, int**, double***, SEXPREC*, 
SEXPREC*, int, double, double, int, int) (HMM.cpp:1076)
==24916==    by 0x4BA8FEFD: RHMMFit (RWrapper.cpp:1494)
==24916==    by 0x4F2992D: R_doDotCall (dotcode.c:692)
==24916==    by 0x4F339D5: do_dotcall (dotcode.c:1252)
==24916==    by 0x4F81BA6: bcEval (eval.c:6771)
==24916==    by 0x4F6E963: Rf_eval (eval.c:624)
==24916==    by 0x4F71188: R_execClosure (eval.c:1764)
==24916==    by 0x4F70E7C: Rf_applyClosure (eval.c:1692)
==24916==    by 0x4F6F18B: Rf_eval (eval.c:747)
==24916==    by 0x4F74B12: do_set (eval.c:2774)
==24916==  Address 0x2e73a294 is 4 bytes inside a block of size 5 alloc'd
==24916==    at 0x4C2DB8F: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==24916==    by 0x4BA93FA6: 
TransitionMatrix::updateAuxiliaries(double**, double***, double*, int*, 
int, int**, int, double, int) (TransitionMatrix.cpp:289)
==24916==    by 0x4BA77934: HMM::updateSampleAux(double***, int*, int, 
double**, double**, double**, double***, double*, int*, int*, int*, 
int**, double***, SEXPREC*, SEXPREC*, int, double, int, int, int) 
(HMM.cpp:771)
==24916==    by 0x4BA7896D: HMM::BaumWelch[abi:cxx11](double***, int*, 
int, int, int**, int*, int*, int*, int, int, int**, double***, SEXPREC*, 
SEXPREC*, int, double, double, int, int) (HMM.cpp:1076)
==24916==    by 0x4BA8FEFD: RHMMFit (RWrapper.cpp:1494)
==24916==    by 0x4F2992D: R_doDotCall (dotcode.c:692)
==24916==    by 0x4F339D5: do_dotcall (dotcode.c:1252)
==24916==    by 0x4F81BA6: bcEval (eval.c:6771)
==24916==    by 0x4F6E963: Rf_eval (eval.c:624)
==24916==    by 0x4F71188: R_execClosure (eval.c:1764)
==24916==    by 0x4F70E7C: Rf_applyClosure (eval.c:1692)
==24916==    by 0x4F6F18B: Rf_eval (eval.c:747)
==24916==

This seems to be the exact same code as in the problem that you fixed at 
another location. Actually, I would guess that all of these

grep --color -nH -e ")\*ncores+1" *
HMM.cpp:784:    int *myStateBuckets = (int*)malloc(sizeof(int)*ncores+1);
MultivariateGaussian.cpp:295:    int *myDimBuckets = 
(int*)malloc(sizeof(int)*ncores+1);
MultivariateGaussian.cpp:475:    int *myDimBuckets = 
(int*)malloc(sizeof(int)*ncores+1);
TransitionMatrix.cpp:132:        int *myStateBuckets = 
(int*)malloc(sizeof(int)*ncores+1);
TransitionMatrix.cpp:289:    int *myStateBuckets = 
(int*)malloc(sizeof(int)*ncores+1);

are the same problem. Also, usually code that has been copy/pasted like 
this can instead be refactored to  a single function call, so a bug can 
be fixed in one place.

I still see a number of compiler warnings, the first of which is

STAN master$ R CMD INSTALL .
Bioconductor version 3.7 (BiocInstaller 1.29.5), ?biocLite for help
* installing to library 
'/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.5-Bioc-3.7'
* installing *source* package 'STAN' ...
** libs
g++  -I"/home/mtmorgan/bin/R-3-5-branch/include" -DNDEBUG 
-I/usr/local/include  -D_RDLL_ -fopenmp  -fpic  -g -O0 -Wall -pedantic 
-c HMM.cpp -o HMM.o
HMM.cpp: In member function ?virtual void 
HMM::calcEmissionProbs(double***, double**, int*, int, int**, int*, 
int*, int**, int, int, int*)?:
HMM.cpp:112:15: warning: unused variable ?j? [-Wunused-variable]
          int i,j,t,k;
                ^
It really pays to clean these up; most are harmless, but they obscure 
the more important warnings.

Martin
On 04/03/2018 09:58 AM, campos wrote:
This email message may contain legally privileged and/or...{{dropped:2}}