Learn R Programming

umx (version 4.20.0)

umx_check_parallel: Check if OpenMx is using OpenMP, test cores, and get timings

Description

Shows how many cores you are using, and runs a test script so user can check CPU usage.

Usage

umx_check_parallel(
  nCores = c(1, omxDetectCores()),
  testScript = NULL,
  rowwiseParallel = TRUE,
  nSubjects = 1000
)

Value

None

Arguments

nCores

How many cores to run (defaults to c(1, max). -1 = all available.

testScript

A user-provided script to run (NULL)

rowwiseParallel

Whether to parallel-ize rows (default) or gradient computation

nSubjects

Number of rows to model (Default = 1000) Reduce for quicker runs.

Details

Some historical (starting 2017-09-06) speeds on my late 2015 iMac, 3.3 GHz Quad-core i7 desktop and then a quad i7 2018 MacBook Pro

DateVersionCoresTimeNotes
2021-07-282.19.6.19 (git)800 min 42.98 sec\(\Delta\):-80 (SLSQP laptop (55 sec under NPSOL))
2021-07-282.19.6.19 (git)102 min 03 sec(SLSQP on laptop)
2020-08-092.17.3 (git)101 min 52 sec(CSOLNP on laptop)
2020-08-092.17.3 (git)400 min 40.18 sec(CSOLNP on laptop)
2019-06-13v2.13.2 (git)101 min, 11 sec(NPSOL)
2019-06-13v2.13.2 (git)400 min, 22 sec(NPSOL)
2019-06-13v2.13.2 (git)600 min, 21 sec(NPSOL)
2018-10-14v2.11.5 (CRAN)400 min, 36 sec\(\Delta\):-39.598)
2018-09-17v2.11.3101 min, 31 sec
2018-09-17v2.11.3400 min, 30.6 sec\(\Delta\): -61.49)
2017-10-16v2.7.18-9101 min, 07.30 sec
2017-10-16v2.7.18-9400 min, 22.63 sec\(\Delta\): -44.68)
2017-10-16Clang OpenMP101 min, 08.38 sec
2017-10-16Clang OpenMP400 min, 24.89 sec\(\Delta\): -43.49)
2017-09-07Clang OpenMP101 min, 12.90 sec
2017-09-07Clang OpenMP400 min, 32.20 sec\(\Delta\): -40.70
2017-09-07Clang notOpenMP101 min, 09.90 sec
2017-09-07TRAVIS101 min, 06.20 sec
2017-09-07TRAVIS400 min, 21.10 sec\(\Delta\): -45.00

References

See Also

Other Test: umx_check_OS(), umx_check_model(), umx_check_names(), umx_check(), umx_has_CIs(), umx_has_been_run(), umx_has_means(), umx_has_square_brackets(), umx_is_MxData(), umx_is_MxMatrix(), umx_is_MxModel(), umx_is_RAM(), umx_is_cov()

Examples

Run this code
if (FALSE) {
# On a fast machine, takes a minute with 1 core
umx_check_parallel()
}

Run the code above in your browser using DataLab