Re: [sage-combinat-devel] Rank and unrank for large FiniteEnumeratedSets

2012-12-13 Thread Nicolas M. Thiery
Hi Andrew!

On Wed, Dec 12, 2012 at 05:37:19PM -0800, Andrew Mathas wrote:
I have being trying to find the right idiom for look-up and reverse look
ups in large enumerated sets. Prior to sage, I simply would have made a
large list of the elements in the enumerated set and then just used
__getitem__ (implictly) and index().
 
I thought that in sage here might be an approved and efficient way of
doing this but instead I have been surprised. Consider:
sage: parts=Partitions(50)
sage: parts.category()
Category of finite graded enumerated sets
sage: mu=parts.unrank(204225);mu
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1]
sage: parts.rank(mu)
204225
which looks fine except that unrank is very quick whereas rank is very
slow. Certainly, rank() could be made more efficient by caching the result
)although what to do if the object has multiple parents), but I don't see
any way of making unrank() faster until you create a list of elements.
Here are the timing for this example:
 
sage: %timeit Partitions(50).unrank(204225)
625 loops, best of 3: 13.7 Aus per loop
sage: %timeit Partitions(50).rank(mu)
5 loops, best of 3: 3.66 s per loop
Actually, this is a slight lie: initially, rank and unrank both just run
through the iterator until they hit their match -- and this is slow -- but
after doing something like Partitions(50)[50], in the background
Partitions(50)._list has been created and unrank() has been replaced by
_list[ rank] whereas rank() is still using the iterator. The culprit seems
to be __getitem__ which is initially defined as
 
try:
return super(Parent, self).__getitem__(n)
 except AttributeError:
return self.list()[n]
 
With other (ungraded?) enumerated sets such as StandardTableaux(10) the
iterator is always used, and this is slow.
 
I think that the behaviour of Partitions(n) above is a bug, but I am
getting side-tracked. 
 
The question that is want to ask is:
 
If I have a (large but not hugely large) enumerated set for which I will
be doing frequent rank() and unrank() calls what is the recommended way of
playing with it?
 
My inclination now is just to turn the enumerated set into a list, as
_list[2832] and _list.index(mu) are as efficient as you get. Does anyone
know of a better way?

Short answer for now: if you have a finite enumerated set S and you do
S.list(), then this list is cached and used for most other operations
(counting, unranking, and probably random generation as a side
effect). It would be natural to extend this feature to ranking by
building a reverse dictionary (possibly with some level of lazyness,
so that the dictionary only gets built if unranking is actually used).

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Rank and unrank for large FiniteEnumeratedSets

2012-12-13 Thread Vincent Delecroix
2012/12/13, Nicolas M. Thiery nicolas.thi...@u-psud.fr:
   Hi Andrew!

 On Wed, Dec 12, 2012 at 05:37:19PM -0800, Andrew Mathas wrote:
I have being trying to find the right idiom for look-up and reverse
 look
ups in large enumerated sets. Prior to sage, I simply would have made
 a
large list of the elements in the enumerated set and then just used
__getitem__ (implictly) and index().

I thought that in sage here might be an approved and efficient way of
doing this but instead I have been surprised. Consider:
sage: parts=Partitions(50)
sage: parts.category()
Category of finite graded enumerated sets
sage: mu=parts.unrank(204225);mu
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1,
1]
sage: parts.rank(mu)
204225
which looks fine except that unrank is very quick whereas rank is very
slow. Certainly, rank() could be made more efficient by caching the
 result
)although what to do if the object has multiple parents), but I don't
 see
any way of making unrank() faster until you create a list of elements.
Here are the timing for this example:

sage: %timeit Partitions(50).unrank(204225)
625 loops, best of 3: 13.7 Aus per loop
sage: %timeit Partitions(50).rank(mu)
5 loops, best of 3: 3.66 s per loop
Actually, this is a slight lie: initially, rank and unrank both just
 run
through the iterator until they hit their match -- and this is slow --
 but
after doing something like Partitions(50)[50], in the background
Partitions(50)._list has been created and unrank() has been replaced
 by
_list[ rank] whereas rank() is still using the iterator. The culprit
 seems
to be __getitem__ which is initially defined as

