Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot allocate memory?

I use the sagemath package distributed with Ubuntu. Recently, it was automatically suggested that I update this package, which I did. After that I have had a lot of problems.

I use sage almost exclusively as an R interface. All my problems are with R. After the upgrade, I will frequently get a message like "R Interpreter crashed -- automatically restarting." - except that it never restarts automatically I have to manually restart the entire sage notebook server.

I have also had several messages like R cannot allocate 125 MB memory for an array... Where I have 4 GB RAM so it shouldn't be a problem at all and I could run this code before the upgrade without problem. Just now, I tried to run install.packages() but got the error " system call failed: Cannot allocate memory". This is for a 28 kB package, so I should be able to run it on an old 286 computer for christs sake.

1) Does anyone have any suggestions on how to solve these memory limitations?

2) Alternatively, how can I "downgrade" and get my previous version of sage back? Because in my previous version I had no problems at all.

Cannot allocate memory?

I use the sagemath package distributed with Ubuntu. Recently, it was automatically suggested that I update this package, which I did. After that I have had a lot of problems.

I use sage almost exclusively as an R interface. All my problems are with R. After the upgrade, I will frequently get a message like "R Interpreter crashed -- automatically restarting." - except that it never restarts automatically I have to manually restart the entire sage notebook server.

I have also had several messages like R cannot allocate 125 MB memory for an array... Where I have 4 GB RAM so it shouldn't be a problem at all and I could run this code before the upgrade without problem. Just now, I tried to run install.packages() but got the error " system call failed: Cannot allocate memory". This is for a 28 kB package, so I should be able to run it on an old 286 computer for christs sake.

1) Does anyone have any suggestions on how to solve these memory limitations?

2) Alternatively, how can I "downgrade" and get my previous version of sage back? Because in my previous version I had no problems at all.

EDIT: Ubuntu version from /etc/issue = Ubuntu 14.04.1 LTS

Cannot allocate memory?

I use the sagemath package distributed with Ubuntu. Recently, it was automatically suggested that I update this package, which I did. After that I have had a lot of problems.

I use sage almost exclusively as an R interface. All my problems are with R. After the upgrade, I will frequently get a message like "R Interpreter crashed -- automatically restarting." - except that it never restarts automatically I have to manually restart the entire sage notebook server.

I have also had several messages like R cannot allocate 125 MB memory for an array... Where I have 4 GB RAM so it shouldn't be a problem at all and I could run this code before the upgrade without problem. Just now, I tried to run install.packages() but got the error " system call failed: Cannot allocate memory". This is for a 28 kB package, so I should be able to run it on an old 286 computer for christs sake.

1) Does anyone have any suggestions on how to solve these memory limitations?

2) Alternatively, how can I "downgrade" and get my previous version of sage back? Because in my previous version I had no problems at all.

EDIT: Ubuntu version from /etc/issue = Ubuntu 14.04.1 LTS

Package: sagemath-upstream-binary
Priority: extra
Section: math
Installed-Size: 3102314
Maintainer: Jan Groenewald <jan@aims.ac.za>
Architecture: amd64
Version: 6.4.1
Recommends: openssl, build-essential, gfortran, imagemagick, dvipng, texlive, texlive-pictures, icedtea-plugin, bash, python
Suggests: m4, openssh-client, git
Depends: libc6, libexpat1, libfontconfig1, libgcc1, libssl1.0.0, libstdc++6, libgfortran3, libgomp1, libquadmath0
Pre-Depends: dpkg (>= 1.15.6~)
Filename: pool/main/s/sagemath-upstream-binary/sagemath-upstream-binary_6.4.1_amd64.deb
Size: 483102424
MD5sum: 26845d5ae2d46f2f2687693fd7819a7e
SHA1: f06b711ffd514d5d9738925d50bca212f8241f80
SHA256: 6c34bc35af4f7a0c166b3bf9bbe9c68ecfd1f5a2f7b71523abb79a9326ca40be
Description-en: Sage is a free open-source mathematics software system
 Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
 Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.
 .
 This package is a wrapper around an upstream pre-built binary for Ubuntu 14.04.
Description-md5: 0a4e6e212377f9056703508d29d73269

Cannot allocate memory?

I use the sagemath package distributed with Ubuntu. Recently, it was automatically suggested that I update this package, which I did. After that I have had a lot of problems.

