Hi Murray,
On 4 March 2024 at 07:03, Murray Efford wrote: | Dirk | Thanks for a very helpful reply. I'll simplify my return values. | | I mentioned Intel with rhub2 in my earlier post here, but I'm sorry | that was somewhat buried. Debugging is somewhere between painful and | impossible when my only check is submitting to CRAN! It would be *really* helpful to have a path not involving CRAN. | Also, I had tried valgrind, but that got stuck in Linux on what I | assumed was an unrelated "unhandled instruction" error wrt OpenBLAS. | That appeared unrelated, but maybe we need to factor it in as a | possible interaction with RcppArmadillo. Strangely valgrind sticks on | this -- | ==2242833== valgrind: Unrecognised instruction at address 0x57d3650. | ==2242833== at 0x57D3650: dot_compute (in | /opt/OpenBLAS/lib/libopenblas_skylakexp-r0.3.23.dev.so) | -- even after I have set options(matprod="internal") in R, so | something else (RcppArmadillo?) must be trying to use OpenBLAS. That seems local to your system. I can just do 'R -d valgrind' as expected. edd@rob:~$ R -q -d valgrind -e 'v <- integer(10)' ==2219911== Memcheck, a memory error detector ==2219911== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==2219911== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info ==2219911== Command: /usr/lib/R/bin/exec/R -q -e v~+~\<-~+~integer(10) ==2219911== > v <- integer(10) > > ==2219911== ==2219911== HEAP SUMMARY: ==2219911== in use at exit: 51,025,490 bytes in 11,017 blocks ==2219911== total heap usage: 26,520 allocs, 15,503 frees, 78,392,784 bytes allocated ==2219911== ==2219911== LEAK SUMMARY: ==2219911== definitely lost: 0 bytes in 0 blocks ==2219911== indirectly lost: 0 bytes in 0 blocks ==2219911== possibly lost: 0 bytes in 0 blocks ==2219911== still reachable: 51,025,490 bytes in 11,017 blocks ==2219911== of which reachable via heuristic: ==2219911== newarray : 4,264 bytes in 1 blocks ==2219911== suppressed: 0 bytes in 0 blocks ==2219911== Reachable blocks (those to which a pointer was found) are not shown. ==2219911== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==2219911== ==2219911== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) edd@rob:~$ valgrind is pretty good and useful. I also enjoy the fact that eg tinytest testfiles are script so we can test them in the aggregate, or in isolation, or via their helper function. edd@rob:~/git/rcpparmadillo/inst/tinytest(master)$ R -q -d valgrind -e 'tinytest::run_test_file("test_fastLm.R")' ==2243731== Memcheck, a memory error detector ==2243731== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==2243731== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info ==2243731== Command: /usr/lib/R/bin/exec/R -q -e tinytest::run_test_file("test_fastLm.R") ==2243731== > tinytest::run_test_file("test_fastLm.R") test_fastLm.R................. 30 tests OK 4.3s All ok, 30 results (4.3s) > > ==2243731== ==2243731== HEAP SUMMARY: ==2243731== in use at exit: 58,200,576 bytes in 11,419 blocks ==2243731== total heap usage: 38,070 allocs, 26,651 frees, 141,466,157 bytes allocated ==2243731== ==2243731== LEAK SUMMARY: ==2243731== definitely lost: 0 bytes in 0 blocks ==2243731== indirectly lost: 0 bytes in 0 blocks ==2243731== possibly lost: 0 bytes in 0 blocks ==2243731== still reachable: 58,200,576 bytes in 11,419 blocks ==2243731== of which reachable via heuristic: ==2243731== newarray : 4,264 bytes in 1 blocks ==2243731== suppressed: 0 bytes in 0 blocks ==2243731== Reachable blocks (those to which a pointer was found) are not shown. ==2243731== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==2243731== ==2243731== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) edd@rob:~/git/rcpparmadillo/inst/tinytest(master)$ Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel