# Settings for HPL

**URL:** <https://forums.developer.nvidia.com/t/settings-for-hpl/25757>\
**Category:** CUDA Programming and Performance\
**Created:** [February 10, 2012, 4:18pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757 "2012-02-10T16:18:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![erasmuss22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@erasmuss22](https://forums.developer.nvidia.com/u/erasmuss22)\
**Post date:** [February 10, 2012, 4:18pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/1 "2012-02-10T16:18:20Z")

</div>

I finally got the GPU version of HPL to run on my system, but the results are not what they should be. I followed the Howto - HPL on NVIDIA GPUs guide, but my results are not comparable. I’m using the following bash script to run HPL between 2 nodes, each having 24 processors and 4 GPUs:  
export HPL\_DIR=/net/user/erasmussen/hpl-2.0\_FERMI\_v13  
export OMP\_NUM\_THREADS=6  
export MKL\_NUM\_THREADS=6  
export MKL\_DYNAMIC=FALSE  
export CUDA\_DGEMM\_SPLIT=0.836  
export CUDA\_DTRSM\_SPLIT=0.806  
export LD\_LIBRARY\_PATH=$HPL\_DIR/src/cuda:/usr/local/cuda/lib64:/opt/intel/composer\_xe\_2011\_sp1.7.256/mkl/lib/intel64:/opt/intel/composer\_xe\_2011\_sp1.7.256/compiler/lib/intel64:$LD\_LIBRARY\_PATH  
mpirun --machinefile machinefile --x LD\_LIBRARY\_PATH -np 8 xhpl

My machine file just lists each node I’m trying to run on 4 times each. Is this how I’m supposed to run the program? Or do I need to change something in my runscript / mpirun command? Currently I’m getting about 500 GFLOPs as a total score between the two nodes when each M2070 GPU should be getting more than that alone.

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [February 10, 2012, 4:30pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/2 "2012-02-10T16:30:03Z")

</div>

What N and NB did you use?  
How much memory is on the system and which interconnect?

---

<div class="post-metadata">

**Author:** ![erasmuss22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@erasmuss22](https://forums.developer.nvidia.com/u/erasmuss22)\
**Post date:** [February 10, 2012, 5:28pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/3 "2012-02-10T17:28:43Z")

</div>

> [@](#):
>
> What N and NB did you use?
> 
> How much memory is on the system and which interconnect?

There are 96 GB of memory on each node. I used this calculator to get an NB of 143360, N of 1, P of 2, and Q of 4. The system is using InfiniBand.

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [February 10, 2012, 5:36pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/4 "2012-02-10T17:36:38Z")

</div>

I assume you wanted to write N=143360 and NB=1.  
In any case, your choice of NB is incorrect.  
Please read the CUDA\_LINPACK\_README.txt file that explains how to choose the parameters:

NB should be a multiple of 128 (for best performance). It will also work with  
NB being a multiple of 64 but with lower performance. 768 typically gives best results  
larger values may give better results (1024) if several GPUs share the same PCIe connection

Try to replicate some of the output reported in the file.

---

<div class="post-metadata">

**Author:** ![erasmuss22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@erasmuss22](https://forums.developer.nvidia.com/u/erasmuss22)\
**Post date:** [February 10, 2012, 5:39pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/5 "2012-02-10T17:39:09Z")

</div>

> [@](#):
>
> I assume you wanted to write N=143360 and NB=1.
> 
> In any case, your choice of NB is incorrect.
> 
> Please read the CUDA\_LINPACK\_README.txt file that explains how to choose the parameters:
> 
> NB should be a multiple of 128 (for best performance). It will also work with
> 
> NB being a multiple of 64 but with lower performance. 768 typically gives best results
> 
> larger values may give better results (1024) if several GPUs share the same PCIe connection
> 
> Try to replicate some of the output reported in the file.

I misread the NBs as number of NBs and not actual NBs. I had it set to 512, Here is the HPL.dat file that I used.

HPLinpack benchmark input file

Innovative Computing Laboratory, University of Tennessee

HPL2.out output file name (if any)

8 device out (6=stdout,7=stderr,file)

1 # of problems sizes (N)

143360 Ns

1 # of NBs

512 NBs

0 PMAP process mapping (0=Row-,1=Column-major)

1 # of process grids (P x Q)

2 Ps

4 Qs

16.0 threshold

1 # of panel fact

2 PFACTs (0=left, 1=Crout, 2=Right)

1 # of recursive stopping criterium

4 NBMINs (\>= 1)

1 # of panels in recursion

2 NDIVs

1 # of recursive panel fact.

1 RFACTs (0=left, 1=Crout, 2=Right)

1 # of broadcast

1 BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM)

1 # of lookahead depth

1 DEPTHs (\>=0)

2 SWAP (0=bin-exch,1=long,2=mix)

64 swapping threshold

1 L1 in (0=transposed,1=no-transposed) form

1 U in (0=transposed,1=no-transposed) form

1 Equilibration (0=no,1=yes)

8 memory alignment in double (\> 0)

##### This line (no. 32) is ignored (it serves as a separator).

0 Number of additional problem sizes for PTRANS

1200 10000 30000 values of N

0 number of additional blocking sizes for PTRANS

40 9 8 13 13 20 16 32 64 values of NB

---

<div class="post-metadata">

**Author:** ![erasmuss22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@erasmuss22](https://forums.developer.nvidia.com/u/erasmuss22)\
**Post date:** [February 13, 2012, 2:42pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/6 "2012-02-13T14:42:31Z")

</div>

Something that is also weird is when I use `nvidia-smi -q | grep Gpu`, the GPU usage shows up as 99% for all 4 on one node, but 0% on the other. Using some Dell management software, I can see that while running HPL, only one GPU shows up as running at 140 watts (kilowatts?) and the others are below 90. In addition, when I run the N-body benchmark, all 4 GPUs show up at 200 watts(kw?) and on both nodes show up at 99% usage. Could my machine file have anything to do with it? This is what I use:

cuda012  
cuda012  
cuda012  
cuda012  
cuda013  
cuda013  
cuda013  
cuda013

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [February 13, 2012, 4:37pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/7 "2012-02-13T16:37:04Z")

</div>

Machinefile seems ok.  
You could enable verbose print in the Makefile in src/cuda and rebuild the libdgemm library.  
It will print out the GPU assignments and all the accelerated DGEMM/DTRSM calls.  
Which CUDA version are you running?

---

<div class="post-metadata">

**Author:** ![erasmuss22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@erasmuss22](https://forums.developer.nvidia.com/u/erasmuss22)\
**Post date:** [February 13, 2012, 4:51pm UTC](https://forums.developer.nvidia.com/t/settings-for-hpl/25757/8 "2012-02-13T16:51:03Z")

</div>

I am running CUDA 4.0
