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