umx (version 1.9.1)

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, parallel::detectCores()/2),
  testScript = NULL, rowwiseParallel = TRUE, nSubjects = 1000)

Arguments

nCores

How many cores to run (defaults to c(1, max/2). -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.

Value

- NULL

Details

Some historical (starting 2017-09-06) speeds on my late 2015 iMac, 3.3 GHz Quad-core i7 desktop.

R: 3.4.1 (2017-06-30); MacOS: 10.13

umx: 1.9.0; OpenMx: 2.7.16.26 [GIT v2.7.16-26-gd46131ce-dirty] / 2.7.16.31

date type x core 01 min, XX.XX sec
date type y core XX min, XX.XX sec \(\Delta\): -xx.xxx)
2017-10-16 v2.7.18-9-g159b7337-dirty x core 01 min, 07.30 sec
2017-10-16 v2.7.18-9-g159b7337-dirty y core 00 min, 22.63 sec \(\Delta\): -44.676)
2017-10-16 Clang OpenMP 1 core 01 min, 08.38 sec
2017-10-16 Clang OpenMP 4 core 00 min, 24.89 sec \(\Delta\): -43.488)
2017-09-07 Clang OpenMP 1 core 01 min, 12.90 sec
2017-09-07 Clang OpenMP 4 core 00 min, 32.20 sec \(\Delta\): -40.70 sec
2017-09-07 Clang notOpenMP 1 core 01 min, 09.90 sec
2017-09-07 TRAVIS 1 core 01 min, 06.20 sec
2017-09-07 TRAVIS 4 core 00 min, 21.10 sec \(\Delta\): -45.00 sec

References

- http://tbates.github.io, https://github.com/tbates/umx

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, umx_is_endogenous, umx_is_exogenous, umx_is_ordered

Examples

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

Run the code above in your browser using DataCamp Workspace