[sage-devel] Re: Polyhedron.integral_points_count() gives inconsistent answers on slices

2017-11-05 Thread Dima Pasechnik
lattE needs to compute a triangulation of the polytope; by default it uses 
4ti2, but can instead use cddlib. Hence this option. See 
https://www.math.ucdavis.edu/~latte/software/packages/latte_current/manual_v1.7.2.pdf

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Sage Days next July in Zaragoza (Spain)

2017-11-05 Thread juanlu001
Hello Miguel,

I saw this discussion on Twitter and joined just to reply. From the 
Asociación Python España we would love to help, so please let me know if we 
can help you get in touch with the sponsors, spread the word... If you 
want, when the details are ready you can publish an article here 
https://www.es.python.org/

¡Saludos!

On Friday, November 3, 2017 at 6:20:12 PM UTC+1, mmarco wrote:
>
> Thank you all!
>
> If it is ok with you, I will create a wiki page to keep track of the 
> organization details. As soon as we can close the dates (maybe next week), 
> I) will let you know.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Polyhedron.integral_points_count() gives inconsistent answers on slices

2017-11-05 Thread 'Mark Bell' via sage-devel
Excellent! Adding the option prevents the crash. So on CoCalc (and locally) 
I can do:
   print(P.integral_points_count(preprocess=False, triangulation='cddlib'))
And it prints out 19958.

Without this extra option this example crashes on CoCalc but runs fine 
locally. What is this this option doing?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Polyhedron.integral_points_count() gives inconsistent answers on slices

2017-11-05 Thread Matthias Koeppe
I can't reproduce this locally, but you could see if passing  

--triangulation=cddlib

to LattE helps. 

