Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bwDraco/HI64
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: bwDraco/HI64
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 28, 2014

  1. Update documentation, increase max filename length

    I've updating the documentation to better reflect the fact that memory
    use can now be limited. I've also increased the maximum filename length
    to 160 characters.
    Brian "DragonLord" Wong authored and Brian "DragonLord" Wong committed Dec 28, 2014
    Copy the full SHA
    25e8884 View commit details

Commits on Dec 29, 2014

  1. Fix filename string and memory limiter bugs

    Brian "DragonLord" Wong authored and Brian "DragonLord" Wong committed Dec 29, 2014
    Copy the full SHA
    6157036 View commit details

Commits on Jan 29, 2015

  1. Fix a bug where float binaries weren't generated

    Brian "DragonLord" Wong authored and Brian "DragonLord" Wong committed Jan 29, 2015
    Copy the full SHA
    3833f03 View commit details
Showing with 39 additions and 16 deletions.
  1. +19 −1 CHANGES.md
  2. +3 −3 Makefile
  3. +7 −3 README.md
  4. +8 −8 hi64.c
  5. +2 −1 hi64.h
20 changes: 19 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -20,4 +20,22 @@
- Added the ability to limit memory use. The memory limit is specified at
runtime in megabytes as the first parameter to the benchmark executable. The
output directory name is now specified by the second parameter.
- Fixed a typo in the out-of-memory error message.
- Fixed a typo in the out-of-memory error message.

## 0.3.1 (December 28, 2014)

- Updated documentation to reflect the memory limiting feature.
- Increased the maximum file name length to 200 characters.
- Minor stylistic changes in code.

## 0.3.2 (December 28, 2014)

- Fixed a bug in the memory limiting code which caused execution to continue
two trials past the limit.
- Fixed a bug affecting the filename string buffer limiting the filename to 80
characters rather than the intended 160.

## 0.3.3 (January 29, 2015)

- Fixed a bug in the Makefile that resulted in binaries not being generated for
single-precision floating-point computations.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: int16 int32 int64 short double longdouble
all: int16 int32 int64 float double longdouble

# Variables
ADVANCE = 1.2589
@@ -17,8 +17,8 @@ int32:
gcc -O1 -funroll-loops -march=native -DDSIZE=int32_t -DISIZE=uint64_t $(PARAMETERS) -o hi64-int32 hi64.c hkernel.c
int64:
gcc -O1 -funroll-loops -march=native -DDSIZE=int64_t -DISIZE=uint64_t $(PARAMETERS) -o hi64-int64 hi64.c hkernel.c
short:
gcc -O1 -funroll-loops -march=native -DDSIZE=short -DISIZE=uint64_t $(PARAMETERS) -o hi64-short hi64.c hkernel.c
float:
gcc -O1 -funroll-loops -march=native -DDSIZE=float -DISIZE=uint64_t $(PARAMETERS) -o hi64-float hi64.c hkernel.c
double:
gcc -O1 -funroll-loops -march=native -DDSIZE=double -DISIZE=uint64_t $(PARAMETERS) -o hi64-double hi64.c hkernel.c
longdouble:
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -35,7 +35,9 @@ disk paging to complete the computation, resulting in a dramatic slowdown and an
attendant drop in QUIPS. Specifically, the benchmark stops when the QUIPS for
the previous trial drops belows a predefined ratio of the peak QUIPS attained
during the benchmark or when the shortest lap in a trial takes longer than a
predefined amount of time. (More details on how to set these limits follow.)
predefined amount of time. Alternatively, the maximum amount of memory to use
can be set and the benchmark will stop when this limit is reached. (More details
on how to set these limits follow.)

## Building and configuration

@@ -75,7 +77,8 @@ An example build command would look like this:
A Makefile is included to simplify compilation of the benchmark. Running `make`
or `mingw32-make` will generate binaries which use `DSIZE` of 16-, 32-, and
64-bit integers as well as single-, double-, and extended-precision
floating-point numbers.
floating-point numbers. The Makefile currently assumes GCC; modify it as needed
if you are using a different compiler.

