* using log directory ‘/data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM.Rcheck’ * using R Under development (unstable) (2018-02-09 r74240) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘MGGM/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘MGGM’ version ‘1.0’ * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package ‘MGGM’ can be installed ... [13s/13s] OK * checking package directory ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking compiled code ... OK * checking examples ... ERROR Running examples in ‘MGGM-Ex.R’ failed The error most likely occurred in: > ### Name: MGGM.path > ### Title: Solution path of multiple Gaussion graph model > ### Aliases: MGGM.path > > ### ** Examples > > library(MASS) > > ## generating L true sparse precision and covariance matrices > L <- num_of_matrix <- 4 > ## two different underlying matrices > L0 <- 2 > p <- dim_of_matrix <- 20 > n <- 120 #number of observations for each l > nn <- rep(n,L) > MAX_iter <- 200 #max number of iterations > > Gene_cov<-function(p){ + sigma <- runif(p-1,0.5,1) + covmat0 <- diag(1,p) + for (i in 1:(p-1)){ + for (j in (i+1):p){ + temp <- exp(-sum(sigma[i:(j-1)]/2)) + covmat0[i,j] <- temp + covmat0[j,i] <- temp + } + } + return(covmat0) + } > covmat1 <- Gene_cov(p) > covmat_inverse1 <- solve(covmat1) > covmat2 <- Gene_cov(p) > covmat_inverse2 <- solve(covmat2) > > ## set first L/2 and last L/2 matrices to be the same > covmat0 <- cbind(matrix(rep(covmat1,L/2),p,p*L/2), matrix(rep(covmat2,L/2),p,p*L/2)) > covmat_inverse0 <- cbind(matrix(rep(covmat_inverse1,L/2),p,p*L/2), + matrix(rep(covmat_inverse2,L/2),p,p*L/2)) > > > ## generating sample covariance matrices S_bar = [S_1, ... S_L] > S_bar <- matrix(0,p,L*p) > for (l in 1:L){ + temp <- mvrnorm(n = nn[l], rep(0,p), covmat0[,((l-1)*p+1):(l*p)]) + S_bar[,((l-1)*p+1):(l*p)] <- crossprod(temp) / nn[l] + } > > > ## matrices generation ends > Lambda1.vec <- log(p)*c(.8, .5, .4, .3, 0.2) #lasso penlaty > Lambda2.vec <- log(p)*c(.1, .08, .06, .05, .04, .03, .0) #grouping penalty > tau <- c(0.01) #thresholding parameter > > ## generating graphs > graph_complete = matrix(0,2,L*(L-1)/2) > for (l1 in 1:(L-1)){ + graph_complete[,(L*(l1-1)-(l1-1)*l1/2+1):(L*l1-l1*(l1+1)/2)] = rbind(rep(l1,L-l1),(l1+1):L) + } > graph <- graph_complete - 1 > > sol_path <- MGGM.path(S_bar, nn, Lambda1.vec, Lambda2.vec, graph, tau) ================================================================= ==14568==ERROR: AddressSanitizer: heap-use-after-free on address 0x6160000e6780 at pc 0x7f40b27f23d0 bp 0x7ffe714a0500 sp 0x7ffe714a04f0 READ of size 8 at 0x6160000e6780 thread T0 #0 0x7f40b27f23cf in zero_agree /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:122 #1 0x7f40b27f8b45 in solve_lasso /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:292 #2 0x7f40b2803948 in solve_grouping /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:399 #3 0x7f40b2804a7a in matrix_grouping_sub /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:491 #4 0x7f40b2807123 in matrix_grouping_path /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:655 #5 0x58cd63 in do_dotCode /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1813 #6 0x618d6c in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6766 #7 0x644987 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:624 #8 0x649a75 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1764 #9 0x644e76 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:747 #10 0x650ef3 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2774 #11 0x6454ec in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:699 #12 0x6b86ce in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:258 #13 0x6b90b0 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:308 #14 0x6ba7c4 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1082 #15 0x4210d8 in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29 #16 0x7f40bf8b7889 in __libc_start_main (/lib64/libc.so.6+0x20889) #17 0x4237f9 in _start (/data/gannet/ripley/R/gcc-SAN/bin/exec/R+0x4237f9) 0x6160000e6780 is located 0 bytes inside of 608-byte region [0x6160000e6780,0x6160000e69e0) freed by thread T0 here: #0 0x7f40c31944b8 in __interceptor_free (/lib64/libasan.so.4+0xde4b8) #1 0x7f40b27f8b30 in solve_lasso /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:291 #2 0x7f40b2803948 in solve_grouping /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:399 #3 0x7f40b2804a7a in matrix_grouping_sub /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:491 #4 0x7f40b2807123 in matrix_grouping_path /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:655 #5 0x58cd63 in do_dotCode /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1813 previously allocated by thread T0 here: #0 0x7f40c3194850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7f40b27f81a8 in solve_lasso /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:233 #2 0x7f40b2803948 in solve_grouping /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:399 #3 0x7f40b2804a7a in matrix_grouping_sub /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:491 #4 0x7f40b2807123 in matrix_grouping_path /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:655 #5 0x58cd63 in do_dotCode /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1813 SUMMARY: AddressSanitizer: heap-use-after-free /data/gannet/ripley/R/packages/tests-gcc-SAN/MGGM/src/main.cpp:122 in zero_agree Shadow bytes around the buggy address: 0x0c2c80014ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2c80014cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2c80014cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2c80014cd0: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa 0x0c2c80014ce0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c2c80014cf0:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c80014d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c80014d10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c80014d20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2c80014d30: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa 0x0c2c80014d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==14568==ABORTING * DONE Status: 1 ERROR