* using log directory ‘/data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba.Rcheck’ * using R Under development (unstable) (2018-07-14 r74960) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘R2Cuba/DESCRIPTION’ ... OK * this is package ‘R2Cuba’ version ‘1.1-0’ * package encoding: UTF-8 * 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 ‘R2Cuba’ can be installed ... [32s/35s] WARNING Found the following significant warnings: vegas_Vegas.c:164:5: warning: ‘strncpy’ specified bound 128 equals destination size [-Wstringop-truncation] See ‘/data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba.Rcheck/00install.out’ for details. * 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 ... OK * checking tests ... [41s/42s] ERROR Running ‘Gtilde2.R’ Comparing ‘Gtilde2.Rout’ to ‘Gtilde2.Rout.save’ ... OK Running ‘MWE.R’ [31s/32s] Comparing ‘MWE.Rout’ to ‘MWE.Rout.save’ ... OK Running ‘cuhre.R’ Comparing ‘cuhre.Rout’ to ‘cuhre.Rout.save’ ... OK Running ‘divonne.R’ Running ‘peak.R’ Comparing ‘peak.Rout’ to ‘peak.Rout.save’ ... OK Running ‘suave.R’ Comparing ‘suave.Rout’ to ‘suave.Rout.save’ ... OK Running ‘vegas.R’ Running the tests in ‘tests/divonne.R’ failed. Complete output: > #dyn.load("../src/R2Cuba.so");source("../R/divonne.R");source("../R/commoncuba.R") > library("R2Cuba") > # DEMO EXAMPLES > # +++++++++++++++++++++++++++++++ > integrand <- function(arg, phase) { + x <- arg[1] + y <- arg[2] + z <- arg[3] + # cat("PHASE", phase) + ff <- sin(x)*cos(y)*exp(z); + return(ff) + } # fin integrand > > NDIM <- 3 > NCOMP <- 1 > NMAX <- 4 > divonne(NDIM, NCOMP, integrand, flags=list(verbose=3)) Divonne input parameters: ndim 3 ncomp 1 rel.tol 0.001 abs.tol 4.93038e-32 pseudo.random 0 final 0 verbose 3 min.eval 0 max.eval 50000 key1 47 key2 1 key3 1 max.pass 5 border 0 max.chisq 10 min.deviation 0.25 ngiven 0 nextra 0 Partitioning phase: Iteration 1 (pass 0): 8 regions 836 integrand evaluations so far, 406 in optimizing regions, 70 in finding cuts [1] 0.665011 +- 0.00470198 Iteration 2 (pass 0): 9 regions 966 integrand evaluations so far, 478 in optimizing regions, 80 in finding cuts [1] 0.664964 +- 0.00429467 Iteration 3 (pass 1): 10 regions 1096 integrand evaluations so far, 550 in optimizing regions, 90 in finding cuts [1] 0.664949 +- 0.00388393 Iteration 4 (pass 2): 11 regions 1194 integrand evaluations so far, 590 in optimizing regions, 100 in finding cuts [1] 0.664887 +- 0.0035842 Iteration 5 (pass 3): 12 regions 1308 integrand evaluations so far, 646 in optimizing regions, 110 in finding cuts [1] 0.664853 +- 0.0033385 Iteration 6 (pass 4): 13 regions 1438 integrand evaluations so far, 718 in optimizing regions, 120 in finding cuts [1] 0.664825 +- 0.0031276 Iteration 7 (pass 5): 14 regions 1568 integrand evaluations so far, 790 in optimizing regions, 130 in finding cuts [1] 0.664816 +- 0.00292074 Main integration on 14 regions with 211 samples per region. Region (0.500000) - (1.000000) (0.500000) - (1.000000) (0.750000) - (1.000000) [1] 0.0734093 +- 0.000973987(0) 0.0734148 +- 0.000216954(0) chisq 3.01079e-05 Region (0.500000) - (1.000000) (0.500000) - (1.000000) (0.250000) - (0.500000) [1] 0.044525 +- 0.000590753(0) 0.0445283 +- 0.000131589(0) chisq 3.01079e-05 Region (0.500000) - (1.000000) (0.000000) - (0.500000) (0.250000) - (0.500000) [1] 0.0589836 +- 0.000570564(0) 0.0589702 +- 0.000127093(0) chisq 0.000521926 Region (0.000000) - (0.500000) (0.000000) - (0.500000) (0.000000) - (0.500000) [1] 0.0381429 +- 0.00113948(0) 0.0380717 +- 0.000253818(0) chisq 0.00371754 Region (0.000000) - (0.500000) (0.500000) - (1.000000) (0.000000) - (0.500000) [1] 0.0287671 +- 0.000993733(0) 0.028742 +- 0.000221353(0) chisq 0.00060887 Region (0.500000) - (1.000000) (0.000000) - (0.500000) (0.750000) - (1.000000) [1] 0.0972475 +- 0.000940702(0) 0.0972254 +- 0.00020954(0) chisq 0.000521926 Region (0.000000) - (0.500000) (0.000000) - (0.500000) (0.750000) - (1.000000) [1] 0.0353188 +- 0.000882485(0) 0.0352871 +- 0.000196572(0) chisq 0.00122497 Region (0.000000) - (0.500000) (0.500000) - (1.000000) (0.750000) - (1.000000) [1] 0.0266444 +- 0.000769162(0) 0.026641 +- 0.00017133(0) chisq 1.87223e-05 Region (0.500000) - (1.000000) (0.000000) - (0.500000) (0.500000) - (0.750000) [1] 0.0757364 +- 0.000735203(0) 0.0757192 +- 0.000163766(0) chisq 0.000518264 Region (0.500000) - (1.000000) (0.500000) - (1.000000) (0.500000) - (0.750000) [1] 0.0571712 +- 0.000759382(0) 0.0571755 +- 0.000169152(0) chisq 3.00413e-05 Region (0.000000) - (0.500000) (0.000000) - (0.500000) (0.500000) - (0.750000) [1] 0.0275063 +- 0.000690701(0) 0.0274817 +- 0.000153853(0) chisq 0.00121287 Region (0.000000) - (0.500000) (0.500000) - (1.000000) (0.500000) - (0.750000) [1] 0.0207507 +- 0.000600894(0) 0.0207481 +- 0.000133848(0) chisq 1.86059e-05 Region (0.500000) - (1.000000) (0.000000) - (0.500000) (0.000000) - (0.250000) [1] 0.0459364 +- 0.000445923(0) 0.045926 +- 9.93288e-05(0) chisq 0.000518264 Region (0.500000) - (1.000000) (0.500000) - (1.000000) (0.000000) - (0.250000) [1] 0.0346761 +- 0.000460589(0) 0.0346787 +- 0.000102596(0) chisq 3.00413e-05 Totals: [1] 0.66462 +- 0.000635028 chisq 0.00900226 (14 df) integral: 0.6646195 (+-0.00064) nregions: 14; number of evaluations: 3052; probability: 1.110223e-16 > # ------------------------------------------------------------ > # Essai avec des arguments ... > integrandp <- function(arg, phase, ...) { + x <- arg[1] + y <- arg[2] + z <- arg[3] + #print("i", ...) + ff <- sin(x)*cos(y)*exp(z); + return(ff) + } # fin integrandp > divonne(NDIM, NCOMP, integrandp, quote=FALSE, flags=list(verbose=0)) integral: 0.6646195 (+-0.00064) nregions: 14; number of evaluations: 3052; probability: 1.110223e-16 > > > # ------------------------------------------------------------ > # Essai en déplacant les bornes > integrand2 <- function(arg,phase, a) { + x <- arg[1] + y <- arg[2] + z <- arg[3] + ff <- sin(x-3)*cos(y-2)*exp(z-1); + return(ff) + } # End integrand2 > divonne(NDIM, NCOMP, integrand2, lower=c(3,2,1), upper=c(4,3,2), flags=list(verbose=3)) Divonne input parameters: ndim 3 ncomp 1 rel.tol 0.001 abs.tol 4.93038e-32 pseudo.random 0 final 0 verbose 3 min.eval 0 max.eval 50000 key1 47 key2 1 key3 1 max.pass 5 border 0 max.chisq 10 min.deviation 0.25 ngiven 0 nextra 0 Partitioning phase: Iteration 1 (pass 0): 8 regions 836 integrand evaluations so far, 406 in optimizing regions, 70 in finding cuts [1] 0.665011 +- 0.00470198 Iteration 2 (pass 0): 9 regions 966 integrand evaluations so far, 478 in optimizing regions, 80 in finding cuts [1] 0.664964 +- 0.00429467 Iteration 3 (pass 1): 10 regions 1096 integrand evaluations so far, 550 in optimizing regions, 90 in finding cuts [1] 0.664949 +- 0.00388393 Iteration 4 (pass 2): 11 regions 1194 integrand evaluations so far, 590 in optimizing regions, 100 in finding cuts [1] 0.664887 +- 0.0035842 Iteration 5 (pass 3): 12 regions 1308 integrand evaluations so far, 646 in optimizing regions, 110 in finding cuts [1] 0.664853 +- 0.0033385 Iteration 6 (pass 4): 13 regions 1438 integrand evaluations so far, 718 in optimizing regions, 120 in finding cuts [1] 0.664825 +- 0.0031276 Iteration 7 (pass 5): 14 regions 1568 integrand evaluations so far, 790 in optimizing regions, 130 in finding cuts [1] 0.664816 +- 0.00292074 Main integration on 14 regions with 211 samples per region. Region (3.500000) - (4.000000) (2.500000) - (3.000000) (1.750000) - (2.000000) [1] 0.0734093 +- 0.000973987(0) 0.0734148 +- 0.000216954(0) chisq 3.01079e-05 Region (3.500000) - (4.000000) (2.500000) - (3.000000) (1.250000) - (1.500000) [1] 0.044525 +- 0.000590753(0) 0.0445283 +- 0.000131589(0) chisq 3.01079e-05 Region (3.500000) - (4.000000) (2.000000) - (2.500000) (1.250000) - (1.500000) [1] 0.0589836 +- 0.000570564(0) 0.0589702 +- 0.000127093(0) chisq 0.000521926 Region (3.000000) - (3.500000) (2.000000) - (2.500000) (1.000000) - (1.500000) [1] 0.0381429 +- 0.00113948(0) 0.0380717 +- 0.000253818(0) chisq 0.00371754 Region (3.000000) - (3.500000) (2.500000) - (3.000000) (1.000000) - (1.500000) [1] 0.0287671 +- 0.000993733(0) 0.028742 +- 0.000221353(0) chisq 0.00060887 Region (3.500000) - (4.000000) (2.000000) - (2.500000) (1.750000) - (2.000000) [1] 0.0972475 +- 0.000940702(0) 0.0972254 +- 0.00020954(0) chisq 0.000521926 Region (3.000000) - (3.500000) (2.000000) - (2.500000) (1.750000) - (2.000000) [1] 0.0353188 +- 0.000882485(0) 0.0352871 +- 0.000196572(0) chisq 0.00122497 Region (3.000000) - (3.500000) (2.500000) - (3.000000) (1.750000) - (2.000000) [1] 0.0266444 +- 0.000769162(0) 0.026641 +- 0.00017133(0) chisq 1.87223e-05 Region (3.500000) - (4.000000) (2.000000) - (2.500000) (1.500000) - (1.750000) [1] 0.0757364 +- 0.000735203(0) 0.0757192 +- 0.000163766(0) chisq 0.000518264 Region (3.500000) - (4.000000) (2.500000) - (3.000000) (1.500000) - (1.750000) [1] 0.0571712 +- 0.000759382(0) 0.0571755 +- 0.000169152(0) chisq 3.00413e-05 Region (3.000000) - (3.500000) (2.000000) - (2.500000) (1.500000) - (1.750000) [1] 0.0275063 +- 0.000690701(0) 0.0274817 +- 0.000153853(0) chisq 0.00121287 Region (3.000000) - (3.500000) (2.500000) - (3.000000) (1.500000) - (1.750000) [1] 0.0207507 +- 0.000600894(0) 0.0207481 +- 0.000133848(0) chisq 1.86059e-05 Region (3.500000) - (4.000000) (2.000000) - (2.500000) (1.000000) - (1.250000) [1] 0.0459364 +- 0.000445923(0) 0.045926 +- 9.93288e-05(0) chisq 0.000518264 Region (3.500000) - (4.000000) (2.500000) - (3.000000) (1.000000) - (1.250000) [1] 0.0346761 +- 0.000460589(0) 0.0346787 +- 0.000102596(0) chisq 3.00413e-05 Totals: [1] 0.66462 +- 0.000635028 chisq 0.00900226 (14 df) integral: 0.6646195 (+-0.00064) nregions: 14; number of evaluations: 3052; probability: 1.110223e-16 > # ------------------------------------------------------------ > # Essai avec mersenne.seed > EPSREL <- 1e-3 > EPSABS <- 1e-12 > divonne(NDIM, NCOMP, integrand, + rel.tol=EPSREL, abs.tol=EPSABS, + flags=list(verbose=0, pseudo.random=1, mersenne.seed=10)) integral: 0.6646195 (+-0.00064) nregions: 14; number of evaluations: 3052; probability: 1.110223e-16 > # --------------------------------------------------------------- > # Essai d'intégrande a pls composantes > integrand3 <- function(arg, phase,a) { + x <- arg[1] + y <- arg[2] + z <- arg[3] + ff <- sin(x)*cos(y)*exp(z); + gg <- 1/(3.75 - cos(pi*x) - cos(pi*y) - cos(pi*z)); + return(c(ff,gg)) + } # End integrand3 > divonne(NDIM,2, integrand3, flags=list(verbose=3)) Divonne input parameters: ndim 3 ncomp 2 rel.tol 0.001 abs.tol 4.93038e-32 pseudo.random 0 final 0 verbose 3 min.eval 0 max.eval 50000 key1 47 key2 1 key3 1 max.pass 5 border 0 max.chisq 10 min.deviation 0.25 ngiven 0 nextra 0 Partitioning phase: ================================================================= ==16461==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffdff4c6788 at pc 0x7fa24ab666fc bp 0x7ffdff4c64e0 sp 0x7ffdff4c64d0 READ of size 8 at 0x7ffdff4c6788 thread T0 #0 0x7fa24ab666fb in SolveEqs /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Split.c:131 #1 0x7fa24ab67b69 in FindCuts /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Split.c:228 #2 0x7fa24ab6a87d in Split /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Split.c:296 #3 0x7fa24ab3018e in Explore /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Explore.c:186 #4 0x7fa24ab427a5 in divonneIntegrate /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Integrate.c:121 #5 0x7fa24ab2ccb1 in Divonne /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Divonne.c:232 #6 0x579f02 in do_dotCode /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1915 #7 0x61989e in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6787 #8 0x63eb3f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:624 #9 0x643c95 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1777 #10 0x63f043 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:747 #11 0x6b4afe in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:258 #12 0x6b52d0 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:308 #13 0x6b5404 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1082 #14 0x4178e8 in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29 #15 0x7fa257b4818a in __libc_start_main (/lib64/libc.so.6+0x2318a) #16 0x41a019 in _start (/data/gannet/ripley/R/gcc-SAN/bin/exec/R+0x41a019) Address 0x7ffdff4c6788 is located in stack of thread T0 SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow /data/gannet/ripley/R/packages/tests-gcc-SAN/R2Cuba/src/divonne_Split.c:131 in SolveEqs Shadow bytes around the buggy address: 0x10003fe90ca0: 00 00 00 00 00 00 00 00 00 00 00 00 ca ca ca ca 0x10003fe90cb0: 00 00 00 00 00 00 cb cb cb cb cb cb 00 00 00 00 0x10003fe90cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003fe90cd0: 00 00 00 00 00 00 00 00 00 00 00 00 ca ca ca ca 0x10003fe90ce0: 00 00 00 00 00 00 cb cb cb cb cb cb 00 00 00 00 =>0x10003fe90cf0: ca[ca]ca ca 00 00 00 00 00 00 00 00 00 00 00 00 0x10003fe90d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003fe90d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003fe90d20: 00 00 00 00 00 00 00 00 00 00 cb cb cb cb cb cb 0x10003fe90d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003fe90d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ==16461==ABORTING * DONE Status: 1 ERROR, 1 WARNING