Running examples in ‘customizedTraining-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: print.cv.customizedGlmnet
> ### Title: print a "cv.customizedGlmnet" object
> ### Aliases: print.cv.customizedGlmnet
> 
> ### ** Examples
> 
> require(glmnet)
Loading required package: glmnet
Loading required package: Matrix
Loaded glmnet 4.1-8
> 
> # Simulate synthetic data
> 
> n = m = 150
> p = 50
> q = 5
> K = 3
> sigmaC = 10
> sigmaX = sigmaY = 1
> set.seed(5914)
> 
> beta = matrix(0, nrow = p, ncol = K)
> for (k in 1:K) beta[sample(1:p, q), k] = 1
> c = matrix(rnorm(K*p, 0, sigmaC), K, p)
> eta = rnorm(K)
> pi = (exp(eta)+1)/sum(exp(eta)+1)
> z = t(rmultinom(m + n, 1, pi))
> x = crossprod(t(z), c) + matrix(rnorm((m + n)*p, 0, sigmaX), m + n, p)
> y = rowSums(z*(crossprod(t(x), beta))) + rnorm(m + n, 0, sigmaY)
> 
> x.train = x[1:n, ]
> y.train = y[1:n]
> x.test = x[n + 1:m, ]
> y.test = y[n + 1:m]
> foldid = sample(rep(1:10, length = nrow(x.train)))
> 
> 
> # Example 1: Use clustering to fit the customized training model to training
> # and test data with no predefined test-set blocks
> 
> fit1 = cv.customizedGlmnet(x.train, y.train, x.test, Gs = c(1, 2, 3, 5),
+     family = "gaussian", foldid = foldid)
> 
> # Print the optimal number of groups and value of lambda:
> fit1$G.min
[1] 3
> fit1$lambda.min
[1] 8.844692
> 
> # Print the customized training model fit:
> fit1

Call: 
cv.customizedGlmnet(xTrain = x.train, yTrain = y.train, xTest = x.test, 
    Gs = c(1, 2, 3, 5), foldid = foldid, family = "gaussian")

n = 150 training observations
m = 150 test observations
p = 50 predictor variables

Number of groups chosen: 3 

Model 1: 126 train obs. and 119 test obs.
 No. of variables selected: 23

Model 2: 18 train obs. and 22 test obs.
 No. of variables selected: 8

Model 3: 6 train obs. and 9 test obs.
 No. of variables selected: 0

> 
> # Compute test error using the predict function:
> mean((y[n + 1:m] - predict(fit1))^2)
[1] 2.046314
> 
> # Plot nonzero coefficients by group:
> plot(fit1)
> 
> 
> # Example 2: If the test set has predefined blocks, use these blocks to define
> # the customized training sets, instead of using clustering.
> foldid = apply(z == 1, 1, which)[1:n]
> group.id = apply(z == 1, 1, which)[n + 1:m]
> 
> fit2 = cv.customizedGlmnet(x.train, y.train, x.test, group.id, foldid = foldid)
> 
> # Print the optimal value of lambda:
> fit2$lambda.min
[1] 7.343019
> 
> # Print the customized training model fit:
> fit2

Call: 
cv.customizedGlmnet(xTrain = x.train, yTrain = y.train, xTest = x.test, 
    groupid = group.id, foldid = foldid)

n = 150 training observations
m = 150 test observations
p = 50 predictor variables

Number of groups chosen: 3 

Model 1: 14 train obs. and 9 test obs.
 No. of variables selected: 9

Model 2: 18 train obs. and 22 test obs.
 No. of variables selected: 9

Model 3: 117 train obs. and 119 test obs.
 No. of variables selected: 28

> 
> # Compute test error using the predict function:
> mean((y[n + 1:m] - predict(fit2))^2)
[1] 2.086514
> 
> # Plot nonzero coefficients by group:
> plot(fit2)
> 
> 
> # Example 3: If there is no test set, but the training set is organized into
> # blocks, you can do cross validation with these blocks as the basis for the
> # customized training sets.
> 
> fit3 = cv.customizedGlmnet(x.train, y.train, foldid = foldid)
> 
> # Print the optimal value of lambda:
> fit3$lambda.min
[1] 7.343019
> 
> # Print the customized training model fit:
> fit3

Call: 
cv.customizedGlmnet(xTrain = x.train, yTrain = y.train, foldid = foldid)

n = 150 training observations
m = 150 test observations
p = 50 predictor variables

Number of groups chosen: 3 

Model 1: 12 train obs. and 6 test obs.
 No. of variables selected: 10

Model 2: 18 train obs. and 18 test obs.
 No. of variables selected: 9

Model 3: 126 train obs. and 126 test obs.
 No. of variables selected: 26

> 
> # Compute test error using the predict function:
> mean((y[n + 1:m] - predict(fit3))^2)
[1] 812.8184
> 
> # Plot nonzero coefficients by group:
> plot(fit3)
> 
> 
> 
> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
> base::cat("print.cv.customizedGlmnet", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
> ### * <FOOTER>
> ###
> cleanEx()

detaching ‘package:glmnet’, ‘package:Matrix’

> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed:  12.953 0.501 15.613 0 0 
> grDevices::dev.off()
null device 
          1 
> ###
> ### Local variables: ***
> ### mode: outline-minor ***
> ### outline-regexp: "\\(> \\)?### [*]+" ***
> ### End: ***
> quit('no')
Assertion failure at kmp_runtime.cpp(6918): temp_reg_status_file_name.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6918).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://bugs.llvm.org/.
Assertion failure at kmp_runtime.cpp(6918): temp_reg_status_file_name.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6918).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://bugs.llvm.org/.
Killed