From a5c449c42007d1caf65082e1e56451fb940a9b82 Mon Sep 17 00:00:00 2001 From: Dongchen Zhang Date: Wed, 21 Feb 2024 10:26:43 -0500 Subject: [PATCH 1/2] fix bug for the progress bar. --- base/remote/R/qsub_parallel.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/base/remote/R/qsub_parallel.R b/base/remote/R/qsub_parallel.R index 396e959c152..626a42fc28c 100644 --- a/base/remote/R/qsub_parallel.R +++ b/base/remote/R/qsub_parallel.R @@ -103,7 +103,6 @@ qsub_parallel <- function(settings, files = NULL, prefix = "sipnet.out", sleep = folders <- file.path(settings$host$outdir, run_list) L_folder <- length(folders) pb <- utils::txtProgressBar(min = 0, max = L_folder, style = 3) - pbi <- 0 #here we not only detect if the target files are generated. #we also detect if the jobs are still existed on the server. if (is_rabbitmq) { @@ -121,7 +120,6 @@ qsub_parallel <- function(settings, files = NULL, prefix = "sipnet.out", sleep = } else { L_jobid <- length(jobids) pb1 <- utils::txtProgressBar(min = 0, max = L_jobid, style = 3) - pb1 <- 0 if (hybrid) { while ((L_folder - length(folders)) < L_folder & (L_jobid - length(jobids)) < L_jobid) { From 10277775a054ded9aaa3f8aacead7178d70c188a Mon Sep 17 00:00:00 2001 From: Dongchen Zhang Date: Wed, 21 Feb 2024 10:26:58 -0500 Subject: [PATCH 2/2] fix bug for Q type identification. --- modules/assim.sequential/R/Analysis_sda_block.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/assim.sequential/R/Analysis_sda_block.R b/modules/assim.sequential/R/Analysis_sda_block.R index 84dc0cd2ddd..663b7764b3a 100644 --- a/modules/assim.sequential/R/Analysis_sda_block.R +++ b/modules/assim.sequential/R/Analysis_sda_block.R @@ -339,11 +339,11 @@ MCMC_Init <- function (block.list, X) { } #initialize q. #if we want the vector q. - if (block.list[[i]]$constant$q.type == 1) { + if (block.list[[i]]$constant$q.type == 3) { for (j in seq_along(block.list[[i]]$data$y.censored)) { block.list[[i]]$Inits$q <- c(block.list[[i]]$Inits$q, stats::rgamma(1, shape = block.list[[i]]$data$aq[j], rate = block.list[[i]]$data$bq[j])) } - } else if (block.list[[i]]$constant$q.type == 2) { + } else if (block.list[[i]]$constant$q.type == 4) { #if we want the wishart Q. if ("try-error" %in% class(try(block.list[[i]]$Inits$q <- stats::rWishart(1, df = block.list[[i]]$data$bq, Sigma = block.list[[i]]$data$aq)[,,1], silent = T))) {