Re: [mpir-devel] MPIR fails in "make check"

8 views
Skip to first unread message

Bill Hart

unread,
Sep 3, 2013, 3:01:38 PM9/3/13
to Peter Sebastian Nordholt, mpir-dev
Hi Peter,

The gcc look ok, and the processor is being detected correctly, so the problem is likely that it is a virtual machine. We have this sort of problem because cpuid on the virtual machine reports a processor different to that which the machine actually has, and then doesn't emulate it correctly. Possibly Amazon EC2 has a heterogeneous pool of machines, but the virtual machine is designed to fake up a cpu for you.

What I would try is:

./configure --build=core2-unknown-linux-gnu --enable-gmpcompat --enable-cxx
make clean
make
make check

See if that works. If not, we will have to look further for the source of the problem.

Whilst it is possible that there is a bug in mpir, it is somewhat likely that the particular version of gcc has a bug, or the virtual machine is screwing up the cpu features, given that we have seen similar things before (though not this precise problem I believe).

Bill.


On 3 September 2013 07:20, Peter Sebastian Nordholt <psnor...@gmail.com> wrote:
Sure, here is the extra info:

-------------

cat /proc/cpuinfo:

processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 45
model name    : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
stepping    : 7
microcode    : 0x70a
cpu MHz        : 1800.000
cache size    : 20480 KB
physical id    : 0
siblings    : 1
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc up rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes avx hypervisor lahf_lm
bogomips    : 3600.00
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

-------------

config.guess:

sandybridge-unknown-linux-gnu

-------------

gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

-------------

Also, yes I am using a virtual machine. More specifically I am running this on a Amazon EC2 instance.

I hope the above helps identify the problem. Let me know if you would like more info. And thanks a lot for the help :).

/Peter


On Monday, September 2, 2013 6:21:36 PM UTC+2, Bill Hart wrote:
Hi Peter,

Can you tell us what processor you have, e.g.

cat /proc/cpuinfo

Also, what does the following yield in the top level mpir directory:

./config.guess

Also what version of GCC do you have:

gcc -v

The bug you are reporting seems to be new. I'm don't recall seeing it before.

The output you are getting seems to imply that either the compiler is compiling for the wrong cpu or the wrong assembly code is chosen somehow. Anyhow, with the above additional information we can hopefully track down the problem for you.

Also, are you using a virtual machine?

Bill.


On 2 September 2013 16:10, Peter Sebastian Nordholt <psnor...@gmail.com> wrote:
I am trying to install MPIR as described in the manual (www.mpir.org/mpir-2.6.0.pdf)

I.e. I am doing the following steps:

wget http://www.mpir.org/mpir-2.6.0.tar.bz2
tar xvjf mpir-2.6.0.tar.bz2
cd mpir-2.6.0
sudo ./configure --enable-gmpcompat --enable-cxx
sudo make
sudo make check
sudo make install

However the "make check" part fails and I get the following output:

...

 PASS: t-fat
 PASS: t-gcdext
 /bin/bash: line 1: 28625 Illegal instruction     (core dumped) "$tst" > t-get_d.log-t 2>&1
 FAIL: t-get_d
 PASS: t-hgcd

...

=============================================================
 1 of 50 tests failed
 See tests/mpn/test-suite.log
 Please report to http://groups.google.co.uk/group/mpir-devel/
=============================================================
 make[5]: *** [test-suite.log] Error 1
 make[5]: Leaving directory `/home/ubuntu/temp/MPIR/mpir-2.6.0/tests/mpn'
 make[4]: *** [check-TESTS] Error 2
 make[4]: Leaving directory `/home/ubuntu/temp/MPIR/mpir-2.6.0/tests/mpn'
 make[3]: *** [check-am] Error 2
 make[3]: Leaving directory `/home/ubuntu/temp/MPIR/mpir-2.6.0/tests/mpn'
 make[2]: *** [check-recursive] Error 1
 make[2]: Leaving directory `/home/ubuntu/temp/MPIR/mpir-2.6.0/tests'
 make[1]: *** [check-recursive] Error 1
 make[1]: Leaving directory `/home/ubuntu/temp/MPIR/mpir-2.6.0'
 make: *** [check] Error 2

The "tests/mpn/test-suite.log" file reads like so:

==========================================
   MPIR 2.6.0: tests/mpn/test-suite.log
==========================================

1 of 50 tests failed.

.. contents:: :depth: 2


FAIL: t-get_d (exit: 132)
=========================

Do you have an idea what I am doing wrong/how to fix it?

--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.


Bill Hart

unread,
Sep 6, 2013, 7:26:02 AM9/6/13
to Peter Sebastian Nordholt, mpir-dev
Hi Peter,

It's roughly equivalent. The problem with doing it your way is that you need to get all the CFLAGS correct. But if it worked, then there probably aren't any additional flags required for your machine.

Glad it worked anyway.

Bill.

On Friday, 6 September 2013, Peter Sebastian Nordholt wrote:
Hi Bill,

Actually before I read your update I tried something similar (or at least I think it is). Namely I did the following:

./configure --enable-gmpcompat --enable-cxx CFLAGS="-march=core2"
make
make check
make install

This seems to work (at least the check no longer fails). I am not very experienced with building software so I was wondering: is setting CFLAGS like I do here equivalent to your suggestion or should I rather do it your way?


/Peter
Reply all
Reply to author
Forward
0 new messages