Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
openblas_vs_mro.R
#library(devtools)
#install_github("andrie/version.compare")
library(data.table)
library(dplyr)
library(version.compare)
scale.factor = 1.0
r = switch(
Sys.info()[["sysname"]],
Linux = c(
"/usr/lib/R/bin/Rscript",
"/opt/R/3.4.2-mkl/lib/R/bin/Rscript",
"/opt/microsoft/ropen/3.4.2/lib64/R/bin/Rscript"
)
)
envir = as.environment(1)
for(i in 1:100) {
ropenblas_vs_mro = RevoMultiBenchmark(rVersions = r[c(1,3)],
threads = 8,
scale.factor = scale.factor)
for(j in 1:2) {
if(colnames(ropenblas_vs_mro)[[j]] == "R-3.4.2 (8 threads)") {
colnames(ropenblas_vs_mro)[[j]] = "ropenblas"
}
if(colnames(ropenblas_vs_mro)[[j]] == "Microsoft R Open-3.4.2 (8 threads)") {
colnames(ropenblas_vs_mro)[[j]] = "mro"
}
}
operations = as_tibble(rownames(ropenblas_vs_mro)) %>% rename(operation = value)
ropenblas_vs_mro = as_tibble(ropenblas_vs_mro) %>%
bind_cols(operations)
assign(paste0("ropenblas_vs_mro_", i), ropenblas_vs_mro, envir = envir)
rm(ropenblas_vs_mro,operations)
}
ropenblas_vs_mro = mget(ls(pattern = "ropenblas_vs_mro_[0-9]")) %>%
bind_rows()
rm(list=ls(pattern = "ropenblas_vs_mro_[0-9]"))
fwrite(ropenblas_vs_mro, "ropenblas_vs_mro.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.