Skip to content

benchmarkme fails #2

@eduardszoecs

Description

@eduardszoecs

I can't get this to run in a container. benchmarkmefails :(

sessionInfo(); library("benchmarkme"); benchmark_std(runs = 1)

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS/LAPACK: /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin/libmkl_rt.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.4
# Programming benchmarks (5 tests):
	3,500,000 Fibonacci numbers calculation (vector calc): 0.867 (sec).
	Grand common divisors of 1,000,000 pairs (recursion): 1.38 (sec).
	Creation of a 3500x3500 Hilbert matrix (matrix calc): 0.66 (sec).
	Creation of a 3000x3000 Toeplitz matrix (loops): 15.4 (sec).
	Escoufier's method on a 60x60 matrix (mixed): 1.61 (sec).
# Matrix calculation benchmarks (5 tests):
	Creation, transp., deformation of a 5000x5000 matrix: 1.15 (sec).
	2500x2500 normal distributed random matrix ^1000: 0.659 (sec).
	Sorting of 7,000,000 random values: 0.892 (sec).
	2500x2500 cross-product matrix (b = a' * a): 0.992 (sec).
Error in solve(crossprod(a), crossprod(a, b)) : 
  the leading minor of order 1421 is not positive definite
Calls: benchmark_std ... bm_matrix_cal_lm -> system.time -> solve -> solve -> .Call
Timing stopped at: 1.064 0.032 0.553

It's a ubuntu 16.04 container and here's the mkl part that I use:

# install mkl
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB -P /tmp \
    && apt-key add /tmp/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB \
    && sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' \
    && apt-get update \
    && apt-get install -y intel-mkl-64bit-2018.2-046 \
    && update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so     \
                    libblas.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
    && update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so.3   \
                    libblas.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
    && update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so   \
                    liblapack.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
    && update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so.3 \
                    liblapack.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
    && echo "/opt/intel/lib/intel64"     >  /etc/ld.so.conf.d/mkl.conf \
    && echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf \
    && ldconfig

Any ideas /hints? Can you share the Dockerfile you used?

openblas works fine:

sessionInfo(); library("benchmarkme"); benchmark_std(runs = 1)

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.4
# Programming benchmarks (5 tests):
	3,500,000 Fibonacci numbers calculation (vector calc): 0.874 (sec).
	Grand common divisors of 1,000,000 pairs (recursion): 1.31 (sec).
	Creation of a 3500x3500 Hilbert matrix (matrix calc): 0.23 (sec).
	Creation of a 3000x3000 Toeplitz matrix (loops): 16.9 (sec).
	Escoufier's method on a 60x60 matrix (mixed): 1.28 (sec).
# Matrix calculation benchmarks (5 tests):
	Creation, transp., deformation of a 5000x5000 matrix: 1.31 (sec).
	2500x2500 normal distributed random matrix ^1000: 0.769 (sec).
	Sorting of 7,000,000 random values: 0.918 (sec).
	2500x2500 cross-product matrix (b = a' * a): 0.558 (sec).
	Linear regr. over a 3000x3000 matrix (c = a \ b'): 0.396 (sec).
# Matrix function benchmarks (5 tests):
	Cholesky decomposition of a 3000x3000 matrix: 0.773 (sec).
	Determinant of a 2500x2500 random matrix: 1.03 (sec).
	Eigenvalues of a 640x640 random matrix: 0.865 (sec).
	FFT over 2,500,000 random values: 0.536 (sec).
	Inverse of a 1600x1600 random matrix: 0.81 (sec).
     user system elapsed          test test_group cores
1   0.856  0.016   0.874           fib       prog     0
2   1.220  0.088   1.309           gcd       prog     0
3   0.176  0.056   0.230       hilbert       prog     0
4  16.824  0.032  16.947      toeplitz       prog     0
5   1.236  0.040   1.278     escoufier       prog     0
6   1.232  0.048   1.314         manip matrix_cal     0
7   0.768  0.000   0.769         power matrix_cal     0
8   0.892  0.024   0.918          sort matrix_cal     0
9   0.952  0.536   0.558 cross_product matrix_cal     0
10  0.848  0.468   0.396            lm matrix_cal     0
11  0.812  0.784   0.773      cholesky matrix_fun     0
12  1.516  0.384   1.027   determinant matrix_fun     0
13  0.936  1.608   0.865         eigen matrix_fun     0
14  0.536  0.000   0.536           fft matrix_fun     0
15  1.264  0.732   0.810       inverse matrix_fun     0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions