Topic
14 replies Latest Post - ‏2010-05-31T11:37:52Z by gcst
gshi
gshi
280 Posts
ACCEPTED ANSWER

Pinned topic request for benchmark code for mesuring FLOPS

‏2007-03-01T20:52:35Z |
hi, does anyone has benchmark code that can measure CELL's single and double precision FLOPS? thanks

-gshi
Updated on 2010-05-31T11:37:52Z at 2010-05-31T11:37:52Z by gcst
  • SystemAdmin
    SystemAdmin
    10114 Posts
    ACCEPTED ANSWER

    Re: request for benchmark code for mesuring FLOPS

    ‏2007-03-01T21:47:08Z  in response to gshi
    there is code available for that in the CELLSDK
    • SystemAdmin
      SystemAdmin
      10114 Posts
      ACCEPTED ANSWER

      Re: request for benchmark code for mesuring FLOPS

      ‏2007-03-01T22:01:37Z  in response to SystemAdmin
      The large matrix workload, in particular, reports single-precision GFLOPS (140+ on a PS3 with a large enough matrix).
    • SystemAdmin
      SystemAdmin
      10114 Posts
      ACCEPTED ANSWER

      Re: request for benchmark code for mesuring FLOPS

      ‏2008-03-27T10:46:27Z  in response to SystemAdmin
      I searched the sdk folder in /opt for benchmarks for FLOPS but couldnt find any. Please let me know where I can find benchmark code for GFLOPS of SPE.

      Also, to measure GFLOPS performance of a program, is there any way other than counting the operations by hand and dividing by the time?
      • CellServ
        CellServ
        1346 Posts
        ACCEPTED ANSWER

        Re: request for benchmark code for mesuring FLOPS

        ‏2008-03-27T15:38:52Z  in response to SystemAdmin
        Have you extracted all of the tar files in /opt/cell/src/src?

        If you extract demos_source.tar you'll get the Matrix Multiplication workload which can provide statistics like this:
        
        # /opt/cell/sdk/src/demos/matrix_mul/matrix_mul -p -s 16 -m 8192
        Initializing Arrays ... done
        Running test ... done
        Performance Statistics:
        number of SPEs = 16
        execution time = 3.02 seconds
        computation rate = 364.05 GFlops/sec
        data transfer rate = 22.84 GBytes/sec


        --
        IBM SDK Service Administrator
        • SystemAdmin
          SystemAdmin
          10114 Posts
          ACCEPTED ANSWER

          Re: request for benchmark code for mesuring FLOPS

          ‏2008-03-30T03:09:53Z  in response to CellServ
          Thanks for the info.
          I have SDK on an intel workstation. I got the executable to run in the simulator but got execution time = 0.00 seconds, computation rate=inf GFlops/sec and data transfer rate = inf GBytes/sec.
          I ran the executable on a PS3 on 4 SPEs but got an error message saying, "error while loading shared libraries: libmisc.so: cannot open shared object file: No such file or directory". I guess this is because there is no SDK installed on the PS3? Will install SDK on PS3 and let you know if I can get the correct output.

          thanks
          Sudhir
          • CellServ
            CellServ
            1346 Posts
            ACCEPTED ANSWER

            Re: request for benchmark code for mesuring FLOPS

            ‏2008-03-31T16:59:24Z  in response to SystemAdmin
            I get the same results on the simulator. Some of the timing code does not report properly on the simulator, so this must be the case.

            Once you get the SDK on the PS3 (and compile the libraries) you should have libmisc.

            --
            IBM SDK Service Administrator
            • SystemAdmin
              SystemAdmin
              10114 Posts
              ACCEPTED ANSWER

              Re: request for benchmark code for mesuring FLOPS

              ‏2008-04-16T23:16:41Z  in response to CellServ
              CellServ wrote:
              I get the same results on the simulator. Some of the timing code does not report properly on the simulator, so this must be the case.

              Once you get the SDK on the PS3 (and compile the libraries) you should have libmisc.

              --
              IBM SDK Service Administrator

              I'm sorry I don't quite follow. Is there a solution to this problem on the simulator?

              I am working with SDK 3.0 and in the simulator the matrix_mul demo has reported 0.00 second runtime every time except once, for -s 128, when it reported .01 seconds.

              Thanks,
              S.
              • SystemAdmin
                SystemAdmin
                10114 Posts
                ACCEPTED ANSWER

                Re: request for benchmark code for mesuring FLOPS

                ‏2008-04-17T00:10:52Z  in response to SystemAdmin
                Let me be more clear about what I have tried. On the host machine (Fedora 7 running on VMWare server):

                cd /opt/cell/sdk/src/demos/matrix_mul
                sudo make

                Then in the simulator:

                callthru source /opt/cell/sdk/src/demos/matrix_mul/matrix_mul > matrix_mul
                chmod +x matrix_mul
                ./matrix_mul -H -p -s 8 -m 128

                and get 0.00 seconds runtime. I then run the same matrix_mul command several times, and a couple times I have gotten 0.01 seconds runtime. When I increase the matrix size to 256, 512, etc I get 0.00 seconds.

                I have also tried to copy the matrix_mul source code to my home directory (~/cell/bench/matrix_mul) to play around with it a bit. However, I get some warnings during make:

                /opt/cell/sdk/buildutils/make.footer:1450: warning: overriding commands for target `matrix_mul'
                /opt/cell/sdk/buildutils/make.footer:1335: warning: ignoring old commands for target `matrix_mul'

                I have CELL_TOP set to /opt/cell/sdk and have tried changing INSTALL_DIR to "." -- this did not help. I assume it is a makefile problem resulting from the change of directories, but I can't figure out what might need to be changed.

                Thanks,
                Scott
                • CellServ
                  CellServ
                  1346 Posts
                  ACCEPTED ANSWER

                  Re: request for benchmark code for mesuring FLOPS

                  ‏2008-04-17T18:58:27Z  in response to SystemAdmin
                  When I run matrix_mul -H -p -s 8 -m 128 on a blade I also get .00 or .01, I suppose because the workload is too small.

                  If I increase this to matrix_mul -H -p -s 8 -m 2048 it reports .09 or .10 and I see the same result in the simulator.

                  For your build error, I don't recognize it but you might try removing these lines from the Makefile:
                  
                  INSTALL_DIR     = $(EXP_SDKBIN)/demos
                  INSTALL_FILES = $(PROGRAM_ppu)
                  since your user account might not have permission to access that directory.
                  --
                  IBM SDK Service Administrator
                  • SystemAdmin
                    SystemAdmin
                    10114 Posts
                    ACCEPTED ANSWER

                    Problem with running SDK 3.0 matrix multiply example code on Cell Blade

                    ‏2008-04-23T18:25:53Z  in response to CellServ
                    I tried running the matrix multiply executable in /opt/cell/sdk/src/demos/matrix_mul on Gatech's CellBuzz SDK 3.0 blades. I get the same error that I got on my Play station: "./matrix_mul: error while loading shared libraries: libmisc.so: cannot open shared object file: No such file or directory".
                    This is the same message I got on my PS3. I thought it was because there was no SDK installed. But SDK 3.0 is installed on CellBuzz nodes and this error is occuring there also.

                    Details:
                    1. I did a make in the directory /opt/cell/sdk/src/demos/matrix_mul on my workstation - Intel P4 machine with SDK installed
                    2. Transfer the executable to CellBuzz.
                    3. Enter interactive mode for Cell SDK 3.0 nodes
                    4. Run the command ./matrix_mul -H -p -s 8 -m 128
                    I get the error: "./matrix_mul: error while loading shared libraries: libmisc.so: cannot open shared object file: No such file or directory"

                    I am wondering how to get around this problem.
                    • SystemAdmin
                      SystemAdmin
                      10114 Posts
                      ACCEPTED ANSWER

                      Re: Problem with running SDK 3.0 matrix multiply example code on Cell Blade

                      ‏2008-04-23T20:21:21Z  in response to SystemAdmin
                      message
                      "./matrix_mul: error while loading shared libraries: libmisc.so: cannot open shared object file: No such file or directory"
                      means that it can not find the library. The libmisc.so is in cell-libs rpm. Verify that you have it installed. Also you want to check others as well, run ldd cmd on the program,
                      
                      # ldd ./matrix_mul
                      linux-vdso32.so.1 => (0x00100000)
                      libmisc.so => /opt/cell/sdk/usr/lib/libmisc.so (0x017d0000)
                      libspe2.so.2 => /usr/lib/libspe2.so.2 (0x01790000)
                      libpthread.so.0 => /lib/libpthread.so.0 (0x0fcd0000)
                      libm.so.6 => /lib/libm.so.6 (0x0fd40000)
                      libnuma.so.1 => /usr/lib/libnuma.so.1 (0x01760000)
                      libc.so.6 => /lib/libc.so.6 (0x0fe20000)
                      librt.so.1 => /lib/librt.so.1 (0x0fb30000)
                      libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x003c0000)
                      /lib/ld.so.1 (0x0ffc0000)


                      Also note that, if you run on a SP3 station, you need to reduce the number of spe to 6, -s 6.

                      Hope this helps
                  • SystemAdmin
                    SystemAdmin
                    10114 Posts
                    ACCEPTED ANSWER

                    Re: request for benchmark code for mesuring FLOPS

                    ‏2008-04-29T02:06:35Z  in response to CellServ
                    Thanks CellServ, commenting out those lines from the Makefile removed the make warning.

                    Scott
                    • DuraAce
                      DuraAce
                      1 Post
                      ACCEPTED ANSWER

                      Re: request for benchmark code for mesuring FLOPS

                      ‏2010-05-31T11:23:26Z  in response to SystemAdmin
                      Hi,

                      i have a problem with matrix_mul too. I'm running Fedora 11 on PS3 with SDK 3.1.
                      When trying to run matrix_mul i get following error:

                      $ ./matrix_mul -m 8192 -s 6 -p

                      WARNING: unable to open file /huge/matrix_mul_3906_0.bin (errno=2). Using malloc heap.
                      ERROR: unable to malloc 808452224 byte buffer.

                      With smaller matrices e.g. 128 i get same warning and execution time 0.00 seconds.

                      Can anybody help?
                      • gcst
                        gcst
                        171 Posts
                        ACCEPTED ANSWER

                        Re: request for benchmark code for mesuring FLOPS

                        ‏2010-05-31T11:37:52Z  in response to DuraAce
                        1.) 808452224 byte >> 256 MB (total memory of the PS3)
                        2.) google for hugetlbfs on the PS3