Announcement

Collapse
No announcement yet.

Call for testing gmp-pi

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Call for testing gmp-pi

    In search of a better pi benchmark for PTS, I came across http://h2np.net/pi/. With some modifications that I have done I'm hoping this will replace super-pi as it is not optimized at all for processors. This one at least will apply the performance patches to gmp and give more accurate results as to a processors capability when optimized. The modified verstion can be found here:

    http://www.filefactory.com/file/agf1819/n/gmp-pi_tar_gz

    Please read the readme as it contains all that is needed to install. Don't worry everything it compiles is kept locally in the make directory and will not screw up any of your systems libraries.

    Let me know if it compiles, what distro, system specs and results. It would also be helpful if you could make sure that it's maxing out the processor usage during testing

    Thank you
    Dean

    Feedback always welcome.

    Just to start off a few results of what I'm looking for:

    openSUSE 11.1 64-bit, Phenom 9850 @ stock speeds
    -compiles fine
    Results from threads.txt
    Threads: 4 Time: 131.305

    openSUSE 11.1 64-bit 4200+ X2 @ stock speeds
    -compiles fine
    Results from threads.txt
    Threads: 2 Time: 304.430
    Last edited by deanjo; 05-04-2009, 10:47 PM.

  • #2
    openSUSE 11.1 64-bit, Phenom II 955 @ stock speeds
    -compiles fine
    Results from threads.txt
    Threads: 4 Time: 99.003

    Comment


    • #3
      Archlinux X86_64 Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz
      -complied fine except for some odd reason it did not detect a C2D processor
      Code:
      Try to setup GMP for Intel Core2 or Xeon, wait....
      Did not detect Intel Core 2 CPU.  Patch not installed
      checking build system type... pentium3-unknown-linux-gnu
      checking host system type... pentium3-unknown-linux-gnu
      Threads: 2 Time: 798.969

      Comment


      • #4
        Originally posted by Aradreth View Post
        Archlinux X86_64 Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz
        -complied fine except for some odd reason it did not detect a C2D processor
        Code:
        Try to setup GMP for Intel Core2 or Xeon, wait....
        Did not detect Intel Core 2 CPU.  Patch not installed
        checking build system type... pentium3-unknown-linux-gnu
        checking host system type... pentium3-unknown-linux-gnu
        Threads: 2 Time: 798.969
        Interesting. What distro Aradreth?

        Edit, nevermind just read it. Why is you proc being seen as a P3, hmmm?
        Last edited by deanjo; 05-16-2009, 04:46 PM.

        Comment


        • #5
          CPU ist an Intel C2D E6600 @ 2.4 Ghz. Gentoo ~amd64
          CPU is Intel(R)
          Try to setup GMP for Intel Core2 or Xeon, wait....
          Detected Intel Core 2 CPU
          Seems to patch and compile fine, but the compiler is called with mtune=k8? Wouldn't be mtune=core2 better?
          Anyway: Threads: 2 Time: 397.813 sec
          Edit: Wait what? The C2D is slower than the X2 4200+ in this bench? I guess somethings definitly not setup right.

          Comment


          • #6
            Ubuntu Jaunty 32-bit, Athlon64x2 5600+ @ stock speeds (2.9Ghz)
            -compiles fine
            Results from threads.txt
            Threads: 2 Time: 696.551

            Comment


            • #7
              Originally posted by Zhick View Post
              CPU ist an Intel C2D E6600 @ 2.4 Ghz. Gentoo ~amd64

              Seems to patch and compile fine, but the compiler is called with mtune=k8? Wouldn't be mtune=core2 better?
              Anyway: Threads: 2 Time: 397.813 sec
              Edit: Wait what? The C2D is slower than the X2 4200+ in this bench? I guess somethings definitly not setup right.

              No, the results are right (as far as AMD's being faster then their intel rivals). When it comes to GMP with assembly support the intels are much slower then the AMD's. Can you try the original to see if it calls mtune=k8 there.

              http://h2np.net/pi/pi_thread_e.html
              http://h2np.net/pi/pi_record_e.html

              Seems there is a newer version of the original out as well now which no longer uses the patches.
              Last edited by deanjo; 05-17-2009, 10:08 AM.

              Comment


              • #8
                uname: Linux 2.6.26.3 i686 GNU/Linux
                distro: Debian testing
                CPU 96% gmppi, 4% other programs

                Debian testing 32-bit, Athlon64 3200 @ 2390 MHz
                -compiles fine
                Results from threads.txt
                Threads: 1 Time: 1690.708

                By the way, I didn't understand what the intent of this new tool is. Is it a better way to stress the CPU? Anyway, good luck with it.

                Comment


                • #9
                  Originally posted by leef View Post
                  uname: Linux 2.6.26.3 i686 GNU/Linux
                  distro: Debian testing
                  CPU 96% gmppi, 4% other programs

                  Debian testing 32-bit, Athlon64 3200 @ 2390 MHz
                  -compiles fine
                  Results from threads.txt
                  Threads: 1 Time: 1690.708

                  By the way, I didn't understand what the intent of this new tool is. Is it a better way to stress the CPU? Anyway, good luck with it.

                  Just general benchmarking, plus it really does push a CPU to it's max, something a lot of multi-threaded apps don't

                  Comment


                  • #10
                    Originally posted by deanjo View Post
                    Seems there is a newer version of the original out as well now which no longer uses the patches.
                    Just tried 4.3.1. It compiles with -mtune=core2 by default and needs only 379 seconds to finish (with full kde running, contrary to 397s with your patched 4.2.2, mtune=k8 and no X Server running at all).
                    Edit: Just tried with 4.3.1 and -march=core2 and it finished in Time: 316.282 sec. I guess since your script is trying to optimize as much as possible you might as well add CFLAGS="-march=foo" to ./configure in your script.
                    Last edited by Zhick; 05-18-2009, 12:26 PM.

                    Comment


                    • #11
                      Tested it on another box: Ubuntu 9.04 64bit on Intel Core2 6320@stock 1.86Ghz and I ran into the same problem as Aradreth:
                      Code:
                      Try to setup GMP for Intel Core2 or Xeon, wait....
                      : 175: Yes: unexpected operator
                      Did not detect Intel Core 2 CPU.  Patch not installed
                      Checking build system type... core2-unknown-linux-gnu
                      Checking host system type... core2-unknown-linux-gnu
                      Checking for a BSD-compatible install... /usr/bin/install -c
                      The patch (gmp-4.2.x-core2-port.tar.gz) is downloaded alright. The program correctly detects 2 CPUs and runs them up to 100% each.

                      It seems that there is something in the install_gmp_4.2.x_core2_patch.sh script going wrong, since that doesn't detect the CPU correctly. I think it's in the tmp_is_core2_cpu.c, but I'm not very skilled at reading C. Compiling that code gives me:
                      Code:
                      gcc -m64 tmp_is_core2_cpu.c -o tmp_is_core2_cpu -v
                      Using built-in specs.
                      Target: x86_64-linux-gnu
                      Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --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.3.3 (Ubuntu 4.3.3-5ubuntu4) 
                      COLLECT_GCC_OPTIONS='-m64' '-o' 'tmp_is_core2_cpu' '-v' '-mtune=generic'
                       /usr/lib/gcc/x86_64-linux-gnu/4.3.3/cc1 -quiet -v tmp_is_core2_cpu.c -D_FORTIFY_SOURCE=2 -quiet -dumpbase tmp_is_core2_cpu.c -m64 -mtune=generic -auxbase tmp_is_core2_cpu -version -fstack-protector -o /tmp/ccZoYZJD.s
                      ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
                      ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../x86_64-linux-gnu/include"
                      ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
                      #include "..." search starts here:
                      #include <...> search starts here:
                       /usr/local/include
                       /usr/lib/gcc/x86_64-linux-gnu/4.3.3/include
                       /usr/lib/gcc/x86_64-linux-gnu/4.3.3/include-fixed
                       /usr/include
                      End of search list.
                      GNU C (Ubuntu 4.3.3-5ubuntu4) version 4.3.3 (x86_64-linux-gnu)
                      	compiled by GNU C version 4.3.3, GMP version 4.2.4, MPFR version 2.4.0.
                      GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
                      Compiler executable checksum: 67d7a81bea2b3850275b5f3aed53a5bf
                      COLLECT_GCC_OPTIONS='-m64' '-o' 'tmp_is_core2_cpu' '-v' '-mtune=generic'
                       as -V -Qy --64 -o /tmp/ccgs7G4d.o /tmp/ccZoYZJD.s
                      GNU assembler version 2.19.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.19.1
                      COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/
                      LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/
                      COLLECT_GCC_OPTIONS='-m64' '-o' 'tmp_is_core2_cpu' '-v' '-mtune=generic'
                       /usr/lib/gcc/x86_64-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o tmp_is_core2_cpu -z relro /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../.. /tmp/ccgs7G4d.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o
                      Anything odd in there?

                      Comment


                      • #12
                        SOLVED: Core2 not correctly identified on Ubuntu

                        I did some more digging: In the 'install_gmp_4.2.x_core2_patch.sh' script, the 'tmp_is_core2.c' is properly identifying the core2 processor, meaning that IS_CORE2_CPU is set to 'Yes' in my case. The script fails here:
                        Code:
                        123: if [ $IS_CORE2_CPU == "Yes" ]; then
                        124:    echo "Detected Intel Core 2 CPU"
                        The conditional fails on Ubuntu because Ubuntu has dash aliased to /bin/sh, not bash

                        Further more looks like it's a bug in their script, based on the (technically) incorrect but usually safe assumption that /bin/sh is just an alias of bash, Ubuntu is one of two distributions (ubuntu and debian) that use the more sh compliant dash by default. You could edit the first line from:
                        Code:
                        #!/bin/sh
                        to
                        Code:
                        #!/bin/bash
                        That indeed works. Changing that in install_gmp_4.2.x_core2_patch.sh gives:
                        Code:
                        Detected Intel Core 2 CPU
                        Found GMP at /home/mhb/software/gmp-pi/gmp-4.2.2
                        Version 4.2.x of GMP found.
                        Copying patch files:
                        amd64call.asm     --> /home/mhb/software/gmp-pi/gmp-4.2.2/tests
                        lahf_sahf_test.sh --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        add_n.asm         --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        sub_n.asm         --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        addmul_1.asm      --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        submul_1.asm      --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        mul_1.asm         --> /home/mhb/software/gmp-pi/gmp-4.2.2/mpn/x86_64
                        And for time differences:
                        Ubuntu 9.04 64bit Intel Core2 6320 @ 1.86Ghz

                        without optimizations: Time: 833.346 sec
                        with optimizations:Time: 553.875 (+/-) 12.8 sec

                        Considerable optimization, I'd say.

                        Code:
                        bash install.sh
                        Optimizing and Compiling GMP
                        Compiling gmp-chudnovsky
                        mt-bbp.c: In function ‘thread_func’:
                        mt-bbp.c:115: warning: unknown conversion type character ‘(’ in format
                        mt-bbp.c:115: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘time_t’
                        Cleaning up...
                        Finished
                        Aradreth, could you confirm that changing
                        Code:
                        16: # run patch
                        17: cd gmp-4.2.x-core2-port
                        18: ./install_gmp_4.2.x_core2_patch.sh ../gmp-4.2.2
                        to
                        Code:
                        16: # run patch
                        17: cd gmp-4.2.x-core2-port
                        18: bash ./install_gmp_4.2.x_core2_patch.sh ../gmp-4.2.2
                        correctly identifies your CPU now?

                        Comment


                        • #13
                          @Dewni

                          Debian does not use dash as sh, but most scripts are prepared for that. You could try this, which fixes some major bashisms:

                          sed -i 's/==/=/;s/pushd/cd/;s/popd//;s/echo\s\+-e/printf "%b\n"/' problematic-script

                          Comment


                          • #14
                            Hmm it doesn't detect my c2d with arch 64 bit.

                            Code:
                            CPU is Intel(R)
                            Try to setup GMP for Intel Core2 or Xeon, wait....
                            Did not detect Intel Core 2 CPU.  Patch not installed
                            checking build system type... pentium3-unknown-linux-gnu
                            checking host system type... pentium3-unknown-linux-gn
                            And the script already have the #!/bin/bash statement.

                            EDIT:
                            Actually its when their script is trying to compile tmp_is_core2_cpu.c in line 113. When it never creates a tmp_is_core2_cpu file, the script doesn't think I got a c2d.

                            Tried to compile the sourcecode myself, and get this:
                            Code:
                            $ gcc -m64 tmp_is_core2_cpu.c -o tmp_is_core2_cpu
                            /tmp/cc60oGZn.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
                            collect2: ld returned endingcode 1
                            I am using gcc version 4.4.0?

                            EDIT2:

                            Okay I got it to compile, but now the compiled tmp_is_core2_cpu doesn't think I got a core2duo either :P

                            Code:
                            $ ./tmp_is_core2_cpu
                            No
                            Wtf? :|
                            Last edited by tball; 05-19-2009, 12:20 PM.

                            Comment


                            • #15
                              Originally posted by Dewni View Post
                              Aradreth, could you confirm that changing
                              Code:
                              16: # run patch
                              17: cd gmp-4.2.x-core2-port
                              18: ./install_gmp_4.2.x_core2_patch.sh ../gmp-4.2.2
                              to
                              Code:
                              16: # run patch
                              17: cd gmp-4.2.x-core2-port
                              18: bash ./install_gmp_4.2.x_core2_patch.sh ../gmp-4.2.2
                              correctly identifies your CPU now?
                              Archlinux links sh to bash, so there would be no change.

                              Comment

                              Working...
                              X