Re: [sage-devel] Re: Error building Sage

2018-09-19 Thread Kathryn Burton
I tried to build it in the same directory as before.

I just created a new directory and ran the pre built binary. And that
worked. Thanks!

On Tue, Sep 18, 2018 at 1:33 PM Erik Bray  wrote:

> You have some files with the wrong permissions set on them.  When you
> write "I decided to rebuild the newest version of sage on my new
> computer" were you building in the same directory as before, or from
> scratch in a new clone of the repository?  I ask because it's doubtful
> that an upgrade from some 2 year old version of Sage will work
> cleanly, and it's probably better if you start from a clean
> repository.
>
> That said, even if you did a `git pull` to update to the latest
> develop branch I don't know why those files would have incorrect
> permissions.  But try running `chmod -R a-X build/pkgs/*/spkg-*`.
> On Tue, Sep 18, 2018 at 6:30 PM Kathryn Burton 
> wrote:
> >
> > Attached is the log for the patch. Thanks so much for all your help!
> >
> >
> >
> > On Mon, Sep 17, 2018 at 6:47 PM John H Palmieri 
> wrote:
> >>
> >> The file attached to the post ends with the log for patch:
> >>
> >>>
> >>> [patch-2.7.5] Found local metadata for patch-2.7.5
> >>> [patch-2.7.5] Using cached file
> /Users/knburton12/Downloads/sage-master/upstream/patch-2.7.5.tar.gz
> >>> [patch-2.7.5] patch-2.7.5
> >>> [patch-2.7.5] 
> >>> [patch-2.7.5] Setting up build directory for patch-2.7.5
> >>> [patch-2.7.5] Finished extraction
> >>> [patch-2.7.5] No patch files found in ../patches
> >>> [patch-2.7.5]
> 
> >>> [patch-2.7.5] spkg-install should not be marked executable in the
> build/pkgs directory
> >>> [patch-2.7.5]
> 
> >>> [patch-2.7.5] Please email sage-devel (
> http://groups.google.com/group/sage-devel)
> >>> [patch-2.7.5] explaining the problem and including the log file
> >>> [patch-2.7.5]
>  /Users/knburton12/Downloads/sage-master/logs/pkgs/patch-2.7.5.log
> >>> [patch-2.7.5] Describe your computer, operating system, etc.
> >>> [patch-2.7.5]
> 
> >>> make[1]: ***
> [/Users/knburton12/Downloads/sage-master/local/var/lib/sage/installed/patch-2.7.5]
> Error 1
> >>
> >>
> >>
> >>
> >>
> >> On Monday, September 17, 2018 at 2:50:20 PM UTC-7, Travis Scrimshaw
> wrote:
> >>>
> >>> What package(s) is it failing on? Can you post the log files?
> >>>
> >>> Thanks,
> >>> Travis
> >>>
> >>> On Tuesday, September 18, 2018 at 7:08:56 AM UTC+10, Kathryn Burton
> wrote:
> 
>  I built sage for the first time in Sept 2016. I decided to rebuild
> the newest version of sage on my new computer, but I keep getting the same
> make error. I have a MacBook Pro running High Sierra version 10.13.3.
> >>
> >> --
> >> 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.
> >
> >
> >
> > --
> > Kathryn Burton
> > knburto...@gmail.com
> >
> > --
> > 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.
>
> --
> 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.
>


-- 
Kathryn Burton
knburto...@gmail.com

-- 
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: Profiling subfunction

2018-09-19 Thread Travis Scrimshaw
I am not sure this is possible. At least for such testing/profiling 
purposes, you could just pop the function out and explicitly pass the 
necessary data.

Best,
Travis


On Wednesday, September 19, 2018 at 11:05:26 PM UTC+10, Jori Mäntysalo 
wrote:
>
> %lprun is a nice tool that shows how much time each line of the function 
> uses. But can I do profiling for an internal function defined inside outer 
> function? 
>
> -- 
> 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] Profiling subfunction

2018-09-19 Thread Jori Mäntysalo
%lprun is a nice tool that shows how much time each line of the function 
uses. But can I do profiling for an internal function defined inside outer 
function?


--
Jori Mäntysalo


Re: [sage-devel] bug in interface to pari's nffactor

2018-09-19 Thread Bruno Grenet
I've had time to find the origin of the bug: It appears to be a bug in 
Pari 2.11.0 (cf below). I've submitted a bug report.


