Skip to content

Commit 8d2da7e

Browse files
Remove unneeded check
1 parent a43c70c commit 8d2da7e

5 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎NEWS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# BrainGnomes 0.8-2
22

33
* Refactor postprocessing to use job arrays and sentinels for cleanup
4+
* Add additional templates to prefetch needed by MRIQC
45

56
# BrainGnomes 0.8-1
67

‎R/process_subject.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,6 @@ sched_script = NULL, sched_args = NULL, parent_ids = NULL, lg = NULL, pp_stream
790790
input_dir = input_dir, # postprocess_subject.sbatch will figure out files to postprocess using input and input_regex
791791
input_regex = pp_cfg$input_regex,
792792
postprocess_image_sched_script = postprocess_image_sched_script,
793-
postprocess_sentinel_sched_script = postprocess_sentinel_sched_script,
794793
max_concurrent_images = as.character(max_concurrent_images),
795794
sched_args = sched_args, # pass through to child processes
796795
stream_name = pp_stream,

‎inst/hpc_scripts/postprocess_subject.pbs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ ncores=${PBS_NP:-1}
4040
[ ! -f "$postprocess_image_sched_script" ] && echo "postprocess_image_sched_script $postprocess_image_sched_script not found. Exiting" && exit 1
4141
[ ! -r "$postprocess_image_sched_script" ] && echo "postprocess_image_sched_script $postprocess_image_sched_script not readable. Exiting" && exit 1
4242
[ -z "$stream_name" ] && echo "stream_name not set. Exiting" && exit 1
43-
[ -z "$postprocess_sentinel_sched_script" ] && echo "postprocess_sentinel_sched_script is not set. Exiting" && exit 1
44-
[ ! -f "$postprocess_sentinel_sched_script" ] && echo "postprocess_sentinel_sched_script $postprocess_sentinel_sched_script not found. Exiting" && exit 1
4543

4644
# Default concurrency limit if not set by caller
4745
[ -z "$max_concurrent_images" ] && max_concurrent_images=4
@@ -220,4 +218,3 @@ fi
220218
"${R_HOME}/bin/Rscript" "$upd_job_status_path" --job_id "$PBS_JOBID" --sqlite_db "$sqlite_db" --status "COMPLETED"
221219
log_message INFO "Postprocess parent job completed for subject $sub_id $ses_str. Array ($array_jid) and sentinel (${sentinel_jid:-unknown}) are running."
222220
exit 0
223-

‎inst/hpc_scripts/postprocess_subject.sbatch‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ ncores=$SLURM_NTASKS
4040
[ ! -f "$postprocess_image_sched_script" ] && echo "postprocess_image_sched_script $postprocess_image_sched_script not found. Exiting" && exit 1
4141
[ ! -r "$postprocess_image_sched_script" ] && echo "postprocess_image_sched_script $postprocess_image_sched_script not readable. Exiting" && exit 1
4242
[ -z "$stream_name" ] && echo "stream_name not set. Exiting" && exit 1
43-
[ -z "$postprocess_sentinel_sched_script" ] && echo "postprocess_sentinel_sched_script is not set. Exiting" && exit 1
44-
[ ! -f "$postprocess_sentinel_sched_script" ] && echo "postprocess_sentinel_sched_script $postprocess_sentinel_sched_script not found. Exiting" && exit 1
4543

4644
# Default concurrency limit if not set by caller
4745
[ -z "$max_concurrent_images" ] && max_concurrent_images=4
@@ -161,4 +159,3 @@ fi
161159
"${R_HOME}/bin/Rscript" "$upd_job_status_path" --job_id "$SLURM_JOB_ID" --sqlite_db "$sqlite_db" --status "COMPLETED"
162160
log_message INFO "Postprocess parent job completed for subject $sub_id $ses_str. Array ($array_jid) and sentinel (${sentinel_jid:-unknown}) are running."
163161
exit 0
164-

‎tests/testthat/test-submit_postprocess-sentinel.R‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ test_that("submit_postprocess builds sentinel sched args from the selected strea
8686

8787
expect_identical(job_id, "67890")
8888
expect_length(calls, 2L)
89+
expect_false("postprocess_sentinel_sched_script" %in% names(calls[[1]]$env_variables))
8990
expect_match(calls[[2]]$sched_args, "--time=00:15:00")
9091
expect_match(calls[[2]]$sched_args, "--mem=2g")
9192
expect_match(calls[[2]]$sched_args, "-n 1", fixed = TRUE)

0 commit comments

Comments
 (0)