==3996694== Memcheck, a memory error detector ==3996694== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==3996694== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info ==3996694== Command: /data/blackswan/ripley/R/R-devel-vg/bin/exec/R -f testthat.R --restore --save --no-readline --vanilla ==3996694== R Under development (unstable) (2026-05-11 r90046) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(harmony) Loading required package: Rcpp • This is Harmony2 version 2.0.3 • Read the guide: run vignette() • Get help: Visit the website at https://korsunskylab.github.io/harmony2/ and report issues on https://github.com/immunogenomics/harmony/issues > > test_check("harmony") 270exists, retrying for cluster 15 3.29648 115exists, retrying for cluster 25 3.3598 188exists, retrying for cluster 33 3.23944 26exists, retrying for cluster 33 2.8872 249exists, retrying for cluster 33 1.30963 62exists, retrying for cluster 36 1.95639 62exists, retrying for cluster 42 2.65726 9exists, retrying for cluster 45 3.00726 136exists, retrying for cluster 46 1.49259 187exists, retrying for cluster 16 3.09328 69exists, retrying for cluster 19 2.71005 ==3996694== Invalid write of size 4 ==3996694== at 0x1EDB9105: partial_sum<__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::plus > (/usr/include/c++/14/bits/stl_numeric.h:316) ==3996694== by 0x1EDB9105: harmony::setup(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool) (packages/tests-vg/harmony/src/harmony.cpp:98) ==3996694== by 0x1EDEA025: operator() (R-devel/site-library/Rcpp/include/Rcpp/Module.h:385) ==3996694== by 0x1EDEA025: SEXPREC* Rcpp::internal::call_impl const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**)::{lambda(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool)#1}, void, arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, (void*)0>(Rcpp::CppMethodImplN const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**)::{lambda(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool)#1} const&, SEXPREC**, Rcpp::internal::type_pack const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>, Rcpp::traits::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13>) [clone .isra.0] (R-devel/site-library/Rcpp/include/Rcpp/internal/call.h:31) ==3996694== by 0x1EDEA364: call&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool>::operator()(harmony*, SEXPREC**)::&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool)>, void, const arma::Mat&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool> (R-devel/site-library/Rcpp/include/Rcpp/internal/call.h:47) ==3996694== by 0x1EDEA364: Rcpp::CppMethodImplN const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/Module.h:387) ==3996694== by 0x1EDC6E8A: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:219) ==3996694== by 0x1B2B6F4F: CppMethod__invoke_void(SEXPREC*) (/tmp/Rtmpf3PshP/R.INSTALL3331317aa6f58d/Rcpp/src/module.cpp:200) ==3996694== by 0x4A73ED: do_External (svn/R-devel/src/main/dotcode.c:576) ==3996694== by 0x4F4997: Rf_eval (svn/R-devel/src/main/eval.c:1258) ==3996694== by 0x4F7EE4: do_begin (svn/R-devel/src/main/eval.c:3001) ==3996694== by 0x4F47B2: Rf_eval (svn/R-devel/src/main/eval.c:1230) ==3996694== by 0x4F63DD: R_execClosure (svn/R-devel/src/main/eval.c:2398) ==3996694== by 0x4F709F: applyClosure_core (svn/R-devel/src/main/eval.c:2314) ==3996694== by 0x4E5B3A: Rf_applyClosure (svn/R-devel/src/main/eval.c:2333) ==3996694== by 0x4E5B3A: bcEval_loop (svn/R-devel/src/main/eval.c:8121) ==3996694== Address 0xf0c8774 is 0 bytes after a block of size 4 alloc'd ==3996694== at 0x4843FEC: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.24.0/coregrind/m_replacemalloc/vg_replace_malloc.c:487) ==3996694== by 0x1EDC84A9: allocate (/usr/include/c++/14/bits/new_allocator.h:151) ==3996694== by 0x1EDC84A9: allocate (/usr/include/c++/14/bits/allocator.h:196) ==3996694== by 0x1EDC84A9: allocate (/usr/include/c++/14/bits/alloc_traits.h:478) ==3996694== by 0x1EDC84A9: _M_allocate (/usr/include/c++/14/bits/stl_vector.h:380) ==3996694== by 0x1EDC84A9: std::vector >::_M_default_append(unsigned long) (/usr/include/c++/14/bits/vector.tcc:834) ==3996694== by 0x1EDB93BF: resize (/usr/include/c++/14/bits/stl_vector.h:1016) ==3996694== by 0x1EDB93BF: harmony::setup(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool) (packages/tests-vg/harmony/src/harmony.cpp:97) ==3996694== by 0x1EDEA025: operator() (R-devel/site-library/Rcpp/include/Rcpp/Module.h:385) ==3996694== by 0x1EDEA025: SEXPREC* Rcpp::internal::call_impl const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**)::{lambda(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool)#1}, void, arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, (void*)0>(Rcpp::CppMethodImplN const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**)::{lambda(arma::Mat const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool)#1} const&, SEXPREC**, Rcpp::internal::type_pack const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>, Rcpp::traits::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13>) [clone .isra.0] (R-devel/site-library/Rcpp/include/Rcpp/internal/call.h:31) ==3996694== by 0x1EDEA364: call&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool>::operator()(harmony*, SEXPREC**)::&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool)>, void, const arma::Mat&, const arma::SpMat&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, const std::vector >&, float, bool> (R-devel/site-library/Rcpp/include/Rcpp/internal/call.h:47) ==3996694== by 0x1EDEA364: Rcpp::CppMethodImplN const&, arma::SpMat const&, arma::Col, arma::Col, arma::Col, float, int, float, float, int, float, std::vector > const&, float, bool>::operator()(harmony*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/Module.h:387) ==3996694== by 0x1EDC6E8A: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:219) ==3996694== by 0x1B2B6F4F: CppMethod__invoke_void(SEXPREC*) (/tmp/Rtmpf3PshP/R.INSTALL3331317aa6f58d/Rcpp/src/module.cpp:200) ==3996694== by 0x4A73ED: do_External (svn/R-devel/src/main/dotcode.c:576) ==3996694== by 0x4F4997: Rf_eval (svn/R-devel/src/main/eval.c:1258) ==3996694== by 0x4F7EE4: do_begin (svn/R-devel/src/main/eval.c:3001) ==3996694== by 0x4F47B2: Rf_eval (svn/R-devel/src/main/eval.c:1230) ==3996694== by 0x4F63DD: R_execClosure (svn/R-devel/src/main/eval.c:2398) ==3996694== [ FAIL 0 | WARN 0 | SKIP 0 | PASS 25 ] > > proc.time() user system elapsed 200.615 2.259 201.761 ==3996694== ==3996694== HEAP SUMMARY: ==3996694== in use at exit: 282,986,052 bytes in 55,950 blocks ==3996694== total heap usage: 486,932 allocs, 430,982 frees, 910,177,202 bytes allocated ==3996694== ==3996694== LEAK SUMMARY: ==3996694== definitely lost: 0 bytes in 0 blocks ==3996694== indirectly lost: 0 bytes in 0 blocks ==3996694== possibly lost: 0 bytes in 0 blocks ==3996694== still reachable: 282,985,720 bytes in 55,948 blocks ==3996694== suppressed: 332 bytes in 2 blocks ==3996694== Reachable blocks (those to which a pointer was found) are not shown. ==3996694== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==3996694== ==3996694== For lists of detected and suppressed errors, rerun with: -s ==3996694== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 0 from 0)