Hello community, here is the log from the commit of package bandwidth for openSUSE:Factory checked in at 2017-11-10 14:57:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bandwidth (Old) and /work/SRC/openSUSE:Factory/.bandwidth.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bandwidth" Fri Nov 10 14:57:42 2017 rev:3 rq:540200 version:1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/bandwidth/bandwidth.changes 2017-06-19 13:23:48.168948178 +0200 +++ /work/SRC/openSUSE:Factory/.bandwidth.new/bandwidth.changes 2017-11-10 14:57:54.474970238 +0100 @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Thu Nov 9 09:57:36 UTC 2017 - [email protected] + +- Update to version 1.5 + - Fixed AVX bug. + - Added --nice mode Old: ---- bandwidth-1.4.2.tar.gz New: ---- bandwidth-1.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bandwidth.spec ++++++ --- /var/tmp/diff_new_pack.8K7dbe/_old 2017-11-10 14:57:55.754923940 +0100 +++ /var/tmp/diff_new_pack.8K7dbe/_new 2017-11-10 14:57:55.754923940 +0100 @@ -17,7 +17,7 @@ Name: bandwidth -Version: 1.4.2 +Version: 1.5 Release: 0 Summary: Memory and network benchmark program License: GPL-2.0 ++++++ bandwidth-1.4.2.tar.gz -> bandwidth-1.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/README.txt new/bandwidth-1.5/README.txt --- old/bandwidth-1.4.2/README.txt 2017-06-13 04:05:06.000000000 +0200 +++ new/bandwidth-1.5/README.txt 2017-11-08 03:33:50.000000000 +0100 @@ -38,6 +38,8 @@ the maximum bandwidth achieved using sequential, 128-bit memory accesses. +Release 1.5: + - Fixed AVX bug. Added --nice mode and CPU temperature monitoring (OS/X only). Release 1.4: - Added randomized 256-bit AVX reader & writer tests (Intel64 only). Release 1.3: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/defs.h new/bandwidth-1.5/defs.h --- old/bandwidth-1.4.2/defs.h 2017-06-13 04:04:26.000000000 +0200 +++ new/bandwidth-1.5/defs.h 2017-11-08 03:19:41.000000000 +0100 @@ -43,12 +43,13 @@ // 1.4 Added 256-bit routines RandomReaderAVX, RandomWriterAVX. // 1.4.1 Added --limit parameter. // 1.4.2 Fixed compiler warnings. +// 1.5 Fixed AVX writer bug that gave inaccurate results. Added nice mode. //--------------------------------------------------------------------------- #ifndef _DEFS_H #define _DEFS_H -#define RELEASE "1.4.2" +#define RELEASE "1.5" #ifdef __WIN32__ typedef char bool; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/main.c new/bandwidth-1.5/main.c --- old/bandwidth-1.4.2/main.c 2017-06-12 16:03:35.000000000 +0200 +++ new/bandwidth-1.5/main.c 2017-11-08 06:20:04.000000000 +0100 @@ -27,6 +27,7 @@ #include <sys/types.h> #include <sys/time.h> #include <sys/stat.h> +#include <ctype.h> #include <fcntl.h> #include <unistd.h> #include <math.h> @@ -71,6 +72,11 @@ OUTPUT_MODE_CSV=2, } outputMode; +// Mode to be nice and to keep CPU temperature low. +static bool nice_mode = false; +#define NICE_DURATION (2) +#define MAX_CPU_TEMP (50) + static int network_port = NETWORK_DEFAULT_PORTNUM; enum { @@ -288,6 +294,44 @@ } //========== + if (nice_mode) { + sleep (NICE_DURATION); + +#ifdef __APPLE__ +#define POPEN_BUFSIZE (256) + // Keep CPU temperature below 50 C. + // + int cpu_temperature = 0; + bool done = true; + do { + FILE *f = popen ("sysctl machdep.xcpm.cpu_thermal_level | sed '\''s/machdep.xcpm.cpu_thermal_level/CPU temperature/'\''", "r"); + if (f) { + char buffer [POPEN_BUFSIZE] = {0}; + if (0 < fread (buffer, 1, POPEN_BUFSIZE-1, f)) { + int i; + for (i=0; i < POPEN_BUFSIZE && buffer[i]; i++) { + if (isdigit (buffer[i])) + break; + } + if (i < POPEN_BUFSIZE) { + cpu_temperature = atoi (buffer + i); + printf ("CPU temperature is %d C.\n", cpu_temperature); + } else { + break; + } + } + pclose (f); + } else { + break; + } + + done = (cpu_temperature < MAX_CPU_TEMP); + if (!done) + sleep (10); + } while (!done); +#endif + } + if (outputMode & OUTPUT_MODE_GRAPH) { if (!graph) internal ("Graphing not initialized."); @@ -2003,7 +2047,7 @@ void usage () { - printf ("Usage: bandwidth [--slow] [--fast] [--faster] [--fastest] [--limit] [--title string] [--csv file]\n"); + printf ("Usage: bandwidth [--slow] [--fast] [--faster] [--fastest] [--limit] [--title string] [--csv file] [--nice]\n"); //printf ("Usage for starting network tests: bandwidth --network <ipaddr1> [<ipaddr2...] [--port <port#>]\n"); //printf ("Usage for receiving network tests: bandwidth --transponder [--port <port#>]\n"); @@ -2052,7 +2096,10 @@ } else #endif - if (!strcmp ("--slow", s)) { + if (!strcmp ("--nice", s)) { + nice_mode = true; + } + else if (!strcmp ("--slow", s)) { usec_per_test=20000000; // 20 seconds per test. } else @@ -2111,7 +2158,7 @@ } printf ("This is bandwidth version %s.\n", RELEASE); - printf ("Copyright (C) 2005-2016 by Zack T Smith.\n\n"); + printf ("Copyright (C) 2005-2017 by Zack T Smith.\n\n"); printf ("This software is covered by the GNU Public License.\n"); printf ("It is provided AS-IS, use at your own risk.\n"); printf ("See the file COPYING for more information.\n\n"); Binary files old/bandwidth-1.4.2/output/Raspberry-Ï3-1.2GHz-32bit.bmp and new/bandwidth-1.5/output/Raspberry-Ï3-1.2GHz-32bit.bmp differ Binary files old/bandwidth-1.4.2/output/Raspberry-Ï3-1.2GHz-32bit.jpg and new/bandwidth-1.5/output/Raspberry-Ï3-1.2GHz-32bit.jpg differ Binary files old/bandwidth-1.4.2/output/Raspberry-π3-1.2GHz-32bit.bmp and new/bandwidth-1.5/output/Raspberry-π3-1.2GHz-32bit.bmp differ Binary files old/bandwidth-1.4.2/output/Raspberry-π3-1.2GHz-32bit.jpg and new/bandwidth-1.5/output/Raspberry-π3-1.2GHz-32bit.jpg differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/routines-x86-32bit.asm new/bandwidth-1.5/routines-x86-32bit.asm --- old/bandwidth-1.4.2/routines-x86-32bit.asm 2017-05-14 21:27:59.000000000 +0200 +++ new/bandwidth-1.5/routines-x86-32bit.asm 2017-11-08 03:09:33.000000000 +0100 @@ -788,14 +788,14 @@ mov eax, [esp+4+8] .L2: - vmovdqa xmm0, [eax] ; Read aligned @ 16-byte boundary. - vmovdqa xmm0, [32+eax] - vmovdqa xmm0, [64+eax] - vmovdqa xmm0, [96+eax] - vmovdqa xmm0, [128+eax] - vmovdqa xmm0, [160+eax] - vmovdqa xmm0, [192+eax] - vmovdqa xmm0, [224+eax] + vmovdqa ymm0, [eax] ; Read aligned @ 16-byte boundary. + vmovdqa ymm0, [32+eax] + vmovdqa ymm0, [64+eax] + vmovdqa ymm0, [96+eax] + vmovdqa ymm0, [128+eax] + vmovdqa ymm0, [160+eax] + vmovdqa ymm0, [192+eax] + vmovdqa ymm0, [224+eax] add eax, 256 cmp eax, ebx @@ -1044,14 +1044,14 @@ mov eax, [esp+4+8] .L2: - vmovdqa [eax], xmm0 - vmovdqa [32+eax], xmm0 - vmovdqa [64+eax], xmm0 - vmovdqa [96+eax], xmm0 - vmovdqa [128+eax], xmm0 - vmovdqa [160+eax], xmm0 - vmovdqa [192+eax], xmm0 - vmovdqa [224+eax], xmm0 + vmovdqa [eax], ymm0 + vmovdqa [32+eax], ymm0 + vmovdqa [64+eax], ymm0 + vmovdqa [96+eax], ymm0 + vmovdqa [128+eax], ymm0 + vmovdqa [160+eax], ymm0 + vmovdqa [192+eax], ymm0 + vmovdqa [224+eax], ymm0 add eax, 256 cmp eax, ebx @@ -1225,14 +1225,14 @@ mov eax, [esp+4+8] .L2: - vmovntdq [eax], xmm0 ; Write bypassing cache. - vmovntdq [32+eax], xmm0 - vmovntdq [64+eax], xmm0 - vmovntdq [96+eax], xmm0 - vmovntdq [128+eax], xmm0 - vmovntdq [160+eax], xmm0 - vmovntdq [192+eax], xmm0 - vmovntdq [224+eax], xmm0 + vmovntdq [eax], ymm0 ; Write bypassing cache. + vmovntdq [32+eax], ymm0 + vmovntdq [64+eax], ymm0 + vmovntdq [96+eax], ymm0 + vmovntdq [128+eax], ymm0 + vmovntdq [160+eax], ymm0 + vmovntdq [192+eax], ymm0 + vmovntdq [224+eax], ymm0 add eax, 256 cmp eax, ebx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/routines-x86-64bit.asm new/bandwidth-1.5/routines-x86-64bit.asm --- old/bandwidth-1.4.2/routines-x86-64bit.asm 2017-06-12 16:04:23.000000000 +0200 +++ new/bandwidth-1.5/routines-x86-64bit.asm 2017-11-08 06:18:08.000000000 +0100 @@ -968,8 +968,6 @@ vmovdqa ymm1, [160+r10] vmovdqa ymm2, [192+r10] vmovdqa ymm3, [224+r10] - vpaddq ymm0, ymm1 - vpaddq ymm2, ymm3 add r10, 256 cmp r10, rsi @@ -1516,14 +1514,14 @@ mov r10, rdi .L2: - vmovntdq [r10], xmm0 ; Write bypassing cache. - vmovntdq [32+r10], xmm0 - vmovntdq [64+r10], xmm0 - vmovntdq [96+r10], xmm0 - vmovntdq [128+r10], xmm0 - vmovntdq [160+r10], xmm0 - vmovntdq [192+r10], xmm0 - vmovntdq [224+r10], xmm0 + vmovntdq [r10], ymm0 ; Write bypassing cache. + vmovntdq [32+r10], ymm0 + vmovntdq [64+r10], ymm0 + vmovntdq [96+r10], ymm0 + vmovntdq [128+r10], ymm0 + vmovntdq [160+r10], ymm0 + vmovntdq [192+r10], ymm0 + vmovntdq [224+r10], ymm0 add r10, 256 cmp r10, rsi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bandwidth-1.4.2/utility-x86-64bit.asm new/bandwidth-1.5/utility-x86-64bit.asm --- old/bandwidth-1.4.2/utility-x86-64bit.asm 2017-05-14 21:27:59.000000000 +0200 +++ new/bandwidth-1.5/utility-x86-64bit.asm 2017-10-05 05:09:35.000000000 +0200 @@ -1,5 +1,5 @@ ;============================================================================ -; Diviner512, a benchmark for 512-bit division. +; bandwidth ; Copyright (C) 2015 by Zack T Smith. ; ; This program is free software; you can redistribute it and/or modify
