Skip to content

Fix Rscript command

Fix Rscript command #8

Workflow file for this run

name: test-mkl-ubuntu-latest
on:
push:
branches:
- intel-mkl-action
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
steps:
- name: add oneAPI to apt
shell: bash
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::microbenchmark
- name: Check R sessionInfo
shell: Rscript {0}
run: |
sessionInfo()
- name: check R performance
shell: Rscript {0}
run: |
library(microbenchmark)
microbenchmark(
rnorm(100000),
times = 10000
)
- name: install oneAPI MKL library
shell: bash
run: |
sudo apt install intel-mkl libmkl-dev
- name: Check R sessionInfo
shell: Rscript {0}
run: |
sessionInfo()
- name: check R performance after MKL
shell: Rscript {0}
run: |
library(microbenchmark)
microbenchmark(
rnorm(100000),
times = 10000
)