I have access to two clusters where R has been installed. I have been coding and testing my stuff on one, all this time. When I moved my code to the new cluster, suddenly all matrix multiplications have become very slow. Here are some numbers:
Cluster-1:
> a <- matrix(0, nrow=2000, ncol=2000)
> b <- matrix(0, nrow=2000, ncol=2000)
> system.time(c <- a %*% b)
user system elapsed
0.07 0.03 0.10
Cluster-2:
> a <- matrix(0, nrow=2000, ncol=2000)
> b <- matrix(0, nrow=2000, ncol=2000)
> system.time(c <- a%*% b)
user system elapsed
13.682 0.014 13.695
Note that I am not using any sparse matrices.
Cluster-1 uses R version 2.12.1 and Cluster-2 uses R version 2.15.0. Is there any special library that the second cluster is missing? How do I find which one? Thanks.
EDIT: Adding more details about the clusters:
Cluster-1:
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-pc-linux-gnu (64-bit)
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=C 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
Cluster-2:
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base