Re: [sage-devel] Compiling Sage stops at PPL

2018-07-13 Thread Erik Bray
On Fri, Jul 13, 2018 at 10:54 AM Erik Bray  wrote:
>
> On Fri, Jul 13, 2018 at 8:22 AM Odile  wrote:
> >
> > Le Thu, 12 Jul 2018 16:26:27 +0200,
> > Erik Bray  a écrit :
> >
> >
> > > Well here's certainly something interesting from the ppl config.log:
> > >
> > > 2837 config.lt:681: creating libtool
> > > 2838 configure:21701: checking for the GMP library version 4.1.3 or above
> > > 2839 configure:21790: ./libtool --mode=link --tag=CXX g++ -o conftest
> > > -g -O2 -frounding-math  -I/home/odile/prj/sage2/local/include
> > > -I/home/odile/prj/sage2/local/include
> > > -L/home/odile/prj/sage2/local/lib
> > > -Wl,-rpath,/home/odile/prj/sage2/local/lib  conftest.cpp
> > > -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp >&5
> > > 2840 libtool: link: g++ -o conftest -g -O2 -frounding-math
> > > -I/home/odile/prj/sage2/local/include
> > > -I/home/odile/prj/sage2/local/include  -Wl,-rpath
> > > -Wl,/home/odile/prj/sage2/local/lib conftest.cpp
> > > -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp
> > > 2841 configure:21790: $? = 0
> > > 2842 configure:21790: ./conftest
> > > 2843 ./configure: line 2318:  5834 Illegal instruction 
> > > ./conftest$ac_exeext
> > > 2844 configure:21790: $? = 132
> > > 2845 configure: program exited with status 132
> > >
> > >
> > > Hmm--a bug in MPIR with your CPU perhaps?  What CPU model/architecture is 
> > > it?
> > >
> >
> > $ cat /proc/cpuinfo
> > processor   : 0
> > vendor_id   : GenuineIntel
> > cpu family  : 6
> > model   : 60
> > model name  : Intel(R) Pentium(R) CPU G3240 @ 3.10GHz
> > stepping: 3
> > microcode   : 0x19
> > cpu MHz : 2092.922
> > cache size  : 3072 KB
> > physical id : 0
> > siblings: 2
> > core id : 0
> > cpu cores   : 2
> > apicid  : 0
> > initial apicid  : 0
> > fpu : yes
> > fpu_exception   : yes
> > cpuid level : 13
> > wp  : yes
> > flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
> > cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx 
> > pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl 
> > xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl 
> > vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt xsave 
> > rdrand lahf_lm abm cpuid_fault invpcid_single pti tpr_shadow vnmi 
> > flexpriority ept vpid fsgsbase tsc_adjust erms invpcid xsaveopt dtherm arat 
> > pln pts
> > bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
> > bogomips: 6186.01
> > clflush size: 64
> > cache_alignment : 64
> > address sizes   : 39 bits physical, 48 bits virtual
> > power management:
>
> Bill Hart would have the expertise here, but I believe you may be
> affected by this rare issue: https://github.com/wbhart/mpir/issues/209
>
>
> As a simple workaround, you could try for now building with
> --enable-fat for MPIR, which builds a more machine-generic MPIR by
> running:
>
> SAGE_FAT_BINARY=yes ./sage -f mpir
>
> Then, once MPIR has been re-built, run:
>
> make build
>
> again.  I don't think you necessarily need to keep SAGE_FAT_BINARY on,
> but you might try it just in case.

Alternatively, you can try the patch I just added at
https://trac.sagemath.org/ticket/25858

First check out my branch (it's based on 8.3.rc0 so not much else is
changed, though MPIR has many direct and indirect dependents so most
of Sage will wind up being rebuilt):

$ git fetch
$ git checkout --track origin/u/embray/ticket-25858

Rebuild MPIR; include SAGE_CHECK=yes to make sure it worked:

