Skip to content
Prev 13174 / 21307 Next

[Bioc-devel] vignette problems

Hi --

I'm not sure what you mean; the 'devel' builld report does not include 
mac (the build system experienced problems with disk space last night, 
so the build did not complete)

   https://bioconductor.org/checkResults/devel/bioc-LATEST/STAN/

and STAN failed in Release

   https://bioconductor.org/checkResults/release/bioc-LATEST/STAN/


HOWEVER, I spent some time with your package. First, I compiled it with 
compiler flages -Wall -pedantic, which makes the compiler quite 
sensitive. I did this by creating, on my Linux, a file

     $ cat ~/.R/Makevars
     CFLAGS = -g -O0 -Wall -pedantic
     CXXFLAGS = -g -O0 -Wall -pedantic

and then installing the package from the source directory

     STAN master$ rm -f src/*o && R CMD INSTALL .

There were a number of minor issues (unused variables, incorrect printf 
formatting [and use of printf() rather than Rprintf()]) as well as 
somewhat more substantial problems (virtual destructors for polymorphic 
base classes); a few problems remain, of the form

     RWrapper.cpp:950:5: warning: control reaches end of non-void 
function [-Wreturn-type]
      }

where the problem is obvious -- no return value if parallel != 0 -- but 
also innocuous, since it seems from inspection that in fact this 
function is always invoked with parallel == 0

     HMM* createHMM(int parallel, int K, InitialProbability* initProb, 
TransitionMatrix* transMat, EmissionFunction** myEmissions)
     {
         if(parallel == 0)
         {
             return new HMM(K, initProb, transMat, myEmissions);
         }
     }

You should fix these problems, e.g., by removing the parallel argument 
from the function and body. After cleaning up as best I could, I install 
the package again and ran the vignette through valgrind

     STAN master$ R CMD INSTALL .
     ...
     STAN master$ cd vignettes
     STAN/vignettes master$ R CMD Stangle STAN-knitr.Rnw
     STAN/vignettes master$ R CMD Stangle STAN-knitr.Rnw
     STAN/vignettes master$ R -d valgrind -f STAN-knitr.R

leading to an about mismatched new[] / delete[] -- memory allocated by 
'new x[]' must be deleted with 'delete[]', but the package code had 
simply 'delete'.

With these changes, the vignette builds without segfaulting or valgrind 
errors on my machine, and on the Mac builder; I did not check the full 
build and check of the package.

The changes are summarized in the following commits:

     STAN master$ git log --oneline
     a719f42 version bump
     b8e2123 make destructors for polymorhpic base classes virtual
     18ac6ba mismatch new[] / delete[]
     985768b restore EmissionFactory::createEmissionFunctionMixed
     8b749db provide return value for non-void functions
     26ca36e update poor printf statements
     0bb83ab clear 'unused variable' -Wall -pedantic warnings
     a3b7666 remove vignette product STAN-knitr.R

You should pull these down to your local git repository, e.g., for me I have

     STAN master$ git remote -v
     origin	git at git.bioconductor.org:packages/STAN (fetch)
     origin	git at git.bioconductor.org:packages/STAN (push)

So I would

     STAN master$ git pull origin master

to incorporate the changes.

It would be good to port these changes to the RELEASE_3_6 branch; 
remember to bump the version of the RELEASE_3_6 branch to 2.6.1.

Unfortunately, I pushed the changes after tonight's builds started, so 
the effect of the changes will not be reported until Thursday 
mid-morning, Eastern time, if the build system does not have problems.

Martin
On 04/10/2018 02:14 PM, campos wrote:
This email message may contain legally privileged and/or...{{dropped:2}}