Expected run time for openCR multisession model fit

18 views
Skip to first unread message

Emily Seccombe

unread,
Jul 30, 2026, 3:57:47 AMJul 30
to secr
Hello,

My run times to fit an openCR model are taking c. 30 hours - is it possible to speed this up or is that a normal time for the situation? Any advice greatly appreciated.

The current habitat mask has a spacing of 40m - I believe I actually probably need a tighter spacing (another paper suggests sigma=14, therefore I wanted to try spacings of 10, 5, 1) but know this would increase the compute time greatly.

The area of the habitat mask is c. 1.88km2.
I have 15 sessions:
> summary(capture_hist_object_correct_order, terse = TRUE) 2011spring 2011autumn 2012spring 2015spring 2015autumn Occasions 8 8 2 9 7 Detections 115 61 22 40 63 Animals 102 60 22 38 60 Detectors 97 97 59 108 105 2016spring 2016autumn 2018spring 2018autumn 2019spring Occasions 9 7 11 3 9 Detections 46 45 79 6 44 Animals 38 42 62 6 32 Detectors 51 51 72 72 51 2019autumn 2021spring 2021autumn Occasions 4 9 8 Detections 6 92 98 Animals 4 73 75 Detectors 51 110 111 I fit the model like so:

model_JSSAsecrf_hhr <- openCR.fit(capture_hist_object_correct_order,
                           type = "JSSAsecrf",
                           model = list(p ~ session, phi ~ session),
                           mask = mask,
                           detectfn = "HHR",
                           trace = TRUE,
                           ncores = 32
                           ) And I am running the script via a slurm batch job on a HPC: #!/bin/bash
#SBATCH --time=2-00:00:00
#SBATCH --mem=40GB
#SBATCH --output=hhr_output.txt
#SBATCH --job-name=hhr_r_job
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --partition=long
Rscript openCR_hhr_model.R Please can you advise if there is a way to speed up the modelling fitting, or is a compute time of c. 30 hours expected? If any further information required please let me know.

Many thanks,

Emily 

Murray Efford

unread,
Jul 30, 2026, 5:30:05 AMJul 30
to secr
Emily
I can't offer any magical solution, but at least consider -
1. parameter 'p' is not in the JSSAsecrf model - try lambda0 and/or sigma (vignette Table 5)
2. PLBsecrf is a slightly simpler model that achieves about the same and should fit slightly faster
3. rather than make each parameter session-specific you might want to model seasonal and annual variation via session covariates
4. it may be beneficial to provide starting values for parameters
5. data from some detector types (not 'multi') can be combined across occasions with function secr::reduce (you have quite a lot per session) and I would expect that to speed things up.
6. I remain sceptical about the 3-parameter HHR detection function - suggest using 2-parameter functions HHN or HEX (lower AIC is not everything)
Murray

Emily Seccombe

unread,
Jul 30, 2026, 8:05:34 AMJul 30
to secr
Thanks Murray, I'll look into those suggestions.

All the best,
Emily

Reply all
Reply to author
Forward
0 new messages