From f575667f6098483b1021dc42090444bddfbbe0b9 Mon Sep 17 00:00:00 2001 From: "Aaron A. King" Date: Tue, 16 Apr 2024 17:18:47 -0400 Subject: [PATCH] use docker rchk --- .Rbuildignore | 1 + .gitignore | 4 +++- BUILD.md | 2 ++ rchk/Makefile | 14 ------------ rchk/rchk.out | 60 --------------------------------------------------- rules.mk | 6 +++--- 6 files changed, 9 insertions(+), 78 deletions(-) delete mode 100644 rchk/Makefile delete mode 100644 rchk/rchk.out diff --git a/.Rbuildignore b/.Rbuildignore index c731be93..f7afbc41 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -25,6 +25,7 @@ BUILD\.md$ \.github ^\.travis\.yml$ ^codecov\.yml$ +^rchk\.out$ ^.*\.Rproj$ ^\.Rproj\.user$ \.Rprofile diff --git a/.gitignore b/.gitignore index 659eb1e0..3cacef97 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ \.tests \.Rhistory \.Rproj.user +rchk\.out *.tar.gz *.tgz *.zip @@ -20,9 +21,10 @@ *.pdf *.sif /scripts +check lib library -check +rchk repo wiki www diff --git a/BUILD.md b/BUILD.md index c057230c..a753a384 100644 --- a/BUILD.md +++ b/BUILD.md @@ -38,6 +38,8 @@ The key targets are: - `revdeps`: causes checks of reverse-dependent packages to run. The outputs are stored under the `revdep` directory. - `rchk`: runs Kalibera's `rchk` utility. + This uses `docker` to download and run a Docker container. + The stdout for this is stored in `rchk.out`. - `session`: installs the package locally and then runs an **R** session for interactive testing. This session is controlled by the `RSESSION` environment variable. diff --git a/rchk/Makefile b/rchk/Makefile deleted file mode 100644 index b15b5d3d..00000000 --- a/rchk/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -TARBALL = $(wildcard *.tar.gz) - -rchk: rchk.sif - singularity run rchk.sif $(PWD)/$(TARBALL) | tee rchk.out - -rchk.sif: - singularity pull rchk.sif shub://kalibera/rchk:def - -clean: - $(RM) $(TARBALL) - $(RM) -r build lib libsonly - -fresh: clean - $(RM) rchk.sif diff --git a/rchk/rchk.out b/rchk/rchk.out deleted file mode 100644 index 7dcf9ef5..00000000 --- a/rchk/rchk.out +++ /dev/null @@ -1,60 +0,0 @@ - -Note: Setting PKG_ROOT variable to the current directory. -Output will be in ./lib, ./build and ./libsonly subdirectories. -If it is not, maybe your local singularity configuration does -not allow singularity container to access your current directory; -it may help to try with PKG_ROOT=/tmp or check the configurarion. - -source("/opt/rchk/scripts/utils.r"); install_package_libs("/home/kingaa/projects/Rpkg/pomp/pomp_5.7.0.2.tar.gz") -make[2]: Entering directory '/home/kingaa/projects/Rpkg/pomp/rchk/build/QeBvP5GL/pomp/src' -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c bspline.c -o bspline.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c dinit.c -o dinit.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c distributions.c -o distributions.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c dmeasure.c -o dmeasure.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c dprior.c -o dprior.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c dprocess.c -o dprocess.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c emeasure.c -o emeasure.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c euler.c -o euler.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c gompertz.c -o gompertz.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c init.c -o init.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c logmeanexp.c -o logmeanexp.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c lookup_table.c -o lookup_table.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c mif2.c -o mif2.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c ou2.c -o ou2.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c partrans.c -o partrans.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c pfilter.c -o pfilter.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c pomp_fun.c -o pomp_fun.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c probe.c -o probe.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c probe_acf.c -o probe_acf.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c probe_marginal.c -o probe_marginal.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c probe_nlar.c -o probe_nlar.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c resample.c -o resample.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c rinit.c -o rinit.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c rmeasure.c -o rmeasure.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c rprior.c -o rprior.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c rprocess.c -o rprocess.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c simulate.c -o simulate.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c skeleton.c -o skeleton.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c sobolseq.c -o sobolseq.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c ssa.c -o ssa.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c synth_lik.c -o synth_lik.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c trajectory.c -o trajectory.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c transformations.c -o transformations.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c userdata.c -o userdata.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c vmeasure.c -o vmeasure.o -/usr/local/bin/wllvm -I"/opt/R-devel/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O0 -fPIC -c wpfilter.c -o wpfilter.o -/usr/local/bin/wllvm -shared -L/usr/local/lib -o pomp.so bspline.o dinit.o distributions.o dmeasure.o dprior.o dprocess.o emeasure.o euler.o gompertz.o init.o logmeanexp.o lookup_table.o mif2.o ou2.o partrans.o pfilter.o pomp_fun.o probe.o probe_acf.o probe_marginal.o probe_nlar.o resample.o rinit.o rmeasure.o rprior.o rprocess.o simulate.o skeleton.o sobolseq.o ssa.o synth_lik.o trajectory.o transformations.o userdata.o vmeasure.o wpfilter.o -L/opt/R-devel/lib -lRlapack -L/opt/R-devel/lib -lRblas -lgfortran -lm -lquadmath -make[2]: Leaving directory '/home/kingaa/projects/Rpkg/pomp/rchk/build/QeBvP5GL/pomp/src' -Installed libraries of package pomp -[1] "/home/kingaa/projects/Rpkg/pomp/rchk/libsonly/pomp/libs/pomp.so" - -ERROR: too many states (abstraction error?) in function strptime_internal -Analyzed 263 functions, traversed 9506 states. -Library name (usually package name): pomp -Initialization function: R_init_pomp -Functions: 45 -Checked call to R_registerRoutines: 1 - -Rchk version: 3d653b7c8f92dac912532856b55f44d2986c6553 -R version: 79896/R Under development (unstable) (2021-01-28 r79896) -LLVM version: 10.0.0 diff --git a/rules.mk b/rules.mk index 9d8975de..81517279 100644 --- a/rules.mk +++ b/rules.mk @@ -133,8 +133,9 @@ session debug rsession: .session rchk: .rchk .rchk: .dist + mkdir -p rchk $(CP) $(TARBALL) rchk - make -C rchk + docker run -v $(PWD)/rchk:/rchk/packages kalibera/rchk:latest /rchk/packages/$(TARBALL) | tee rchk.out revdeps: .dist mkdir -p revdep @@ -224,10 +225,9 @@ clean: $(MAKE) -C inst/doc clean $(MAKE) -C tests clean $(MAKE) -C revdep clean - $(MAKE) -C rchk clean $(RM) .dist fresh: clean $(RM) .headers .includes .NEWS .instdocs $(RM) .install .roxy .source .testsource .roxy .tests - $(RM) -r library + $(RM) -r library rchk