try:
return super(Parent, self).__getitem__(n)
 except AttributeError:
return self.list()[n]

With other (ungraded?) enumerated sets such as StandardTableaux(10)
 the
iterator is always used, and this is slow.

I think that the behaviour of Partitions(n) above is a bug, but I am
getting side-tracked.

The question that is want to ask is:

If I have a (large but not hugely large) enumerated set for which I
 will
be doing frequent rank() and unrank() calls what is the recommended way
 of
playing with it?

My inclination now is just to turn the enumerated set into a list, as
_list[2832] and _list.index(mu) are as efficient as you get. Does
 anyone
know of a better way?

 Short answer for now: if you have a finite enumerated set S and you do
 S.list(), then this list is cached and used for most other operations
 (counting, unranking, and probably random generation as a side
 effect). It would be natural to extend this feature to ranking by
 building a reverse dictionary (possibly with some level of lazyness,
 so that the dictionary only gets built if unranking is actually used).

I actually did it in #8920 and removed as it appears that it slows
down everything as to test
  my_object in my_dictionnary
the object my_object needs to be hashable and you have to catch the
error. Perhaps I did it the wrong way... any advice is welcome.

Best,
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Rank and unrank for large FiniteEnumeratedSets

2012-12-13 Thread Nicolas M. Thiery
On Thu, Dec 13, 2012 at 10:06:41AM +0100, Vincent Delecroix wrote:
 I actually did it in #8920 and removed as it appears that it slows
 down everything as to test
   my_object in my_dictionnary
 the object my_object needs to be hashable and you have to catch the
 error. Perhaps I did it the wrong way... any advice is welcome.

Ok, let's discuss this this afternoon in Paris!

À toute,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



[sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Dima Pasechnik
[Followup-To: header set to gmane.comp.mathematics.sage.devel.]
On 2012-12-12, Anne Schilling a...@math.ucdavis.edu wrote:
 Hi!

 Both Travis and I are having trouble viewing the documentation after

 sage -docbuild reference html

 It yields a lot of [MathError] when viewing the html sources.
 The problem started occurring some time between 5.4.beta1 to 5.5.rc0,
 most likely due to the switch to mathjax from jsmath.
 Does anyone else have this problem? What do we need to do to fix this?
Hi Anne,

I reviewed that ticket, and I didn't see anything like this.

Could you please specify the particular URL in documentation where this
can be seen?
As well as your browser/OS...

It could be TeX errors in the docs, actually. We fixed a few on that ticket(s).

Thanks,

Dima

 Thanks,

 Anne


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Anne Schilling
On 12/13/12 8:17 AM, Dima Pasechnik wrote:
 Hi Anne,
 
 On 14 December 2012 00:01, Anne Schilling a...@math.ucdavis.edu wrote:
 On 12/13/12 2:37 AM, Dima Pasechnik wrote:
 [Followup-To: header set to gmane.comp.mathematics.sage.devel.]
 On 2012-12-12, Anne Schilling a...@math.ucdavis.edu wrote:
 Hi!

 Both Travis and I are having trouble viewing the documentation after

 sage -docbuild reference html

 It yields a lot of [MathError] when viewing the html sources.
 The problem started occurring some time between 5.4.beta1 to 5.5.rc0,
 most likely due to the switch to mathjax from jsmath.
 Does anyone else have this problem? What do we need to do to fix this?
 Hi Anne,

 I reviewed that ticket, and I didn't see anything like this.

 Could you please specify the particular URL in documentation where this
 can be seen?
 As well as your browser/OS...

 This happens for me for all documentation (whereever there is a formula
 like `f(x)=y`). I am using Firefox, MacOS 10.6.8.
 
 Could you please give one concrete URL, relative to SAGE_ROOT?
 I just opened Firefox, start browsing documentation, cannot see any 
 problems...

When I review a patch and want to check its documentation I do

sage -b
sage -docbuild reference html
.
Build finished.  The built documents can be found in 
/Applications/sage-5.5.rc0/devel/sage/doc/output/html/en/reference

Then if I check on my local computer in Firefox under for example

file:///Applications/sage-5.5.rc0/devel/sage/doc/output/html/en/reference/sage/combinat/posets/posets.html

the fourth line is

Constructs a (finite) [Math Processing Error]-element poset from a set of 
elements and a directed acyclic graph or poset.

But this happens in *all* files. This is not specific to a particular
doc.

 This happens for all TeX code though. Do I need to install something?
 You need to be online. Mathjax is uploading fonts on the fly.

I am online.

Best,

Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Dima Pasechnik
On 14 December 2012 00:33, Anne Schilling a...@math.ucdavis.edu wrote:
 On 12/13/12 8:17 AM, Dima Pasechnik wrote:
 Hi Anne,

 On 14 December 2012 00:01, Anne Schilling a...@math.ucdavis.edu wrote:
 On 12/13/12 2:37 AM, Dima Pasechnik wrote:
 [Followup-To: header set to gmane.comp.mathematics.sage.devel.]
 On 2012-12-12, Anne Schilling a...@math.ucdavis.edu wrote:
 Hi!

 Both Travis and I are having trouble viewing the documentation after

 sage -docbuild reference html

 It yields a lot of [MathError] when viewing the html sources.
 The problem started occurring some time between 5.4.beta1 to 5.5.rc0,
 most likely due to the switch to mathjax from jsmath.
 Does anyone else have this problem? What do we need to do to fix this?
 Hi Anne,

 I reviewed that ticket, and I didn't see anything like this.

 Could you please specify the particular URL in documentation where this
 can be seen?
 As well as your browser/OS...

 This happens for me for all documentation (whereever there is a formula
 like `f(x)=y`). I am using Firefox, MacOS 10.6.8.

 Could you please give one concrete URL, relative to SAGE_ROOT?
 I just opened Firefox, start browsing documentation, cannot see any 
 problems...

 When I review a patch and want to check its documentation I do

 sage -b
 sage -docbuild reference html
 .
 Build finished.  The built documents can be found in 
 /Applications/sage-5.5.rc0/devel/sage/doc/output/html/en/reference

 Then if I check on my local computer in Firefox under for example

 file:///Applications/sage-5.5.rc0/devel/sage/doc/output/html/en/reference/sage/combinat/posets/posets.html

 the fourth line is

 Constructs a (finite) [Math Processing Error]-element poset from a set of 
 elements and a directed acyclic graph or poset.

OK,  I can confirm this. It is Firefox-specific, as on OSX 10.6.8 I
only see this on Firefox (5.0.1), but not on Safari and Chrome.

Here are errors (from Firefox error console):

Error: no element found
Source File: chrome://web2pdfextension/content/feat_support_new.xul
Line: 1, Column: 20
Source Code:
!-- Dummy File --

Error: c.FONTDATA.FONTS.MathJax_Main[8212][5] is undefined
Source File: 
file:///usr/local/src/sage/sage-5.5.rc0/devel/sage/doc/output/html/en/reference/_static/jax/output/HTML-CSS/imageFonts.js
Line: 15

no idea why this fails on Firefox, but works on the remaining
browsers. Perhaps mathjax  (or/and Sage?) treats Firefox in a special
way.



 But this happens in *all* files. This is not specific to a particular
 doc.

 This happens for all TeX code though. Do I need to install something?
 You need to be online. Mathjax is uploading fonts on the fly.

 I am online.

 Best,

 Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: combinat out again?

2012-12-13 Thread William Stein
On Wed, Dec 12, 2012 at 11:30 PM, William Stein wst...@gmail.com wrote:
 On Wed, Dec 12, 2012 at 7:00 PM, Anne Schilling a...@math.ucdavis.edu wrote:
 Hi William,

 Is combinat.math.washington.edu out once again? The machine does not
 seem to respond.

 It's not crashed due to a memory error, since it responds to ping
 requests.  However, I can't ssh into it, which can happen when too
 many people run jobs at once (and the vm.overcommit ratio is too big,
 and there isn't enough swap).   I'll get the sysadmins to reboot the
 machine tomorrow morning, then tighten up the vm.overcommit, and add
 more swap.

The machine is back up.
The vm.overcommit stuff looks fine -- it's the same settings as on
sage.math, etc.

Later today, I'm going to add an extra 96GB of swap to the little 32GB
of swap currently there; this should help with stability a lot.

William


  -- William

 I saw that several people were running heavy computations on it for the
 last week and until yesterday, everything seemed fine.




 Thanks,

 Anne

 On 12/6/12 10:36 AM, William Stein wrote:
 Hi,

 After moving memory around, memtest86 (and the BIOS memtest) detected
 no errors.  If people can try to stress test
 combinat.math.washington.edu for the next 24 hours (especially with
 large-memory computations), that would be very useful!

 William

 On Wed, Dec 5, 2012 at 3:25 PM, William Stein wst...@gmail.com wrote:
 Hi,

 Andrew Ohana and I swapped two chips around and are currently running
 memtest86 on
 combinat.math.  I'll check on the results tomorrow at about noon.

  -- William

 On Tue, Dec 4, 2012 at 10:49 PM, Andrew Mathas
 andrew.mat...@sydney.edu.au wrote:
 Yes, thank you for taking care of this William. I am sure you have better
 things to do!

 Andrew




 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread John H Palmieri


On Thursday, December 13, 2012 9:03:51 AM UTC-8, Volker Braun wrote:

 Works for me on Firefox 17.0.1 on Linux x86_64. Can somebody try and see 
 if its fixed in more recent recent release?


In more detail: go to http://www.mathjax.org/download/ and follow the 
link for Current Version: MathJax-2.1. Unzip the file to get a directory 
called something like ~/Downloads/mathjax-MathJax-24a378e. Now, go to 
SAGE_ROOT/devel/sagenb/sagenb/data and do

$ mv mathjax mathjax-old
$ mv ~/Downloads/mathjax-MathJax-24a378e mathjax

and try looking at the documentation.

-- 
John
 

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/fWfuYoY47ugJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread John H Palmieri


On Thursday, December 13, 2012 9:09:15 AM UTC-8, John H Palmieri wrote:



 On Thursday, December 13, 2012 9:03:51 AM UTC-8, Volker Braun wrote:

 Works for me on Firefox 17.0.1 on Linux x86_64. Can somebody try and see 
 if its fixed in more recent recent release?


 In more detail: go to http://www.mathjax.org/download/ and follow the 
 link for Current Version: MathJax-2.1. 


Or perhaps Volker meant a more recent release of Firefox. What is the most 
recent release available for OS X 10.6.8?

-- 
John

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/lCFZQHfbZAYJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Volker Braun
On Thursday, December 13, 2012 5:13:38 PM UTC, John H Palmieri wrote:

 Or perhaps Volker meant a more recent release of Firefox. What is the most 
 recent release available for OS X 10.6.8?


Thats what I meant - most recent version is 17.0.1 on all platforms. 

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/FH6XOM8wCXwJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Dima Pasechnik
I should mention that this kind of error was reported on
http://trac.sagemath.org/sage_trac/ticket/13143
but nobody was able to say exactly where the problem lies.
Now we know, it's Firefox-specific.

I can also add that on OSX 10.5 with Firefox version 3.6.28 the situation is
the same.

Anyhow, the workaround ---use another browser--- is there...


Best,
Dima

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread John H Palmieri


On Thursday, December 13, 2012 9:17:24 AM UTC-8, Volker Braun wrote:

 On Thursday, December 13, 2012 5:13:38 PM UTC, John H Palmieri wrote:

 Or perhaps Volker meant a more recent release of Firefox. What is the 
 most recent release available for OS X 10.6.8?


 Thats what I meant - most recent version is 17.0.1 on all platforms. 


I wonder if upgrading MathJax would help anyway.

-- 
John
 

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/zsS8xVr14eYJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Anne Schilling
On 12/13/12 9:17 AM, Volker Braun wrote:
 On Thursday, December 13, 2012 5:13:38 PM UTC, John H Palmieri wrote:
 
 Or perhaps Volker meant a more recent release of Firefox. What is the 
 most recent release available for OS X 10.6.8?
 
 
 Thats what I meant - most recent version is 17.0.1 on all platforms. 

I just upgraded to 17.0.1. That did not seem to help.

Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Anne Schilling
On 12/13/12 9:09 AM, John H Palmieri wrote:
 
 
 On Thursday, December 13, 2012 9:03:51 AM UTC-8, Volker Braun wrote:
 
 Works for me on Firefox 17.0.1 on Linux x86_64. Can somebody try and see 
 if its fixed in more recent recent release?
 
 
 In more detail: go to http://www.mathjax.org/download/ and follow the link 
 for Current Version: MathJax-2.1. Unzip the file to get a directory called 
 something like
 ~/Downloads/mathjax-MathJax-24a378e. Now, go to 
 SAGE_ROOT/devel/sagenb/sagenb/data and do
 
 $ mv mathjax mathjax-old
 $ mv ~/Downloads/mathjax-MathJax-24a378e mathjax
 
 and try looking at the documentation.

I tried. It did not help either.

Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Travis Scrimshaw

On Thursday, December 13, 2012 9:32:49 AM UTC-8, Dima Pasechnik wrote:

 I should mention that this kind of error was reported on 
 http://trac.sagemath.org/sage_trac/ticket/13143 
 but nobody was able to say exactly where the problem lies. 
 Now we know, it's Firefox-specific. 

 I can also add that on OSX 10.5 with Firefox version 3.6.28 the situation 
 is 
 the same. 

 Anyhow, the workaround ---use another browser--- is there... 

  
I switched to Chromium (18.0.1025.168) and then it worked for me, so I can 
reconfirm it is a Firefox-specific issue. I'm running Firefox 15.0.1 on an 
Ubuntu 10.04 VM through VirtualBox.

Thanks,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/9rrFjM-TWKcJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



[sage-combinat-devel] Re: combinat out again?

2012-12-13 Thread Dima Pasechnik
On 2012-12-13, William Stein wst...@gmail.com wrote:
 On Wed, Dec 12, 2012 at 11:30 PM, William Stein wst...@gmail.com wrote:
 On Wed, Dec 12, 2012 at 7:00 PM, Anne Schilling a...@math.ucdavis.edu 
 wrote:
 Hi William,

 Is combinat.math.washington.edu out once again? The machine does not
 seem to respond.

 It's not crashed due to a memory error, since it responds to ping
 requests.  However, I can't ssh into it, which can happen when too
 many people run jobs at once (and the vm.overcommit ratio is too big,
 and there isn't enough swap).   I'll get the sysadmins to reboot the
 machine tomorrow morning, then tighten up the vm.overcommit, and add
 more swap.

 The machine is back up.
 The vm.overcommit stuff looks fine -- it's the same settings as on
 sage.math, etc.

 Later today, I'm going to add an extra 96GB of swap to the little 32GB
 of swap currently there; this should help with stability a lot.

it might be GAP to blame, in part, as GAP reserves an amount of swap
sort of proportional to available RAM. Now imagine you run 50 Sage
sessions, each with an instance of GAP reserving a chunk of swap.
I tried to convince Volker on #13211 (comments 186 and later) 
that this should be fixed, but he didn't agree...

Dima


 William


  -- William

 I saw that several people were running heavy computations on it for the
 last week and until yesterday, everything seemed fine.




 Thanks,

 Anne

 On 12/6/12 10:36 AM, William Stein wrote:
 Hi,

 After moving memory around, memtest86 (and the BIOS memtest) detected
 no errors.  If people can try to stress test
 combinat.math.washington.edu for the next 24 hours (especially with
 large-memory computations), that would be very useful!

 William

 On Wed, Dec 5, 2012 at 3:25 PM, William Stein wst...@gmail.com wrote:
 Hi,

 Andrew Ohana and I swapped two chips around and are currently running
 memtest86 on
 combinat.math.  I'll check on the results tomorrow at about noon.

  -- William

 On Tue, Dec 4, 2012 at 10:49 PM, Andrew Mathas
 andrew.mat...@sydney.edu.au wrote:
 Yes, thank you for taking care of this William. I am sure you have better
 things to do!

 Andrew




 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org



 -- 
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: problems with documentation build

2012-12-13 Thread Andrew Mathas
I am using macosx 10.7.5 and firefox 17.0.1 and the page displays properly 
for me. So the problem is also operating system dependent.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/0NEjtuUHIx0J.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



[sage-combinat-devel] Re: combinat out again?

2012-12-13 Thread Volker Braun
On Thursday, December 13, 2012 10:06:47 PM UTC, Dima Pasechnik wrote:

 it might be GAP to blame, in part, as GAP reserves an amount of swap 
 sort of proportional to available RAM. 


Right now it basically eats all available swap, this is going to be fixed 
in #13211
 

 Now imagine you run 50 Sage 
 sessions, each with an instance of GAP reserving a chunk of swap. 


Then the GAP pool will become smaller for each subsequent session as 1/10th 
of the remaining swap (the default choice) gets less and less.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/-CxzWgqATp8J.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: combinat out again?

2012-12-13 Thread William Stein
On Thu, Dec 13, 2012 at 11:55 AM, William Stein wst...@gmail.com wrote:
 On Wed, Dec 12, 2012 at 11:30 PM, William Stein wst...@gmail.com wrote:
 On Wed, Dec 12, 2012 at 7:00 PM, Anne Schilling a...@math.ucdavis.edu 
 wrote:
 Hi William,

 Is combinat.math.washington.edu out once again? The machine does not
 seem to respond.

 It's not crashed due to a memory error, since it responds to ping
 requests.  However, I can't ssh into it, which can happen when too
 many people run jobs at once (and the vm.overcommit ratio is too big,
 and there isn't enough swap).   I'll get the sysadmins to reboot the
 machine tomorrow morning, then tighten up the vm.overcommit, and add
 more swap.

 The machine is back up.
 The vm.overcommit stuff looks fine -- it's the same settings as on
 sage.math, etc.

 Later today, I'm going to add an extra 96GB of swap to the little 32GB
 of swap currently there; this should help with stability a lot.

I changed the vm.overcommit settings to:

vm.overcommit_memory=2
vm.overcommit_ratio=60

and I've added the swap, so now there's 134GB of swap:

root@combinat:/etc# free
 total   used   free sharedbuffers cached
Mem: 198068436   20060256  178008180  0 5854844144288
-/+ buffers/cache:   15330484  182737952
Swap:134537208  0  134537208

Let me know if there's any trouble. I can buy and install another
disk so we have
more swap, if people feel that is a good idea (there is definitely
plenty of room in the
grant for this.)

 -- William


 William


  -- William

 I saw that several people were running heavy computations on it for the
 last week and until yesterday, everything seemed fine.




 Thanks,

 Anne

 On 12/6/12 10:36 AM, William Stein wrote:
 Hi,

 After moving memory around, memtest86 (and the BIOS memtest) detected
 no errors.  If people can try to stress test
 combinat.math.washington.edu for the next 24 hours (especially with
 large-memory computations), that would be very useful!

 William

 On Wed, Dec 5, 2012 at 3:25 PM, William Stein wst...@gmail.com wrote:
 Hi,

 Andrew Ohana and I swapped two chips around and are currently running
 memtest86 on
 combinat.math.  I'll check on the results tomorrow at about noon.

  -- William

 On Tue, Dec 4, 2012 at 10:49 PM, Andrew Mathas
 andrew.mat...@sydney.edu.au wrote:
 Yes, thank you for taking care of this William. I am sure you have better
 things to do!

 Andrew




 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org



 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] partitions

2012-12-13 Thread Anne Schilling
Hi Alex,

How about

def add_rho(mu,k):
mu = (mu+[0]*k)[:k]
return [mu[i]+k-i for i in range(k)]

def partitions_with_distinct_parts(N,k):
M = Integer(N-(k+1)*k/2)
P = Partitions(M,max_length=k)
return [add_rho(p,k) for p in P]

sage: partitions_with_distinct_parts(10,3)
[[7, 2, 1], [6, 3, 1], [5, 4, 1], [5, 3, 2]]

Best,

Anne

On 12/13/12 8:48 PM, Alex Ghitza wrote:
 Hi,
 
 For fixed positive integers k and N, I'd like to compute the list of 
 partitions
 
 N = n_1 + n_2 + ... + n_k
 
 such that n_1  n_2  ...  n_k.
 
 What's the best (i.e. fastest) way to achieve this?
 
 
 --
 Best,
 Alex
 
 --
 Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
 http://aghitza.org

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.