? f = x^20 - 15*x^19 + 70989*x^18 - 1646113*x^17 + 3890074283*x^16 - 
199035549796*x^15 + 203804256639644*x^14 - 10657741285726487*x^13 + 
9779630086245476401*x^12 - 457685358591718595073*x^11 + 
211985887298317287648516*x^10 - 13621268697129972225420327*x^9 + 
3065457104886066023133986949*x^8 - 28110542105571309419720191704*x^7 + 
34539665971867983088754678645580*x^6 - 1061445386217881235978009629856081*x^5 + 
498395492968339432558541006017143039*x^4 - 
15789239186368833250097534490638459475*x^3 + 
1774782276941552319212370439848636475557*x^2 + 
4469330093535998306027448264353195140536*x + 
4277406750726325717327241436124994515881;

? g = y^20 - 5*y^19 - 497395*y^18 + 43617925*y^17 + 92084825461*y^16 - 
13577322967760*y^15 - 7694013534722665*y^14 + 1430561593275815035*y^13 + 
321534254513790999596*y^12 - 70299145498412320125190*y^11 - 
6894702144208513885815805*y^10 + 1786517983436254067840917780*y^9 + 
72426826805051978098685836211*y^8 - 24338190557208310471662504670520*y^7 - 
255231848841911020332784180965840*y^6 + 
172908549561723112381441893500998965*y^5 - 
1042438501414486010172621550211101919*y^4 - 
555813027721813935650430329326884907050*y^3 + 
6754721428610694790490649672796107843280*y^2 + 
470810707124413968773034018937652067163520*y + 
3896560262532181966922924457358135376686480;

? nffactor(g,f)

  ***   at top-level: nffactor(g,f)

  *** ^-

  *** nffactor: bug in LLL_cmbf [no factor], please report.

  ***   Break loop: type 'break' to go back to GP prompt


Bruno


Le 14/09/2018 à 13:40, Dima Pasechnik a écrit :

One could use 'git bisect' to narrow the problem down to a particular commit.
Just in case...
On Fri, Sep 14, 2018 at 12:16 PM Bruno Grenet  wrote:

