HINT Porting Guide

HINT is a universal benchmark. It has been ported to numerous platforms, almost all of which are different kinds of computers. In the following guide, we describe how to port and use HINT for a specific target machine. The simplest way is to use an executable if one available. If not or for the best performance results, you may need to port the code to the target platform. In about 90% cases, setting appropriate Makefile options is sufficient for porting HINT.  In case the code needs to be changed, we recommend starting with a similar version and then modifying it.  For best results, we recommend modifying with available compiler optimization flags and adjustable defines in the code.
 

Quick Reference

Remember we use C here!

In this document, we will refer to the ANSI C version of HINT. Experiments with HINT have revealed that the programming language used for the kernel code (C or Fortran), has no effect on the performance numbers. C has an added advantage over Fortran 77  that it allow us to use the malloc() and free() library calls to dynamically increase the size of the problem. C code is often easier to port to many platforms. We do have a Fortran version of HINT which we will discuss briefly in a later section.

HINT Source Code and functions

HINT source code is organized into five files:  Makefile, hint.h, typedefs.h, hint.c, and hkernel.c.

Makefile is the project maintenance file.  It contains the machine types,  pre-preprocessor directives, and the compiler optimization flags for compilation and linking.

hint.h is the header file which contains the essential #include, adjustable defines and non-adjustable defines, macros, type declarations, and function prototypes. We will discuss more about adjustable defines in a later section.

typedefs.h is the header file which contains all the type definitions. In particular, it determine the appropriate type of DSIZE (data type of computation), and  ISIZE (data type of indexing) depending upon the pre-processor directives typically specified  in the Makefile.

hint.c contains the main driver code. It has three main functions:

hkernel.c contains the kernel code. It has only one function: DSIZE Hint(...) which calculates the first-order hierarchical integration of a monotonously decreasing function. The refinement and accuracy  of the result  depends upon the number of subintervals. The larger the subinterval, the more accurate the results will be. However, it would require more calculations and hence it would take longer to compute.
 

Quick Start

In the following section, we will describe what you need to do port HINT to any desired machine.

General guidelines:

You must first choose the data type for computation. For double/int/long/longlong/float data type, the preprocessor define (see typedefs.h) is DOUBLE/INT/LONG/LONGLONG/FLOAT. You must also choose the data types for indexing. For int/long data types, the preprocessor define (see typedefs.h) is IINT/ILONG.
 

Serial Version

 Vector/Parallel-Vector Version
For porting a vector version, remember the following.  You can find details for most of the following in the vector computer's user manual.

Parallel Version

There are a number of paradigms which exist in the contemporary world of Parallel Computing.  Please follow the following guidelines for each of the version.

Check Makefile for the following and set if necessary.

 

Smart Tuning

We will now present here some ways of tuning HINT in a question and answer format. In order to get results  that may be fairly compared across machines, it is necessary to fine tune your HINT run to get the best curve possible.   The tradeoff is the best curve versus running time. The longer HINT is run,  closer one gets to the "perfect HINT curve". However do note that a short node may not produce the finest possible curve, butit is often sufficient for practical purpose. We recommend getting an initial version of HINT up and running before you attempt to fine tune it.

Q: What are adjustable defines? How, and why can I change them?
A: The header file hint.h contains a list of defines which the user can change to get  good performance numbers.

Q: I don't care about best results! How can I get  results fast?
A: The best way to get faster results is to increase the ADVANCE. You can also reduce the number of the trials (NTRIALS) and the number of re-trial for bogus results (PATIENCE).  The following configuration in  hint.h  will produce faster results. Though you may change either one or all the following #define.

#define ADVANCE 1.2589
#define PATIENCE 7
#define NTRIAL 5

The following configuration will give better results but will be slower than the one above.

#define ADVANCE 1.1
#define PATIENCE 13
#define NTRIAL 20

Q: My timer resolution is not good. What should I do ?
A: The easiest thing which you can do is to increase the RUNTM. This will increase the  number of iterations for a workload.

Q: I wrote my own timer. How do I test it?
A: Here are few tips:

Other Documents

Following links to some other documents which might be useful to the reader:

Hint Paper (html, postscript)
README (text, postscript)
README Background (text, postscript)
Understanding HINT Graphs (html)

The HINT homepage is at http://www.scl.ameslab.gov/HINT/ which contains links to all the HINT related documents.
 



 
Please send any  comments or suggestions to hint@scl.ameslab.gov. If you write a new version of HINT  or improve upon any of the  existing versions,   please submit your code to us.  We will appropriately acknowledge your work.