Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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
)

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

Date Version Cores Time Notes
2021-07-28 2.19.6.19 (git) 8 00 min 42.98 sec Δ:-80 (SLSQP laptop (55 sec under NPSOL))
2021-07-28 2.19.6.19 (git) 1 02 min 03 sec (SLSQP on laptop)
2020-08-09 2.17.3 (git) 1 01 min 52 sec (CSOLNP on laptop)
2020-08-09 2.17.3 (git) 4 00 min 40.18 sec (CSOLNP on laptop)
2019-06-13 v2.13.2 (git) 1 01 min, 11 sec (NPSOL)
2019-06-13 v2.13.2 (git) 4 00 min, 22 sec (NPSOL)
2019-06-13 v2.13.2 (git) 6 00 min, 21 sec (NPSOL)
2018-10-14 v2.11.5 (CRAN) 4 00 min, 36 sec Δ:-39.598)
2018-09-17 v2.11.3 1 01 min, 31 sec
2018-09-17 v2.11.3 4 00 min, 30.6 sec Δ: -61.49)
2017-10-16 v2.7.18-9 1 01 min, 07.30 sec
2017-10-16 v2.7.18-9 4 00 min, 22.63 sec Δ: -44.68)
2017-10-16 Clang OpenMP 1 01 min, 08.38 sec
2017-10-16 Clang OpenMP 4 00 min, 24.89 sec Δ: -43.49)
2017-09-07 Clang OpenMP 1 01 min, 12.90 sec
2017-09-07 Clang OpenMP 4 00 min, 32.20 sec Δ: -40.70
2017-09-07 Clang notOpenMP 1 01 min, 09.90 sec
2017-09-07 TRAVIS 1 01 min, 06.20 sec
2017-09-07 TRAVIS 4 00 min, 21.10 sec Δ: -45.00

Value

None

References

See Also

Examples

## Not run: 
# On a fast machine, takes a minute with 1 core
umx_check_parallel()

## End(Not run)

umx

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.