$ SAGE_CHECK=yes make mpir

If that worked then continue building the rest of Sage:

$ make

-- 
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: Sage on WSL

2018-07-13 Thread Erik Bray
On Thu, Jul 12, 2018 at 10:52 PM Samuel Lelievre
 wrote:
>
> Thu 2018-07-12 16:12:57 UTC+2, Friedrich Wiemer:
>
> > There were some discussions here on running Sage in the
> > Windows Subsystem for Linux, which comes with Windows 10.
> > This is just a status update, for those who are interested in
> > using Sage this way under Windows:
>
> > I have successfully compiled Sage 8.3.rc0 and most of the
> > tests also succeeds, attached is a test log. Many of the
> > failures during testing is due to the printed warning
> > /home/asante/local/src/sage/local/lib/python2.7/site-packages/psutil/_pslinux.py:469:
> >  RuntimeWarning: 'sin' and 'sout' swap memory stats couldn't be determined 
> > and were set to 0 ([Errno 2] No such file or directory: '/proc/vmstat')
> > warnings.warn(msg, RuntimeWarning)
> > but there are also some other problems - however, I have
> > not really looked into those.
> > Overall, from my little testing up to now, it looks like
> > compilation is "ok-ish" (still quite slow due to the many
> > hard-drive accesses I guess), and definitely one possibility
> > to start hacking on Sage when using Windows.
> >
> > If anyone would like me to test something specific, let me know.
>
> Thanks for this status update!
>
> See also
>
> - Ask Sage question 42959
>   RuntimeWarning [Sage 8.2 WSL]
>   https://ask.sagemath.org/question/42959

This is good news!  I'll have to give it a try--I haven't tried Sage
on WSL in quite a while.  I suspect this will be overall a better
experience for doing Sage development on Windows than using Cygwin,
though I'll be interested to try some performance comparisons.  I
suspect WSL will fare better for fork() alone.  I will try this at
some point and document how to set it up so that other people can use
it for Sage development on Windows.

That said, the Cygwin approach is still the only viable way to
*distribute* Sage for users in a works-out-of-the-box fashion.

-- 
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] Compiling Sage stops at PPL

2018-07-13 Thread Erik Bray
On Fri, Jul 13, 2018 at 8:22 AM Odile  wrote:
>
> Le Thu, 12 Jul 2018 16:26:27 +0200,
> Erik Bray  a écrit :
>
>
> > Well here's certainly something interesting from the ppl config.log:
> >
> > 2837 config.lt:681: creating libtool
> > 2838 configure:21701: checking for the GMP library version 4.1.3 or above
> > 2839 configure:21790: ./libtool --mode=link --tag=CXX g++ -o conftest
> > -g -O2 -frounding-math  -I/home/odile/prj/sage2/local/include
> > -I/home/odile/prj/sage2/local/include
> > -L/home/odile/prj/sage2/local/lib
> > -Wl,-rpath,/home/odile/prj/sage2/local/lib  conftest.cpp
> > -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp >&5
> > 2840 libtool: link: g++ -o conftest -g -O2 -frounding-math
> > -I/home/odile/prj/sage2/local/include
> > -I/home/odile/prj/sage2/local/include  -Wl,-rpath
> > -Wl,/home/odile/prj/sage2/local/lib conftest.cpp
> > -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp
> > 2841 configure:21790: $? = 0
> > 2842 configure:21790: ./conftest
> > 2843 ./configure: line 2318:  5834 Illegal instruction 
> > ./conftest$ac_exeext
> > 2844 configure:21790: $? = 132
> > 2845 configure: program exited with status 132
> >
> >
> > Hmm--a bug in MPIR with your CPU perhaps?  What CPU model/architecture is 
> > it?
> >
>
> $ cat /proc/cpuinfo
> processor   : 0
> vendor_id   : GenuineIntel
> cpu family  : 6
> model   : 60
> model name  : Intel(R) Pentium(R) CPU G3240 @ 3.10GHz
> stepping: 3
> microcode   : 0x19
> cpu MHz : 2092.922
> cache size  : 3072 KB
> physical id : 0
> siblings: 2
> core id : 0
> cpu cores   : 2
> apicid  : 0
> initial apicid  : 0
> fpu : yes
> fpu_exception   : yes
> cpuid level : 13
> wp  : yes
> flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx 
> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology 
> nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 
> ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt xsave rdrand 
> lahf_lm abm cpuid_fault invpcid_single pti tpr_shadow vnmi flexpriority ept 
> vpid fsgsbase tsc_adjust erms invpcid xsaveopt dtherm arat pln pts
> bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
> bogomips: 6186.01
> clflush size: 64
> cache_alignment : 64
> address sizes   : 39 bits physical, 48 bits virtual
> power management:

