Re: [sage-support] Cannot load session create in another version of sage

2019-09-02 Thread Vincent Delecroix




Le 30/08/2019 à 12:54, Simon King a écrit :

Hi Steve,

On Friday, August 30, 2019 at 11:55:45 AM UTC+2, Dima Pasechnik wrote:


On Fri, Aug 30, 2019 at 12:48 PM 'SteveJJ' via sage-support
> wrote:


I saved a session when using sage 8.0.

When I try to load that session into sage 8.8, I get errors such as:

RuntimeError: invalid pickle data
ValueError: unknown matrix implementation 'flint' over Symbolic Ring

The full error output is below.

Am I missing some packages or do I need to somehow convert the session

file?

I don't think that sage/load_session is guaranteed w.r.t. any kind of
backward/forward compatibility.
It relies on internals being unchanged, which is certainly not the
case from one Sage version to another.



If I understand correctly, saving/loading individual objects is supposed to
be backwards compatible.


This is not correct. Saving individual object is not supposed to
be backward compatible. See

https://trac.sagemath.org/ticket/28302

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/839097c3-719f-25fd-4684-b4c9b41545dc%40gmail.com.


Re: [sage-support] sage crash report

2019-09-02 Thread Vincent Delecroix

Dear Oscar,

You should tell precisely what is your installation of Sage that
is broken. Looking at the crash report, I assume that you use
Sage from the system. In this situation, you would better address
your question to some Debian help forum or mailing list.

For the bug you encountered, it has already been reported and
apparently fixed

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932367

Good luck
Vincent

Le 02/09/2019 à 20:39, o.castillo.felis...@gmail.com a écrit :

Dear community,

I've worked extensively with Sage on Debian, either source compiled or
installed from the repository. Last month I update my system to Debian
Bullseye, and since then I've been unable of using sage!

I'm attaching the automatically generated crash report.

I thank you in advance all possible help, since this is one of the programs
I use in my daily work.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9533d412-2819-4b41-928d-6947e754f04d%40gmail.com.


[sage-support] sage crash report

2019-09-02 Thread o.castillo.felis...@gmail.com
Dear community,

I've worked extensively with Sage on Debian, either source compiled or
installed from the repository. Last month I update my system to Debian
Bullseye, and since then I've been unable of using sage!

I'm attaching the automatically generated crash report.

I thank you in advance all possible help, since this is one of the programs
I use in my daily work.

-- 
_
Oscar Castillo-Felisola.
Grupo de Fisica Teorica.
UTFSM -- CCTVal.
Av. Espana, 1680, Valparaiso-Chile.
__

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAJj91e652Cx1yHhB%2B_HESGvb8eMYOGocYO9FNR_6d6QGHLh%2Bw%40mail.gmail.com.
***

IPython post-mortem report

{'commit_hash': u'64a584802',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/usr/local/lib/python2.7/dist-packages/IPython',
 'ipython_version': '5.6.0',
 'os_name': 'posix',
 'platform': 'Linux-5.2.0-2-amd64-x86_64-with-debian-bullseye-sid',
 'sys_executable': '/usr/bin/python2',
 'sys_platform': 'linux2',
 'sys_version': '2.7.16+ (default, Jul  8 2019, 09:45:29) \n[GCC 8.3.0]'}

***



***

Crash traceback:

---
---
ImportErrorPython 2.7.16+: /usr/bin/python2
   Mon Sep  2 14:33:00 2019
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/share/sagemath/bin/sage-ipython in ()
  1 #!/usr/bin/env sage-python23
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Display startup banner. Do this before anything else to give the user
  8 # early feedback that Sage is starting.
  9 from sage.misc.banner import banner
 10 banner()
 11 
 12 from sage.repl.interpreter import SageTerminalApp
 13 
 14 app = SageTerminalApp.instance()
---> 15 app.initialize()
global app.initialize = >
 16 app.start()

 in initialize(self=, argv=None)

