Announcement

Collapse
No announcement yet.

How to enable verbose output

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

  • How to enable verbose output

    I am adding some logic to the NPB run scripts to allow all the NPB tests to run on systems that don't have "magic" numbers of cores. For example, the BT and SP tests require that the number of MPI ranks be a square (4,9,16,25,36,49 etc) while the LU, CG and MG tests require the number of ranks to be a power of 2. I'd like to figure out how to enable verbose output from all the various shell scripts so I can verify that my changes are getting used. If there is already a log file with this information, I cannot find it.
    Dan


  • #2
    Originally posted by dkokron View Post
    I am adding some logic to the NPB run scripts to allow all the NPB tests to run on systems that don't have "magic" numbers of cores. For example, the BT and SP tests require that the number of MPI ranks be a square (4,9,16,25,36,49 etc) while the LU, CG and MG tests require the number of ranks to be a power of 2. I'd like to figure out how to enable verbose output from all the various shell scripts so I can verify that my changes are getting used. If there is already a log file with this information, I cannot find it.
    Dan
    phoronix-test-suite debug-run npb
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #3
      Perfect. Here are my mods to the NPB scripting. I added SP.C as that case is useful to me. Do you prefer receiving code mods via merge request?

      git diff ob-cache/test-profiles/pts/npb-1.4.2/install.sh ob-cache/test-profiles/pts/npb-1.4.2/test-definition.xml
      diff --git a/ob-cache/test-profiles/pts/npb-1.4.2/install.sh b/ob-cache/test-profiles/pts/npb-1.4.2/install.sh
      index 932fa583b..f168508e7 100644
      --- a/ob-cache/test-profiles/pts/npb-1.4.2/install.sh
      +++ b/ob-cache/test-profiles/pts/npb-1.4.2/install.sh
      @@ -103,6 +103,7 @@ make lu CLASS=A
      make lu CLASS=C
      make sp CLASS=A
      make sp CLASS=B
      +make sp CLASS=C
      make is CLASS=D
      make mg CLASS=C
      make cg CLASS=C
      @@ -129,6 +130,13 @@ else
      HOSTFILE=""
      fi

      +NAME=\$(echo \[email protected] | cut -d. -f1)
      +if ([ "\$NAME" = "sp" ] || [ "\$NAME" = "bt" ]); then
      + NUM_THREADS=\$(echo "scale=0; (sqrt(\$NUM_THREADS))^2" | bc)
      +elif ([ "\$NAME" = "lu" ] || [ "\$NAME" = "cg" ] || [ "\$NAME" = "mg" ] || [ "\$NAME" = "ft" ]); then
      + NUM_THREADS=\$(echo "(l(\$NUM_THREADS)/l(2))" | bc -l | awk '{print 2^int(\$1)}')
      +fi
      +
      mpiexec --allow-run-as-root -np \$NUM_THREADS \$HOSTFILE ./bin/\[email protected] > \$LOG_FILE 2>&1
      echo \$? > ~/test-exit-status" > npb
      chmod +x npb

      diff --git a/ob-cache/test-profiles/pts/npb-1.4.2/test-definition.xml b/ob-cache/test-profiles/pts/npb-1.4.2/test-definition.xml
      index 7c8e2027d..183de65c2 100644
      --- a/ob-cache/test-profiles/pts/npb-1.4.2/test-definition.xml
      +++ b/ob-cache/test-profiles/pts/npb-1.4.2/test-definition.xml
      @@ -57,6 +57,11 @@
      <Value>sp.B</Value>
      <Message>Scalar Penta-diagonal solver</Message>
      </Entry>
      + <Entry>
      + <Name>SP.C</Name>
      + <Value>sp.C</Value>
      + <Message>Scalar Penta-diagonal solver</Message>
      + </Entry>
      <Entry>
      <Name>IS.D</Name>
      <Value>is.D</Value>

      Comment


      • #4
        This way works fine, will review and merge tomorrow. Thanks.
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #5
          In order to get good performance on partially populated nodes, we need to evenly distribute the MPI ranks on the available sockets. Does PTS provide a NUM_SOCKETS environment variable? I could parse $PROCESSOR to get that information. Is that the best approach?

          Comment


          • #6
            A potential solution for evenly distributing ranks on multi-socket nodes

            +NAME=\$(echo \[email protected] | cut -d. -f1)
            +if ([ "\$NAME" = "sp" ] || [ "\$NAME" = "bt" ]); then
            + NUM_THREADS=\$(echo "scale=0; (sqrt(\$NUM_THREADS))^2" | bc)
            +elif ([ "\$NAME" = "lu" ] || [ "\$NAME" = "cg" ] || [ "\$NAME" = "mg" ] || [ "\$NAME" = "ft" ]); then
            + NUM_THREADS=\$(echo "(l(\$NUM_THREADS)/l(2))" | bc -l | awk '{print 2^int(\$1)}')
            +fi
            +
            +NUM_SOCKETS=\$(lscpu | grep "Socket(s):" | awk '{print \$2}')
            +PPR=\$(echo "scale=0; \$NUM_THREADS / \$NUM_SOCKETS" | bc)
            +
            +mpiexec --allow-run-as-root -np \$NUM_THREADS \$HOSTFILE --map-by ppr:\$PPR:socket ./bin/\[email protected] > \$LOG_FILE 2>&1

            Comment


            • #7
              Ran a test of the NPB with and without even distribution of MPI ranks. Look like evenly distributing the ranks hurt performance for many of the tests.

              Baseline: npbUnevenDistribution
              Result: npbEvendistribution

              | Test | Configuration | Relative |
              | ---- | ------------- | -------- |
              | npb | BT.C | 0.941 |
              | npb | CG.C | 0.695 |
              | npb | EP.C | 1.002 |
              | npb | EP.D | 1.001 |
              | npb | FT.C | 0.896 |
              | npb | IS.D | 1.014 |
              | npb | LU.C | 0.831 |
              | npb | MG.C | 0.655 |
              | npb | SP.B | 0.849 |
              | npb | SP.C | 0.852 |

              Also, IS.D needs to be run with a power-of-2 number of ranks, thus ...
              +NAME=\$(echo \[email protected] | cut -d. -f1)
              +if ([ "\$NAME" = "sp" ] || [ "\$NAME" = "bt" ]); then
              + NUM_THREADS=\$(echo "scale=0; (sqrt(\$NUM_THREADS))^2" | bc)
              +elif ([ "\$NAME" = "lu" ] || [ "\$NAME" = "cg" ] || [ "\$NAME" = "mg" ] || [ "\$NAME" = "ft" ] || [ "\$NAME" = "is" ]); then
              + NUM_THREADS=\$(echo "(l(\$NUM_THREADS)/l(2))" | bc -l | awk '{print 2^int(\$1)}')
              +fi

              Comment


              • #8
                There is a NUM_CPU_NODES env var (see phoronix-test-suite diagnostics). Are you still tweaking things or should I merge the patch?

                (Yes, encountered the is.d issue as well and fixed it locally.)
                Michael Larabel
                http://www.michaellarabel.com/

                Comment


                • #9
                  No more tweaks from me. Please don't include the NUM_SOCKETS, PPR stuff as that hurts performance too much. I'll investigate that issue locally.

                  Comment


                  • #10
                    pts/npb-1.4.4 is now pushed out with the patches, thanks.
                    Michael Larabel
                    http://www.michaellarabel.com/

                    Comment

                    Working...
                    X