# thread_testing_matrixinverse_noMKL.txt # # Tests matrix inversion using the 'parallelMatrixInv' function. # # Stock R 3.3.1 (x64) is used with the standard BLAS library. # The number of RcppParallel threads is varied from 1 to 6 (the number of physical cores in # the machine). # The matrix inversion is repeated five times for each setting. > print(RcppThreads) [1] 1 > times [[1]] user system elapsed 4.13 0.15 4.28 [[2]] user system elapsed 4.04 0.17 4.21 [[3]] user system elapsed 4.01 0.09 4.12 [[4]] user system elapsed 4.07 0.06 4.15 [[5]] user system elapsed 4.11 0.12 4.26 > > > > > RcppThreads <- 2 > RcppParallel::setThreadOptions(numThreads = RcppThreads) > times <- list() > for (i in 1:5){ + times[[i]] <- + system.time(parallelMatrixInv(x)) + } > print(RcppThreads) [1] 2 > times [[1]] user system elapsed 4.11 0.13 2.25 [[2]] user system elapsed 4.02 0.18 2.24 [[3]] user system elapsed 3.72 0.16 2.09 [[4]] user system elapsed 3.72 0.14 2.08 [[5]] user system elapsed 3.76 0.15 2.09 > > > > RcppThreads <- 3 > RcppParallel::setThreadOptions(numThreads = RcppThreads) > times <- list() > for (i in 1:5){ + times[[i]] <- + system.time(parallelMatrixInv(x)) + } > print(RcppThreads) [1] 3 > times [[1]] user system elapsed 3.86 0.19 1.53 [[2]] user system elapsed 3.90 0.10 1.51 [[3]] user system elapsed 3.91 0.14 1.54 [[4]] user system elapsed 3.93 0.12 1.53 [[5]] user system elapsed 3.88 0.14 1.52 > > > > > RcppThreads <- 4 > RcppParallel::setThreadOptions(numThreads = RcppThreads) > times <- list() > for (i in 1:5){ + times[[i]] <- + system.time(parallelMatrixInv(x)) + } > print(RcppThreads) [1] 4 > times [[1]] user system elapsed 3.89 0.17 1.22 [[2]] user system elapsed 4.23 0.10 1.28 [[3]] user system elapsed 4.13 0.11 1.27 [[4]] user system elapsed 4.20 0.11 1.30 [[5]] user system elapsed 4.24 0.13 1.29 > > > > RcppThreads <- 5 > RcppParallel::setThreadOptions(numThreads = RcppThreads) > times <- list() > for (i in 1:5){ + times[[i]] <- + system.time(parallelMatrixInv(x)) + } > print(RcppThreads) [1] 5 > times [[1]] user system elapsed 4.34 0.22 1.14 [[2]] user system elapsed 4.24 0.17 1.11 [[3]] user system elapsed 4.46 0.17 1.14 [[4]] user system elapsed 4.36 0.13 1.11 [[5]] user system elapsed 4.13 0.19 1.08 > > > > RcppThreads <- 6 > RcppParallel::setThreadOptions(numThreads = RcppThreads) > times <- list() > for (i in 1:5){ + times[[i]] <- + system.time(parallelMatrixInv(x)) + } > print(RcppThreads) [1] 6 > times [[1]] user system elapsed 4.62 0.09 1.03 [[2]] user system elapsed 4.46 0.11 0.98 [[3]] user system elapsed 4.51 0.16 0.99 [[4]] user system elapsed 4.45 0.14 1.01 [[5]] user system elapsed 4.48 0.20 1.02