I use sage almost exclusively as an R interface. All my problems are with R. After the upgrade, I will frequently get a message like "R Interpreter crashed -- automatically restarting." - except that it never restarts automatically I have to manually restart the entire sage notebook server.

I have also had several messages like R cannot allocate 125 MB memory for an array... Where I have 4 GB RAM so it shouldn't be a problem at all and I could run this code before the upgrade without problem. Just now, I tried to run install.packages() but got the error " system call failed: Cannot allocate memory". This is for a 28 kB package, so I should be able to run it on an old 286 computer for christs sake.

1) Does anyone have any suggestions on how to solve these memory limitations?

2) Alternatively, how can I "downgrade" and get my previous version of sage back? Because in my previous version I had no problems at all.

EDIT: Ubuntu version from /etc/issue = Ubuntu 14.04.1 LTS

Package: sagemath-upstream-binary
Priority: extra
Section: math
Installed-Size: 3102314
Maintainer: Jan Groenewald <jan@aims.ac.za>
Architecture: amd64
Version: 6.4.1
Recommends: openssl, build-essential, gfortran, imagemagick, dvipng, texlive, texlive-pictures, icedtea-plugin, bash, python
Suggests: m4, openssh-client, git
Depends: libc6, libexpat1, libfontconfig1, libgcc1, libssl1.0.0, libstdc++6, libgfortran3, libgomp1, libquadmath0
Pre-Depends: dpkg (>= 1.15.6~)
Filename: pool/main/s/sagemath-upstream-binary/sagemath-upstream-binary_6.4.1_amd64.deb
Size: 483102424
MD5sum: 26845d5ae2d46f2f2687693fd7819a7e
SHA1: f06b711ffd514d5d9738925d50bca212f8241f80
SHA256: 6c34bc35af4f7a0c166b3bf9bbe9c68ecfd1f5a2f7b71523abb79a9326ca40be
Description-en: Sage is a free open-source mathematics software system
 Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
 Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.
 .
 This package is a wrapper around an upstream pre-built binary for Ubuntu 14.04.
Description-md5: 0a4e6e212377f9056703508d29d73269

Example code that produces memory allocation error for me:

# Important notice:
# When running this through Sage, have to divide the code into 3 or more cells, because R interface
# will only accept short code snippets.
# Error will then appear in either first or last cell (creating data frames OR plotting data)

library(ggplot2)
library(gridExtra)
xvar <- c(rnorm(15000000, mean = -1), rnorm(15000000, mean = 1.5))
yvar <- c(rnorm(15000000, mean = 1), rnorm(15000000, mean = 1.5))
zvar <- as.factor(c(rep(1, 15000000), rep(2, 15000000)))
xy <- data.frame(xvar, yvar, zvar)
#placeholder plot - prints nothing at all
empty <- ggplot()+geom_point(aes(1,1), colour="white") +
     theme(                              
       plot.background = element_blank(), 
       panel.grid.major = element_blank(), 
       panel.grid.minor = element_blank(), 
       panel.border = element_blank(), 
       panel.background = element_blank(),
       axis.title.x = element_blank(),
       axis.title.y = element_blank(),
       axis.text.x = element_blank(),
       axis.text.y = element_blank(),
       axis.ticks = element_blank()
     )
#scatterplot of x and y variables
scatter <- ggplot(xy,aes(xvar, yvar)) + 
  geom_point(aes(color=zvar)) + 
  scale_color_manual(values = c("orange", "purple")) + 
  theme(legend.position=c(1,1),legend.justification=c(1,1)) 
#marginal density of x - plot on top
plot_top <- ggplot(xy, aes(xvar, fill=zvar)) + 
  geom_density(alpha=.5) + 
  scale_fill_manual(values = c("orange", "purple")) + 
  theme(legend.position = "none")
#marginal density of y - plot on the right
plot_right <- ggplot(xy, aes(yvar, fill=zvar)) + 
  geom_density(alpha=.5) + 
  coord_flip() + 
  scale_fill_manual(values = c("orange", "purple")) + 
  theme(legend.position = "none") 
png("temp.png", width=1500, height=750)
#arrange the plots together, with appropriate height and width for each row and column
grid.arrange(plot_top, empty, scatter, plot_right, ncol=2, nrow=2, widths=c(4, 1), heights=c(1, 4))
dev.off()