The macros in the "Adjustable Defines" section of `hi64.h` determine the
behavior of the benchmark, such as when to stop the benchmark and how many laps
@@ -150,7 +153,8 @@ directory does not exist, the benchmark will not run. (This unusual output
behavior was inherited from the original HINT code and will be changed in a
future release to make the program easier to use.)

The program runs until the `STOPRT` or `STOPTM` thresholds are reached. This
The program runs until the `STOPRT` or `STOPTM` thresholds are reached, or until
the specified memory limit is reached. If no memory limit is specified, this
generally means that the system will run out of memory and start swapping to
disk heavily before the benchmark is finished.

16 changes: 8 additions & 8 deletions hi64.c
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
int main(int argc, char *argv[])
{
FILE *curv; /* Output file for QUIPS curve */
char filnm[80]; /* Output file name */
char filnm[160]; /* Output file name */

Speed qdata[NSAMP]; /* Array to keep track of QUIPs and time */

@@ -58,12 +58,12 @@ int main(int argc, char *argv[])
qpnet, /* Net QUIPS; integral of QUIPS d(log t) */
qpeak, /* Peak QUIPS attained */
qprat, /* Ratio of current QUIPS to peak QUIPS */
qptmp, /* QUIPS temporary for calculating Net QUIPS */
qptmp, /* QUIPS temporary for calculating Net QUIPS */
t, /* Time for a given trial */
t0, /* Starting time */
t1, /* Ending time */
tdelta, /* Timer resolution */
/* tlast, */ /* Time of last recorded trial */
/* tlast, */ /* Time of last recorded trial */
tscout; /* Time for initial survey */

int64_t dbits, /* Number of bits of accuracy for dmax */
@@ -77,15 +77,15 @@ int main(int argc, char *argv[])

char* suffix; /* Suffix for data.suffix directory */

printf("\nHI64 System Benchmark, Version 0.3.0");
printf(" (December 28, 2014)\n");
printf("\nHI64 System Benchmark, Version 0.3.3");
printf(" (January 29, 2015)\n");
printf("Derived from HINT originally developed by");
printf(" John L. Gustafson & Quinn O. Snell,\n");
printf("Scalable Computing Laboratory, Iowa State University\n\n");
printf("Portions Copyright (C) 1994");
printf(" Iowa State University Research Foundation, Inc.\n");
printf("Portions Copyright (C) 2003 Moritz Franosch\n");
printf("Portions Copyright (C) 2014 Brian \"DragonLord\" Wong\n\n");
printf("Portions Copyright (C) 2014-2015 Brian \"DragonLord\" Wong\n\n");
printf("This program is licensed under the GNU GPL; see COPYING.txt.\n");
printf("NO WARRANTY OF ANY KIND IS PROVIDED, including any implied");
printf(" warranty of\nmerchantability or fitness for a particular");
@@ -112,7 +112,7 @@ if (memlimit < 0x7fffffffffffffffLL)
if (argc>=3) {
suffix=argv[2];
}
snprintf(filnm, 80, "data%s/%s", suffix, argv[0]);
snprintf(filnm, 160, "data%s/%s", suffix, argv[0]);
if ((curv = fopen(filnm, "w")) == NULL)
{
printf("Could not open data file\n");
@@ -216,7 +216,7 @@ if (memlimit < 0x7fffffffffffffffLL)
/* This loop is the main loop driver of the HINT kernel. */
for (t = 0, i = 0, n = NMIN, qpeak = 0, qprat = 1, memuse2 = 0;
((i < NSAMP) && (t < STOPTM) && (n < scx) && (qprat > STOPRT)
&& (memuse2 < memlimit * ADVANCE));
&& (memuse2 * ADVANCE < memlimit));
i++, n = ((int64_t)(n * ADVANCE) > n)? (n * ADVANCE) : n + 1)
{
printf(".");
3 changes: 2 additions & 1 deletion hi64.h
Original file line number Diff line number Diff line change
@@ -125,7 +125,8 @@
/* run out of decent-speed memory well before this */
#endif

#define MXPROC 32 /* Maximum number of processors to use in shared */ /* memory configuration. Adjust as necessary. */
#define MXPROC 32 /* Maximum number of processors to use in shared */
/* memory configuration. Adjust as necessary. */

/******************************************************************************/
/* Non-Adjustable Defines */