Starting in OpenMx 1.2, we will have support for multicore execution of the FIML objective function, and for the numerical calculation of the Hessian that is used to compute standard error estimates. A mechanism is needed to specify the number of threads to be assigned to the computations.
We currently have an option available under ?mxOption() that is named "Number of Cores". I'd like to rename the option to "Number of Threads" if there are no objections. And I'd like to propose the following behavior for the value (N) that is stored in this option.
omxDetectCores()to determine the number of threads.
omxDetectCores()is backport of the function
detectCores()introduced in R 2.14.0.
As you see, some trickery is used to make sure that processors are allocated correctly when independent submodels are executed. The default is to allocate 1 thread per independent submodel, unless the user explicitly provides a positive integer for the "Number of Threads" option.