* using log directory ‘/data/localhost/ripley/R/packages/tests-vg/emhawkes.Rcheck’ * using R Under development (unstable) (2026-12-01 r91013) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 16.2.1 20261029 (Red Hat 16.2.1-3) GNU Fortran (GCC) 16.2.1 20261029 (Red Hat 16.2.1-3) * running under: Fedora Linux 44 (Server Edition) * using session charset: UTF-8 * current time: 2026-12-02 13:44:06 UTC * using options ‘--use-valgrind --no-stop-on-test-error’ * checking for file ‘emhawkes/DESCRIPTION’ ... OK * this is package ‘emhawkes’ version ‘1.0.2’ * 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 ‘emhawkes’ can be installed ... [23s/24s] OK * used C++ compiler: ‘g++ (GCC) 16.2.1 20261029 (Red Hat 16.2.1-3)’ * 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 installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [43s/44s] OK * checking tests ... Running ‘auto-function-engine.R’ [108s/108s] Running ‘baseline-dispatch.R’ [45s/45s] Running ‘baseline-projection.R’ [18s/18s] Running ‘callback-history-context.R’ [20s/20s] Running ‘computation-regressions.R’ [21s/21s] Running ‘constraint-alias.R’ [98s/99s] Running ‘curvature-stress.R’ [107s/108s] Running ‘expected-wait.R’ [26s/26s] Running ‘fit-computation.R’ [103s/103s] Running ‘fit-curvature.R’ [73s/74s] Running ‘fit-messages.R’ [51s/51s] Running ‘fit-rds-session.R’ [26s/26s] Running ‘fit-reconstruction.R’ [125s/126s] Running ‘function-gradient.R’ [53s/53s] Running ‘function-numeric.R’ [32s/32s] Running ‘function-replay.R’ [32s/33s] Running ‘initialization.R’ [31s/31s] Running ‘interfaces.R’ [41s/41s] Running ‘loglik-inference.R’ [25s/25s] Running ‘native-callback-simulation.R’ [343s/345s] Running ‘native-engine.R’ [33s/33s] Running ‘native-fit.R’ [19m/19m] Running ‘native-gradient.R’ [39s/40s] Running ‘native-precision.R’ [20s/20s] Running ‘native-simulation.R’ [251s/252s] Running ‘native-unequal-simulation.R’ [250s/251s] Running ‘native-unwind.R’ [19s/19s] Running ‘observed-impact-gradient.R’ [115s/115s] Running ‘observed-impact-numeric.R’ [25s/25s] Running ‘observed-impact-replay.R’ [15s/15s] Running ‘r-callback-dispatch.R’ [34s/34s] Running ‘realization-print.R’ [15s/15s] Running ‘s4-minimal-session.R’ [14s/14s] Running ‘signed-components.R’ [41s/41s] Running ‘simulation-decay-reuse.R’ [69s/69s] Running ‘simulation-dispatch.R’ [24s/24s] Running ‘simulation-subnormal.R’ [32s/33s] Running ‘stable-final-hessian.R’ [168s/169s] Running ‘state-gradient.R’ [86s/86s] Running ‘state-impact-numeric.R’ [118s/119s] Running ‘state-replay.R’ [24s/24s] Running ‘stats-isolated-session.R’ [15s/15s] Running ‘stats-optimizer.R’ [62s/62s] Running ‘tzexp-distribution.R’ [14s/14s] Running ‘user-diagnostics.R’ [44s/44s] Running ‘volatility.R’ [24s/24s] [68m/68m] ERROR Running the tests in ‘tests/baseline-projection.R’ failed. Complete output: > library(emhawkes) > old <- options(emhawkes.engine = "auto") > close <- function(x, y, tol = 1e-12) stopifnot(isTRUE(all.equal(as.numeric(x), as.numeric(y), tolerance = tol))) > fails <- function(x, pattern) { + e <- tryCatch(force(x), error = identity) + stopifnot(inherits(e, "error"), grepl(pattern, conditionMessage(e))) + } > pack <- emhawkes:::hawkes_jacobian_path_cpp > native <- emhawkes:::hawkes_loglik_cpp > > # Compare projected scores with the original full Jacobian path, independently > # of the R planner. Column order changes at each event; callbacks retain n lazily. > for (d in c(1L, 2L, 3L, 4L, 8L)) { + dt <- c(0, .3, 0, .7, .2, 1.1, .05, .4) + type <- c(0L, (seq_len(length(dt) - 1L) - 1L) %% d + 1L) + p <- c(a = .3, b = -.2, c = .5, z = 0) + value <- function(n) outer(seq_len(d), seq_along(p), function(i, j) sin(i + j + n) / 10) + calls <- integer(); retained <- list() + jac <- function(param, n) { + calls <<- c(calls, n) + retained[[length(retained) + 1L]] <<- function() n + J <- value(n); colnames(J) <- names(param) + J[, if (n %% 2L) rev(names(param)) else names(param), drop = FALSE] + } + result <- pack(jac, list(param = p, n = 1L), d, dt, type, names(p)) + gc(FALSE) + stopifnot(identical(calls, seq_along(dt)), identical(vapply(retained, function(f) f(), 1L), seq_along(dt))) + dense <- vapply(seq_along(dt), function(n) as.vector(value(n)), numeric(d * length(p))) + if (d > 2L) { + stopifnot(is.list(result)) + close(result$initial, value(1), 0) + close(result$event[, -1L], vapply(seq_len(length(dt) - 1L) + 1L, + function(n) value(n)[type[n], ], numeric(length(p))), 0) + restored <- result$sum * 2^result$exponent + close(restored[, -1L], vapply(seq_len(length(dt) - 1L) + 1L, + function(n) colSums(value(n)), numeric(length(p))), 1e-14) + } else stopifnot(identical(result, dense)) + k <- d + 1L; m <- d * k; np <- length(p) + sensitivity <- list(mu = value(1), alpha = matrix(.003, m, np), + beta = matrix(.002, m, np), eta = matrix(0, m, np), + initial = matrix(.001, m, np), names = names(p), baseline = dense, stateful = FALSE) + args <- list(dt = dt, type = type, mark = rep(1, length(dt)), mu = rep(.8, d), + alpha = matrix(.03, d, k), beta = matrix(seq(.7, 2.3, length.out = m), d), + eta = NULL, initial = matrix(.1, d, k), mapping = lapply(seq_len(d), function(i) c(i - 1L, k - 1L)), + infer = FALSE, gradient = TRUE, baseline = matrix(.8, d, length(dt)), sensitivity = sensitivity) + reference <- do.call(native, args) + args$sensitivity$baseline <- result + actual <- do.call(native, args) + stopifnot(identical(actual$loglikelihood, reference$loglikelihood)) + close(actual$gradient, reference$gradient, 1e-13) + # Empty and short paths never evaluate an extra Jacobian index. + for (size in 1:3) { + calls <- integer() + short <- pack(jac, list(param = p, n = 1L), d, dt[seq_len(size)], type[seq_len(size)], names(p)) + stopifnot(identical(calls, seq_len(size))) + if (size == 1L) stopifnot(is.matrix(short)) + } + } > # Scaling must retain subnormal derivatives and sums larger than double range. > p <- c(small = 0, large = 0) > jac <- function(param, n) matrix(rep(c(5e-324, 1e308), each = 4), 4, + dimnames = list(NULL, names(param))) > z <- pack(jac, list(param = p, n = 1L), 4L, c(0, rep(1, 7)), c(0L, rep(1L, 7)), names(p)) > stopifnot(z$sum[1, 2] > 0, z$exponent[1, 2] < -1000, + z$sum[2, 2] >= .5, z$exponent[2, 2] > 1024) Error: z$exponent[2, 2] > 1024 is not TRUE Execution halted ==3943459== ==3943459== HEAP SUMMARY: ==3943459== in use at exit: 66,928,029 bytes in 13,580 blocks ==3943459== total heap usage: 42,006 allocs, 28,426 frees, 114,821,574 bytes allocated ==3943459== ==3943459== LEAK SUMMARY: ==3943459== definitely lost: 0 bytes in 0 blocks ==3943459== indirectly lost: 0 bytes in 0 blocks ==3943459== possibly lost: 0 bytes in 0 blocks ==3943459== still reachable: 66,928,029 bytes in 13,580 blocks ==3943459== suppressed: 0 bytes in 0 blocks ==3943459== Reachable blocks (those to which a pointer was found) are not shown. ==3943459== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==3943459== ==3943459== For lists of detected and suppressed errors, rerun with: -s ==3943459== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) * checking package vignettes ... OK * checking re-building of vignette outputs ... [59s/59s] OK * DONE Status: 1 ERROR See ‘/data/localhost/ripley/R/packages/tests-vg/emhawkes.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:10:37, 4182.41 + 30.39