/usr/local/lib/python2.7/dist-packages/traitlets/config/application.pyc in 
catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
 73 else:
 74 raise ValueError("Unsupported value for environment variable: 
'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of 
 {'0', '1', 'false', 'true', ''}."% _envvar )
 75 
 76 
 77 @decorator
 78 def catch_config_error(method, app, *args, **kwargs):
 79 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 80 
 81 On a TraitError (generally caused by bad config), this will print 
the trait's
 82 message, and exit the app.
 83 
 84 For use on init methods, to prevent invoking excepthook on invalid 
input.
 85 """
 86 try:
---> 87 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 88 except (TraitError, ArgumentError) as e:
 89 app.print_help()
 90 app.log.fatal("Bad config encountered during initialization:")
 91 app.log.fatal(str(e))
 92 app.log.debug("Config at the time: %s", app.config)
 93 app.exit(1)
 94 
 95 
 96 class ApplicationError(Exception):
 97 pass
 98 
 99 
100 class LevelFormatter(logging.Formatter):
101 """Formatter with additional `highlevel` record
102 

/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.pyc in 
initialize(self=, argv=None)
301 
302 return super(TerminalIPythonApp, self).parse_command_line(argv)
303 
304 @catch_config_error
305 def initialize(self, argv=None):
306 """Do actions after construct, but before starting the app."""
307 super(TerminalIPythonApp, self).initialize(argv)
308 if self.subapp is not None:
309 # don't bother initializing further, starting subapp
310 return
311 # print self.extra_args
312 if self.extra_args and not self.something_to_run:
313 self.file_to_run = self.extra_args[0]
314 self.init_path()
  

Re: [sage-support] Feature to constrain computation time?

2019-09-02 Thread TAU
On Mon, 2 Sep 2019, Szabolcs Horvát wrote:

> Does Sage have a feature to constrain computation time? Suppose the function
> f() takes a long time to run. I am looking for a way to run it *for at most
> 5 minutes*.

I think it has. But what if you just use timeout from command line? I.e.

timeout $((5*60)) ./sage my_script.sage

-- 
Jori Mäntysalo

Tampereen yliopisto - Ihminen ratkaisee

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/alpine.DEB.2.21..1909022106080.83228%40shell.sis.uta.fi.


[sage-support] Re: Feature to constrain computation time?

2019-09-02 Thread slelievre


Le lundi 2 septembre 2019 13:46:15 UTC+2, Szabolcs Horvát a écrit :
>
> Does Sage have a feature to constrain computation time? Suppose
>
the function f() takes a long time to run. I am looking for a way to
>
run it *for at most 5 minutes*. If it finishes by then, I'd like to have
>
the return value from f(). If not, it should communicate that clearly,
>
and the system should be ready for the next computation.
>
> For those familiar with Mathematica, I am looking for something
>
similar to its TimeConstrained[] command.
>

You could use `alarm`, see

- Ask Sage question 7931 - Any way to timeout?
  https://ask.sagemath.org/question/7931 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/bcc942bf-6621-4326-a37b-0cb1ce41547f%40googlegroups.com.


Re: [sage-support] SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread slelievre
Le lundi 2 septembre 2019 13:03:54 UTC+2, Szabolcs Horvát a écrit :
>
> Thanks to everyone for the responses.
>

SageMath packaging in Fedora is also in good shape.

Distro-independent options include Conda and Nix.

For more options see

https://wiki.sagemath.org/Distribution

I succeeded in installing from conda-forge. At the moment
>
they seem to have version 8.8 (the latest).  
>
 
>
The only small problem is that I accidentally ended up with
>
a Python 3 based installation. While the functions I need
>
appear to work correctly, my understanding is that Sage
>
still doesn't support Python 3. Thus I should probably
>
re-install with Python 2. Is this correct?
>

I use Python3-based SageMath for my daily work without problems.
It should be at least 99% working. I would stick with Python 3 unless
you detect that some specific things you need are not yet Python 3
ready in SageMath 8.8.

Less than 100 doctests fail in Python 3 based SageMath 8.8,
and it is down to a handful in 8.9.beta8.

See these two tickets which track progress on making all tests pass:

https://trac.sagemath.org/ticket/26212
https://trac.sagemath.org/ticket/28298

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d5cb0dc9-0884-434d-a9dd-e8e809b4a9f2%40googlegroups.com.


[sage-support] Feature to constrain computation time?

2019-09-02 Thread Szabolcs Horvát
Does Sage have a feature to constrain computation time? Suppose the 
function f() takes a long time to run. I am looking for a way to run it 
*for at most 5 minutes*. If it finishes by then, I'd like to have the 
return value from f(). If not, it should communicate that clearly, and the 
system should be ready for the next computation.

For those familiar with Mathematica, I am looking for something similar to 
its TimeConstrained[] command.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b060e21d-aa2a-40ae-b421-37fa28ad6818%40googlegroups.com.


Re: [sage-support] Re: Tracking memory usage and time

2019-09-02 Thread J
On 19-09-02 10:35:18, Simon King wrote:
> Hi J,
>
> On 2019-08-24, J  wrote:
> > to do a overview of a rather different set of `SAGE` methods, I would
> > like to not only track the time used to run a command, but also the
> > memory usage of the commands.
> >
> > Is there a recommended way to do this?
>
> I am a bit surprised that nobody answered this question yet. Sorry.
>
> There is the get_memory_usage command, that might provide what you asked
> for. But I am not sure if I understand correctly what you want to
> achieve: Do you have a lengthy program and you want to understand how
> much resources each individual command in your program takes? In that
> case, it might make sense to use a profiler (e.g., %prun or %crun). Or do
> you only want to know how much time and memore the program takes in total?
> In that case, %time and get_memory_usage would probably give you the
> answer.
>

Thanks get_memory_usage sounds good; I want to run several decoders from
the coding theory module to see better show there ups and downs;

it is expected for the syndrome decoder to be quicker but more memory
hungry while the nearest neighbor is more time expensive.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/20190902112113.qzcbu4shd2eirs37%40deathbolt.927589452.space.


Re: [sage-support] SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread Dima Pasechnik
the support of Python 3 in Sage 8.8 is not quite complete (getting
almost full in the upcoming 8.9), so it's indeed better to use Python
2 with it.
Try adding  the argument

 python=2.7

to the

conda create ...

command

On Mon, Sep 2, 2019 at 2:03 PM Szabolcs Horvát  wrote:
>
> Thanks to everyone for the responses.
>
> I succeeded in installing from conda-forge. At the moment they seem to have 
> version 8.8 (the latest).
>
> The only small problem is that I accidentally ended up with a Python 3 based 
> installation. While the functions I need appear to work correctly, my 
> understanding is that Sage still doesn't support Python 3. Thus I should 
> probably re-install with Python 2. Is this correct?
>
> On Monday, 2 September 2019 11:27:22 UTC+2, Dima Pasechnik wrote:
>>
>> you might try conda.
>> (assuming it works on openSUSE, I don't know)
>>
>> On Mon, Sep 2, 2019 at 11:47 AM Szabolcs Horvát  wrote:
>> >
>> > Are there pre-built binaries for other Linux varieties than Debian/Ubuntu, 
>> > or perhaps a "generic" variety that works on all common Linuxes?
>> >
>> > I am looking to install Sage into my home directory on an openSUSE system 
>> > where I do not have root access. Am I stuck with compiling from source?
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "sage-support" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to sage-s...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sage-support/b21e517c-38dc-4d49-a343-8838cf3e493b%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/5c0e5b07-2d5c-4021-84c1-f7b874c563c6%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq0kxnkVodumHCxtii_XVK%2BfeOKrWYgR48C7WPuetn41QA%40mail.gmail.com.


Re: [sage-support] SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread Szabolcs Horvát
Thanks to everyone for the responses.

I succeeded in installing from conda-forge. At the moment they seem to have 
version 8.8 (the latest). 

The only small problem is that I accidentally ended up with a Python 3 
based installation. While the functions I need appear to work correctly, my 
understanding is that Sage still doesn't support Python 3. Thus I should 
probably re-install with Python 2. Is this correct?

On Monday, 2 September 2019 11:27:22 UTC+2, Dima Pasechnik wrote:
>
> you might try conda. 
> (assuming it works on openSUSE, I don't know) 
>
> On Mon, Sep 2, 2019 at 11:47 AM Szabolcs Horvát  > wrote: 
> > 
> > Are there pre-built binaries for other Linux varieties than 
> Debian/Ubuntu, or perhaps a "generic" variety that works on all common 
> Linuxes? 
> > 
> > I am looking to install Sage into my home directory on an openSUSE 
> system where I do not have root access. Am I stuck with compiling from 
> source? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-s...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/b21e517c-38dc-4d49-a343-8838cf3e493b%40googlegroups.com.
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5c0e5b07-2d5c-4021-84c1-f7b874c563c6%40googlegroups.com.


[sage-support] Re: Tracking memory usage and time

2019-09-02 Thread Simon King
Hi J,

On 2019-08-24, J  wrote:
> to do a overview of a rather different set of `SAGE` methods, I would
> like to not only track the time used to run a command, but also the
> memory usage of the commands.
>
> Is there a recommended way to do this?

I am a bit surprised that nobody answered this question yet. Sorry.

There is the get_memory_usage command, that might provide what you asked
for. But I am not sure if I understand correctly what you want to
achieve: Do you have a lengthy program and you want to understand how
much resources each individual command in your program takes? In that
case, it might make sense to use a profiler (e.g., %prun or %crun). Or do
you only want to know how much time and memore the program takes in total?
In that case, %time and get_memory_usage would probably give you the
answer.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/qkir96%245tgi%242%40blaine.gmane.org.


[sage-support] Re: SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread Simon King
Hi!

On 2019-09-02, Szabolcs Horvát  wrote:
> Are there pre-built binaries for other Linux varieties than Debian/Ubuntu, 
> or perhaps a "generic" variety that works on all common Linuxes?
>
> I am looking to install Sage into my home directory on an openSUSE system 
> where I do not have root access. Am I stuck with compiling from source?

I don't know if there are other pre-built binaries (I didn't look at the
download pages). In any case, it is explained at
http://doc.sagemath.org/html/en/installation/binary.html#linux how to
install from a pre-built binary on Linux.

However, provided that the prerequisites mentioned at
http://doc.sagemath.org/html/en/installation/source.html#prerequisites
are available, building from source shouldn't be much of a problem (I
did use openSUSE till a couple of years ago). It just takes some time to
compile.

Note that you don't need root access. In fact, it is recommended AGAINST
building Sage as root, which is also mentioned in the installation guide
(i.e., the pointer above).

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/qkiqtc%245tgi%241%40blaine.gmane.org.


Re: [sage-support] SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread Dima Pasechnik
you might try conda.
(assuming it works on openSUSE, I don't know)

On Mon, Sep 2, 2019 at 11:47 AM Szabolcs Horvát  wrote:
>
> Are there pre-built binaries for other Linux varieties than Debian/Ubuntu, or 
> perhaps a "generic" variety that works on all common Linuxes?
>
> I am looking to install Sage into my home directory on an openSUSE system 
> where I do not have root access. Am I stuck with compiling from source?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/b21e517c-38dc-4d49-a343-8838cf3e493b%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq0EKUEsUFN%2BL0mUA6mRQy7E5dVGRd1GU4VTLwC5qDsfMA%40mail.gmail.com.


[sage-support] SageMath for non-Debian/Ubuntu Linux?

2019-09-02 Thread Szabolcs Horvát
Are there pre-built binaries for other Linux varieties than Debian/Ubuntu, 
or perhaps a "generic" variety that works on all common Linuxes?

I am looking to install Sage into my home directory on an openSUSE system 
where I do not have root access. Am I stuck with compiling from source?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b21e517c-38dc-4d49-a343-8838cf3e493b%40googlegroups.com.