On Sunday, November 5, 2017 at 1:46:30 AM UTC-8, Mark Bell wrote:
>
> Here is the full CoCalc output when I run "sage error.py" in a terminal, 
> either via the web interface or via sshing into the machine:
>
> Traceback (most recent call last):
>   File "error.py", line 42, in 
> print(P.integral_points_count(preprocess=False))
>   File 
> "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py",
>  
> line 218, in integral_points_count
> **kwds)
>   File 
> "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/latte.py",
>  
> line 159, in count
> raise RuntimeError("LattE integrale program failed (exit code 
> {})".format(ret_code) + err.strip())
> RuntimeError: LattE integrale program failed (exit code -6):
> This is LattE integrale 1.7.3
> Available from http://www.math.ucdavis.edu/~latte/
>  
> Invocation: count '--redundancy-check=none' --cdd /dev/stdin
> Warning: Not performing check for empty polytope, because it is 
> unimplemented for the CDD-style input format.
> size = 22 x 19
> Number Type = rational
> Ax <= b, given as (b|-A):
> =
> [-1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 0 1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
> [97 -2 -8 -1 -7 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [-1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
> [97 -2 -5 -1 -4 0 -3 0 0 0 0 0 0 0 0 0 0 0 0]
>
> Ax = b, given as (b|-A):
> 
> [0 1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1]
> [0 0 1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0]
> [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0]
> [0 0 1 -1 2 0 0 0 0 0 0 0 0 0 0 -1 0 0 0]
> [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]
> [0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0]
> [-100 2 8 1 7 0 0 0 0 0 0 0 3 0 0 0 0 0 0]
> [0 0 1 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0]
> [0 0 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0]
> [0 0 1 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0]
> [-100 2 5 1 4 0 3 0 3 0 0 0 0 0 0 0 0 0 0]
> [-100 2 5 1 4 0 3 3 0 0 0 0 0 0 0 0 0 0 0]
> [0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
>
> Computing hermitean normal form.
> sol:
> [0 0 0 0 0 0 -100 0 0 -100 0 0 0 0 0 0 0 0]
> Particular solution:
> Basis:
> New inequalities:
> [99 -3 -3 -5 -5 -1 0]
> [-101 3 3 5 6 2 0]
> [-1 0 0 0 0 1 0]
> [-1 0 0 0 1 0 0]
> [-1 0 0 1 0 0 0]
> [-1 1 0 0 0 0 0]
> [-3 3 3 -3 -3 0 0]
> [99 -3 -3 -4 -5 -2 0]
> [-3 0 3 0 0 0 0]
> Time for reading and preprocessing: 0 sec
> The polytope has 12 vertices.
> Time for computing vertices and supporting cones: 0 sec
> Time for dualizing general cones: 0 sec
> Dualizing all cones...All cones are now dualized.
> Time for dualizing general cones: 0 sec
> decomposeCones_Single: Decomposing all cones. (Memory Save on)
> 12 cones total to be done!decomposeCones_Single: degree = 1
> Number of cones: 12
> Triangulating cone... done.
> count: barvinok/barvinok.cpp:572: int 
> barvinokDecomposition_Single(listCone*, Single_Cone_Parameters*): Assertion 
> `num_rays == Parameters->Number_of_Variables'
> failed.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Python3 comparing, an idea about deprecation

2017-11-05 Thread Travis Scrimshaw
I'm not quite sure what you're asking. min and max are not fundamentally 
changed between Python3 except that the cmp keyword will no longer be 
valid. So if you do min(L) or min(L, key=foo), both will work in Python3, 
up to how you are doing comparisons within L. For that, it is localized to 
the objects of L, so you should *not* do anything in the call to min.

Best,
Travis


On Monday, November 6, 2017 at 4:21:06 AM UTC+10, Jori Mäntysalo wrote:
>
> Is it possible to run min(L) in Python2 and at the same time check if it 
> could be run in Python3 for given L? 
>
> Reason: allow_multiple_edges() on generic_graph.py and keep_label='min' 
> (or 'max'), can we have a nice deprecation? 
>
> -- 
> Jori Mäntysalo 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Import into sage nb causes internal error

2017-11-05 Thread Enrique Artal
Same problem here, I put the log in case it helps

2017-11-05T20:37:57+0100 [stdout#info] error uploading worksheet Could not 
build url for endpoint 'home' with values ['username']. Did you mean 
'worksheet_listing.home'
instead? 
Could not build url for endpoint 'home' with values ['username']. Did you 
mean 'worksheet_listing.home' instead? 
Traceback (most recent call last): 
 File "/usr/local/sage-8.0/local/lib/python2.7/site-packages/flask/app.py", 
line 1475, in full_dispatch_request 
   rv = self.dispatch_request() 
 File "/usr/local/sage-8.0/local/lib/python2.7/site-packages/flask/app.py", 
line 1461, in dispatch_request 
   return self.view_functions[rule.endpoint](**req.view_args) 
 File 
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sagenb/flask_version/decorators.py",
 
line 22, in wrapper 
   return f(*args, **kwds) 
 File 
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sagenb/flask_version/worksheet_listing.py",
 
line 427, in upload_worksheet 
   return current_app.message(s, url_for('home', username=g.username), 
username=g.username) 
 File 
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/flask/helpers.py", 
line 312, in url_for 
   return appctx.app.handle_url_build_error(error, endpoint, values) 
 File "/usr/local/sage-8.0/local/lib/python2.7/site-packages/flask/app.py", 
line 1641, in handle_url_build_error 
   reraise(exc_type, exc_value, tb) 
 File 
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/flask/helpers.py", 
line 305, in url_for 
   force_external=external) 
 File 
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/werkzeug/routing.py", 
line 1758, in build 
   raise BuildError(endpoint, values, method, self) 
BuildError: Could not build url for endpoint 'home' with values 
['username']. Did you mean 'worksheet_listing.home' instead?



El jueves, 5 de octubre de 2017, 15:23:08 (UTC+2), Angela Hicks escribió:
>
> You're correct.  (I just uploaded a .sws file without problem.)  I'm glad 
> to see it's otherwise being reported.
>
> On Thursday, October 5, 2017 at 5:55:42 AM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, October 5, 2017 at 10:22:38 AM UTC+1, Angela Hicks wrote:
>>>
>>> There's some speculation this is related to: this post 
>>>  which 
>>> seems not unreasonable, but I'll post the details here (at kcrisman's 
>>> suggestion).
>>>
>>> I'm running Fedora 26 as a virtual machine, I recently installed Sage 
>>> 8.0 from source. The installation worked great until I:
>>>
>>> 1) Uploaded a zipped file into the old sage notebook gui.
>>>
>>
>> Yes, indeed, this doesn't work with *.zip archives any more. :-(
>> https://github.com/sagemath/sagenb/issues/433
>>
>> Does it work for you with individual *.sws files (the "original" sagenb 
>> format)?
>> (this does work, I think)
>>
>>  
>>
>>> This triggers a 500:internal error on screen
>>> and a "Build Error:Could not build url for endpoint 'home' with values 
>>> ['username']. Did you mean 'worksheet_listing.home' instead?" on the 
>>> command line.
>>> The error seems benign (can be ignored) until I
>>> 2) Restart sage
>>> 3) Start the new Notebook Exporter gui.
>>> The gui has no links (so is not useable), and the command line reports a 
>>> much longer error, which is posted in entirety here 
>>> ,
>>>  
>>> where I first reported the problem.  
>>> Repeated restarts do not fix the problem, although after a single 
>>> restart both the notebook gui and the jupiter gui work fine.  I can 
>>> consistently replicate the same steps if I start again with a new copy of 
>>> the same virtual machine.  I have not tried reinstalling sage to see if I 
>>> can replicate the problem afterwards.
>>>
>>> In the linked post, someone pointed out that they assumed no one would 
>>> continue using sagenb, so if it was triggering a problem, it might not 
>>> affect very many.  I'm not sure how widespread this problem is, but it's 
>>> worth pointing out I seem to be triggering it by doing exactly what people 
>>> will tend to do as they update their sage server to 8.0:  First import old 
>>> notebooks into sagenb, then use the Notebook Exporter to switch them to 
>>> Jupyter.  
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Python3 comparing, an idea about deprecation

2017-11-05 Thread Jori Mäntysalo
Is it possible to run min(L) in Python2 and at the same time check if it 
could be run in Python3 for given L?


Reason: allow_multiple_edges() on generic_graph.py and keep_label='min' 
(or 'max'), can we have a nice deprecation?


--
Jori Mäntysalo


[sage-devel] Re: cannot push to trac

2017-11-05 Thread Emmanuel Charpentier
I have exactly the same problem on Trac#24121 
, and can't push "manually, since 
there is no upstream branch here yet. Y'v uploaded a patch, bu that's not 
as easy to manage...

Any ideas ?

--
Emmanuel Charpentier

Le samedi 7 octobre 2017 15:23:41 UTC+2, Martin R a écrit :
>
> I was trying to push to #23847, but get an unhelpful error message... 
> please help!
>
> martin@Martin-Laptop:~/sage-patchbot$ git trac push
> Pushing to Trac #23847...
> Guessed remote branch: 
> u/mantepse/make_the_experimental_fricas_package_optional
> Traceback (most recent call last):
>   File "/usr/local/bin/git-trac", line 18, in 
> cmdline.launch()
>   File "/usr/local/lib/python2.7/dist-packages/git_trac/cmdline.py", line 
> 223, in launch
> app.push(ticket_number, remote=args.remote, force=args.force)
>   File "/usr/local/lib/python2.7/dist-packages/git_trac/app.py", line 216, 
> in push
> self.repo.push(remote, force)
>   File 
> "/usr/local/lib/python2.7/dist-packages/git_trac/git_repository.py", line 
> 197, in push
> self.git.echo.push('trac', refspec)
>   File "/usr/local/lib/python2.7/dist-packages/git_trac/git_interface.py", 
> line 341, in meth
> return self.execute(git_cmd, *args, **kwds)
>   File "/usr/local/lib/python2.7/dist-packages/git_trac/git_interface.py", 
> line 98, in execute
> popen_stderr=subprocess.PIPE)
>   File "/usr/local/lib/python2.7/dist-packages/git_trac/git_interface.py", 
> line 263, in _run
> raise GitError(result)
> git_trac.git_error.GitError: 
>
> martin@Martin-Laptop:~/sage-patchbot$ git remote -v
> origin git://github.com/sagemath/sage.git (fetch)
> origin git://github.com/sagemath/sage.git (push)
> trac git://trac.sagemath.org/sage.git (fetch)
> trac g...@trac.sagemath.org:sage.git (push)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Polyhedron.integral_points_count() gives inconsistent answers on slices

2017-11-05 Thread 'Mark Bell' via sage-devel
Thanks for the suggestion. That might be the case but if I run 
"/usr/bin/time -v sage error.py" then I get 

Command exited with non-zero status 1
Command being timed: "sage error.py"
User time (seconds): 2.22
System time (seconds): 0.67
Percent of CPU this job got: 86%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.35
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 200116
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 81745
Voluntary context switches: 7875
Involuntary context switches: 191
Swaps: 0
File system inputs: 22
File system outputs: 4
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1

So it appears to be using ~200 MB of the 1000 MB shared RAM memory limit. 
Is there a better way to determine the resources being used / if I am 
hitting this limit?

On Sunday, November 5, 2017 at 2:05:31 AM UTC, William wrote:
>
> On Sat, Nov 4, 2017 at 6:27 PM, Matthias Koeppe 
>  wrote: 
> > Can you show the output of the crash on CoCalc? 
>
> Also, the crash could just be running out of memory... 
>
> > 
> > 
> > On Saturday, November 4, 2017 at 3:46:01 PM UTC-7, Mark Bell wrote: 
> >> 
> >> Thanks! 
> >> 
> >> I'm not sure if this is the right place to add this but the attached 
> >> example also causes LattE to crash, but I only see this behaviour when 
> I run 
> >> this code on CoCalc. When I run the script on my local machine with 
> >> latte_int installed it completes and prints out 19958. Surely this 
> isn't 
> >> being caused by the same bug. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to sage-devel+...@googlegroups.com . 
> > To post to this group, send email to sage-...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> William (http://wstein.org) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Polyhedron.integral_points_count() gives inconsistent answers on slices

2017-11-05 Thread 'Mark Bell' via sage-devel
Here is the full CoCalc output when I run "sage error.py" in a terminal, 
either via the web interface or via sshing into the machine:

Traceback (most recent call last):
  File "error.py", line 42, in 
print(P.integral_points_count(preprocess=False))
  File 
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py",
 
line 218, in integral_points_count
**kwds)
  File 
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/latte.py",
 
line 159, in count
raise RuntimeError("LattE integrale program failed (exit code 
{})".format(ret_code) + err.strip())
RuntimeError: LattE integrale program failed (exit code -6):
This is LattE integrale 1.7.3
Available from http://www.math.ucdavis.edu/~latte/
 
Invocation: count '--redundancy-check=none' --cdd /dev/stdin
Warning: Not performing check for empty polytope, because it is 
unimplemented for the CDD-style input format.
size = 22 x 19
Number Type = rational
Ax <= b, given as (b|-A):
=
[-1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 0 1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
[97 -2 -8 -1 -7 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[-1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[97 -2 -5 -1 -4 0 -3 0 0 0 0 0 0 0 0 0 0 0 0]

Ax = b, given as (b|-A):

[0 1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1]
[0 0 1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0]
[0 0 1 -1 2 0 0 0 0 0 0 0 0 0 0 -1 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0]
[-100 2 8 1 7 0 0 0 0 0 0 0 3 0 0 0 0 0 0]
[0 0 1 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0]
[0 0 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0]
[0 0 1 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0]
[-100 2 5 1 4 0 3 0 3 0 0 0 0 0 0 0 0 0 0]
[-100 2 5 1 4 0 3 3 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]

Computing hermitean normal form.
sol:
[0 0 0 0 0 0 -100 0 0 -100 0 0 0 0 0 0 0 0]
Particular solution:
Basis:
New inequalities:
[99 -3 -3 -5 -5 -1 0]
[-101 3 3 5 6 2 0]
[-1 0 0 0 0 1 0]
[-1 0 0 0 1 0 0]
[-1 0 0 1 0 0 0]
[-1 1 0 0 0 0 0]
[-3 3 3 -3 -3 0 0]
[99 -3 -3 -4 -5 -2 0]
[-3 0 3 0 0 0 0]
Time for reading and preprocessing: 0 sec
The polytope has 12 vertices.
Time for computing vertices and supporting cones: 0 sec
Time for dualizing general cones: 0 sec
Dualizing all cones...All cones are now dualized.
Time for dualizing general cones: 0 sec
decomposeCones_Single: Decomposing all cones. (Memory Save on)
12 cones total to be done!decomposeCones_Single: degree = 1
Number of cones: 12
Triangulating cone... done.
count: barvinok/barvinok.cpp:572: int 
barvinokDecomposition_Single(listCone*, Single_Cone_Parameters*): Assertion 
`num_rays == Parameters->Number_of_Variables'
failed.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.