How to use the ncores parameter in secr.fit() function .

38 views
Skip to first unread message

Sachin Vardhan

unread,
Jul 23, 2019, 1:21:40 AM7/23/19
to secr
Hi, 
I am doing some likelihood analysis in R using the secr package. The boundary I am struct into is that when implementing the logic it is only using one core(R is single-threaded), but there is one parameter in your secr.fit() "ncores=1", when I am not getting it. Is it being used to run the function/analysis on multiple cores or it mean something else. 

Regards 
Sachin Vardhan

Murray Efford

unread,
Jul 23, 2019, 4:16:15 AM7/23/19
to secr
The help for secr.fit says

"If ncores > 1 the parallel package will be used to create processes on multiple cores (see Parallel for more). Specifying extra cores may improve the speed of multi-session analyses (it may also slow them down, as data must be copied back and forth). There is presently no benefit for single-session analyses."

See ?Parallel for more

Sachin Vardhan

unread,
Jul 23, 2019, 5:15:55 AM7/23/19
to secr
I read that in the documentation. But I am not getting it how to use it. Specifying externally to ncores= 4 , it still uses only one core despite of that. And the point is how to create the multi-session analysis for that. ?

Murray Efford

unread,
Aug 12, 2019, 4:38:41 PM8/12/19
to secr
Basically, don't do it. In the current version of secr you won't gain anything unless perhaps you are already fitting a multi-session model. This may change in future. If speed is really an issue then find other ways to speed up the analysis - combining occasions, reducing the number of mask points etc.
Reply all
Reply to author
Forward
0 new messages