Bill Hart would have the expertise here, but I believe you may be
affected by this rare issue: https://github.com/wbhart/mpir/issues/209


As a simple workaround, you could try for now building with
--enable-fat for MPIR, which builds a more machine-generic MPIR by
running:

SAGE_FAT_BINARY=yes ./sage -f mpir

Then, once MPIR has been re-built, run:

make build

again.  I don't think you necessarily need to keep SAGE_FAT_BINARY on,
but you might try it just in case.

-- 
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] Compiling Sage stops at PPL

2018-07-13 Thread Odile
Le Thu, 12 Jul 2018 16:26:27 +0200,
Erik Bray  a écrit :


> Well here's certainly something interesting from the ppl config.log:
> 
> 2837 config.lt:681: creating libtool
> 2838 configure:21701: checking for the GMP library version 4.1.3 or above
> 2839 configure:21790: ./libtool --mode=link --tag=CXX g++ -o conftest
> -g -O2 -frounding-math  -I/home/odile/prj/sage2/local/include
> -I/home/odile/prj/sage2/local/include
> -L/home/odile/prj/sage2/local/lib
> -Wl,-rpath,/home/odile/prj/sage2/local/lib  conftest.cpp
> -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp >&5
> 2840 libtool: link: g++ -o conftest -g -O2 -frounding-math
> -I/home/odile/prj/sage2/local/include
> -I/home/odile/prj/sage2/local/include  -Wl,-rpath
> -Wl,/home/odile/prj/sage2/local/lib conftest.cpp
> -L/home/odile/prj/sage2/local/lib -lgmpxx -lgmp
> 2841 configure:21790: $? = 0
> 2842 configure:21790: ./conftest
> 2843 ./configure: line 2318:  5834 Illegal instruction 
> ./conftest$ac_exeext
> 2844 configure:21790: $? = 132
> 2845 configure: program exited with status 132
> 
> 
> Hmm--a bug in MPIR with your CPU perhaps?  What CPU model/architecture is it?
> 

$ cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 60
model name  : Intel(R) Pentium(R) CPU G3240 @ 3.10GHz
stepping: 3
microcode   : 0x19
cpu MHz : 2092.922
cache size  : 3072 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 
ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt xsave rdrand lahf_lm 
abm cpuid_fault invpcid_single pti tpr_shadow vnmi flexpriority ept vpid 
fsgsbase tsc_adjust erms invpcid xsaveopt dtherm arat pln pts
bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips: 6186.01
clflush size: 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model   : 60
model name  : Intel(R) Pentium(R) CPU G3240 @ 3.10GHz
stepping: 3
microcode   : 0x19
cpu MHz : 1934.931
cache size  : 3072 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 2
initial apicid  : 2
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 
ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt xsave rdrand lahf_lm 
abm cpuid_fault invpcid_single pti tpr_shadow vnmi flexpriority ept vpid 
fsgsbase tsc_adjust erms invpcid xsaveopt dtherm arat pln pts
bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips: 6186.01
clflush size: 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

-- 
Odile
Open Dream Kit http://www.opendreamkit.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.