I've also tested on Ubuntu with gcc. Actually, I run new tests: The bug
appears between 8.4beta2 (where it's still ok) and 8.4beta3. I'll try to
find the the origin of the bug.

Bruno

Le 14/09/2018 à 10:38, Dima Pasechnik a écrit :

It might be a platform dependent bug. I guess John is working on some
Ubunty machine, using gcc.

Please provide compiler details you're using, too...



On Fri, Sep 14, 2018 at 9:25 AM Bruno Grenet  wrote:

Which version of SageMath are you using? I am unable to reproduce the
bug neither on 8.3beta7 nor on 8.4beta2.

Bruno

Example with 8.4beta2:

sage: x = polygen(QQ)
sage: f = x^20 - 15*x^19 + 70989*x^18 - 1646113*x^17 + 3890074283*x^16 -
199035549796*x^15 + 203804256639644*x^14 - 10
: 657741285726487*x^13 + 9779630086245476401*x^12 -
457685358591718595073*x^11 + 211985887298317287648516*x^10 - 1
: 3621268697129972225420327*x^9 + 3065457104886066023133986949*x^8 -
28110542105571309419720191704*x^7 + 345396659
: 71867983088754678645580*x^6 -
1061445386217881235978009629856081*x^5 +
498395492968339432558541006017143039*x^4
: - 15789239186368833250097534490638459475*x^3 +
1774782276941552319212370439848636475557*x^2 + 446933009353599830
: 6027448264353195140536*x + 4277406750726325717327241436124994515881
:
sage: g = x^20 - 5*x^19 - 497395*x^18 + 43617925*x^17 + 92084825461*x^16
- 13577322967760*x^15 - 7694013534722665*x^14
:  + 1430561593275815035*x^13 + 321534254513790999596*x^12 -
70299145498412320125190*x^11 - 6894702144208513885815
: 805*x^10 + 1786517983436254067840917780*x^9 +
72426826805051978098685836211*x^8 - 243381905572083104716625046705
: 20*x^7 - 255231848841911020332784180965840*x^6 +
172908549561723112381441893500998965*x^5 - 10424385014144860101
: 72621550211101919*x^4 -
555813027721813935650430329326884907050*x^3 +
6754721428610694790490649672796107843280*x
: ^2 + 470810707124413968773034018937652067163520*x +
3896560262532181966922924457358135376686480
:
sage: Kf. = NumberField(f)
sage: Kg. = NumberField(g)
sage: embeddings = Kf.embeddings(Kg)
sage: len(embeddings)
2


Le 13/09/2018 à 16:16, John Cremona a écrit :

I have two polynomials of degree 20 defining the same number field (I
obtained the second from the first using pari's polredbest()
routine).  I am able to use is_isomorphic() to find isomorphisms
between them (there are 2) but embeddings() raises an error since
roots() does:

sage: x = polygen(QQ)
sage: f = (x^20 - 15*x^19 + 70989*x^18 - 1646113*x^17 +
3890074283*x^16 - 199035549796*x^15 + 203804256639644*x^14 -
10657741285726487*x^13 + 9779630086245476401*x^12 -
457685358591718595073*x^11 + 21
: 1985887298317287648516*x^10 - 13621268697129972225420327*x^9 +
3065457104886066023133986949*x^8 - 28110542105571309419720191704*x^7 +
34539665971867983088754678645580*x^6 - 106144538621788123597
: 8009629856081*x^5 + 498395492968339432558541006017143039*x^4 -
15789239186368833250097534490638459475*x^3 +
1774782276941552319212370439848636475557*x^2 +
446933009353599830602744826435319514053
: 6*x + 4277406750726325717327241436124994515881)
sage: g = (x^20 - 5*x^19 - 

[sage-devel] Re: [sage-support] Sage 8.3 build fails in Fedora

2018-09-19 Thread Dima Pasechnik
For installing from source, read
http://doc.sagemath.org/html/en/installation/index.html
namely:
http://doc.sagemath.org/html/en/installation/source.html
On Wed, Sep 19, 2018 at 10:42 AM Dima Pasechnik  wrote:
>
> You have downloaded a binary release, which you should install by running
> ./sage
>
> and not by configure+make - the latter is for building from source.
> HTH
> Dima
> On Wed, Sep 19, 2018 at 10:27 AM ET  wrote:
> >
> > I downloaded the Fedora version of Sage 8.3 from the official website of 
> > Sage, but when I extracted the content and run following:
> >
> > ./configure
> > make -j$(nproc)
> >
> >
> >
> > It throws an error that it cannot find g++. More specifically this error:
> >
> >> patching /home/etairi/app/SageMath/local/bin/g++
> >> Traceback (most recent call last):
> >>   File "./relocate-once.py", line 207, in 
> >> ch(3469651, 3469823).save()
> >>   File "./relocate-once.py", line 113, in patch
> >> self.search_and_replace, self.filename
> >>   File "./relocate-once.py", line 52, in __init__
> >> super(FileBinaryPatch, self).__init__(search_and_replace, filename)
> >>   File "./relocate-once.py", line 40, in __init__
> >> self.st = os.stat(filename)
> >> OSError: [Errno 2] No such file or directory: 
> >> '/home/user/app/SageMath/local/bin/g++'
> >> make: *** [Makefile:31: base-toolchain] Error 1
> >
> >
> > When I actually checked the `/local/bin` directory inside the SageMath 
> > folder, indeed there is no g++, but the other tools are there. How can I 
> > build Sage 8.3 from source in Fedora?
> >
> > --
> > 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 post to this group, send email to sage-supp...@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sage-support.
> > For more options, visit https://groups.google.com/d/optout.

-- 
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-support] Sage 8.3 build fails in Fedora

2018-09-19 Thread Dima Pasechnik
You have downloaded a binary release, which you should install by running
./sage

and not by configure+make - the latter is for building from source.
HTH
Dima
On Wed, Sep 19, 2018 at 10:27 AM ET  wrote:
>
> I downloaded the Fedora version of Sage 8.3 from the official website of 
> Sage, but when I extracted the content and run following:
>
> ./configure
> make -j$(nproc)
>
>
>
> It throws an error that it cannot find g++. More specifically this error:
>
>> patching /home/etairi/app/SageMath/local/bin/g++
>> Traceback (most recent call last):
>>   File "./relocate-once.py", line 207, in 
>> ch(3469651, 3469823).save()
>>   File "./relocate-once.py", line 113, in patch
>> self.search_and_replace, self.filename
>>   File "./relocate-once.py", line 52, in __init__
>> super(FileBinaryPatch, self).__init__(search_and_replace, filename)
>>   File "./relocate-once.py", line 40, in __init__
>> self.st = os.stat(filename)
>> OSError: [Errno 2] No such file or directory: 
>> '/home/user/app/SageMath/local/bin/g++'
>> make: *** [Makefile:31: base-toolchain] Error 1
>
>
> When I actually checked the `/local/bin` directory inside the SageMath 
> folder, indeed there is no g++, but the other tools are there. How can I 
> build Sage 8.3 from source in Fedora?
>
> --
> 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 post to this group, send email to sage-supp...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
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: libgap is not using the available memory

2018-09-19 Thread Volker Braun
Is your computer running more than one gap process at a time? There are 
more states for swap space than free and used, it can also be exclusively 
reseved (but not necessarily used). This is what gap is doing and probably 
not reflected in your output.



On Tuesday, September 18, 2018 at 9:38:04 PM UTC+2, Simon Brandhorst wrote:
>
> sage: V = libgap.GF(13)^500
> sage: S = V.Subspaces(50)
> sage: S.List()
> gap: cannot extend the workspace any more!
>
>
> As expected the computation runs out of memory. However, there is still a 
> lot of unused memory. 
>
> Before:
>
>   totalusedfree  shared  
> buff/cache   available
> Mem:15G1.8G 11G290M
> 2.3G 13G
> Swap:   39G  0B 39G
>
> Right before termination
>
> Mem:15G5.7G7.6G287M2.3G
> 9.2G
> Swap:   39G  0B 39G
>   
> After
>  totalusedfree  shared  
> buff/cache   available
> Mem:15G1.6G 11G287M
> 2.3G 13G
> Swap:   39G  0B 39G
>
> In 
> https://groups.google.com/forum/#!topic/sage-support/m6R8_NKepyQ
> it is suggested to increase the swap space. 
> However with 40 GB of swap I can only use about 4GB.
> On a different machine with 64 GB of swap I can use about 8 GB.
> However assigning more swap is impossible as I start to run out of hard 
> disk space.
> Can you reproduce this behavior? Suggestions?
>

-- 
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] libgap is not using the available memory

