Hi,
We are having tremendous problems building a stable installation of TMB with R 4.2.*
We build a linux container that includes R 4.2, Intel MKL, and TMB 1.7.16. We have been doing this successfully for many years with previous versions of R, although building a new image has always been troublesome. The hardest part is getting TMB to link.
Currently we are unable to create a usable implementation. Our problems are:
Building with TMB 1.8.1 failed because there were undefined symbols. We modified the Makefile to get around that, but then the model would not converge, even though it converged in a build from several years ago using R 3.6.1
If we use a non-optimized (standard without AD) build it converges, it fails on an optimized (TMB with AD) build. The non-optimized build is too slow.
The libraries we used in the linking command we used in this case was:
"-Wl,--no-as-needed -lmkl_gf_lp64 -Wl,--start-group -lmkl_gnu_thread -lmkl_core -Wl,--end-group -fopenmp -ldl -lpthread -lm \"
Builds with 1.9.0 crashed due to a double memory-free error:
> obj <- MakeADFun(tmb_data, tmb_par, random =
c("B", paste0("re", 1:4)), DLL = paste0("mod_",
model), map = map)
4 regions found.
Using 1 threads
double free or corruption (!prev)
/ihme/singularity-images/rstudio/shells/interactiveR.sh: line 91: 1908998
Aborted singularity exec -B '/mnt,/tmp/singularity_limingxu/1908979:/tmp'
/tmp/image_cache/ba98d68b123191aa326c93bac6bf1e3b.img /bin/bash -c "umask
002 && /usr/local/bin/R"
A build with oipenblas is easy to make, but our code includes mkl.h from Intel, so that is of no use to us.
We tried using gdb to find the memory error but could not.
What does SuiteSparse do? We suspect that it and metis might be part of the problemSo, we have three problems