2018-09-19 Thread Simon Brandhorst
Dear Dima,

thank you so much. It works :-). I would suggest to hint at this solution 
in the error message.
As soon as gap does not take sage with it anymore when running out of 
memory.
Best
Simon

On Tuesday, September 18, 2018 at 10:10:06 PM UTC+2, Dima Pasechnik wrote:
>
> The arguments with which libgap is started are set up in 
> src/sage/libs/gap/util.pyx 
> in the function initialize() 
>  - setting various members of argv. In particular look for what `-o` is 
> set to. 
> By digging through the code, it appears that it's set by 
> set_gap_memory_pool_size() 
> from interfaces/gap.py 
>
> So if you call set_gap_memory_pool_size with a big value, before 
> starting libgap, you might get 
> more (I didn't try) 
>
> HTH, 
> Dima 
> On Tue, Sep 18, 2018 at 9:38 PM Simon Brandhorst  > wrote: 
> > 
> > sage: V = libgap.GF(13)^500 
> > sage: S = V.Subspaces(50) 
> > sage: S.List() 
> > gap: cannot extend the workspace any more! 
> > 
> > 
> > As expected the computation runs out of memory. However, there is still 
> a lot of unused memory. 
> > 
> > Before: 
> > 
> >   totalusedfree  shared 
>  buff/cache   available 
> > Mem:15G1.8G 11G290M2.3G 
> 13G 
> > Swap:   39G  0B 39G 
> > 
> > Right before termination 
> > 
> > Mem:15G5.7G7.6G287M2.3G 
>9.2G 
> > Swap:   39G  0B 39G 
> > 
> > After 
> >  totalusedfree  shared 
>  buff/cache   available 
> > Mem:15G1.6G 11G287M2.3G 
> 13G 
> > Swap:   39G  0B 39G 
> > 
> > In 
> > https://groups.google.com/forum/#!topic/sage-support/m6R8_NKepyQ 
> > it is suggested to increase the swap space. 
> > However with 40 GB of swap I can only use about 4GB. 
> > On a different machine with 64 GB of swap I can use about 8 GB. 
> > However assigning more swap is impossible as I start to run out of hard 
> disk space. 
> > Can you reproduce this behavior? Suggestions? 
> > 
> > -- 
> > 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. 
>

-- 
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.