Revert "Merge branch 'MARKERS' of github.com:RRZE-HPC/TheBandwidthBenchmark"
This reverts commit21bedcda40, reversing changes made tobb19bf5a49.
This commit is contained in:
1
Makefile
1
Makefile
@@ -9,7 +9,6 @@ Q ?= @
|
|||||||
#DO NOT EDIT BELOW
|
#DO NOT EDIT BELOW
|
||||||
include $(MAKE_DIR)/config.mk
|
include $(MAKE_DIR)/config.mk
|
||||||
include $(MAKE_DIR)/include_$(TAG).mk
|
include $(MAKE_DIR)/include_$(TAG).mk
|
||||||
include $(MAKE_DIR)/include_LIKWID.mk
|
|
||||||
INCLUDES += -I./src/includes
|
INCLUDES += -I./src/includes
|
||||||
|
|
||||||
VPATH = $(SRC_DIR)
|
VPATH = $(SRC_DIR)
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
# Supported: GCC, CLANG, ICC
|
# Supported: GCC, CLANG, ICC
|
||||||
TAG ?= ICC
|
TAG ?= GCC
|
||||||
ENABLE_OPENMP ?= false
|
ENABLE_OPENMP ?= false
|
||||||
ENABLE_LIKWID ?= false
|
|
||||||
|
|
||||||
#Feature options
|
#Feature options
|
||||||
OPTIONS = -DSIZE=100000000ull
|
OPTIONS = -DSIZE=40000000ull
|
||||||
OPTIONS += -DNTIMES=10
|
OPTIONS += -DNTIMES=10
|
||||||
OPTIONS += -DARRAY_ALIGNMENT=64
|
OPTIONS += -DARRAY_ALIGNMENT=64
|
||||||
#OPTIONS += -DVERBOSE_AFFINITY
|
#OPTIONS += -DVERBOSE_AFFINITY
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ ifeq ($(ENABLE_OPENMP),true)
|
|||||||
OPENMP = -qopenmp
|
OPENMP = -qopenmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = -Ofast -xHost -std=c99 -ffreestanding $(OPENMP)
|
CFLAGS = -qopt-report -Ofast -xHost -std=c99 -ffreestanding $(OPENMP)
|
||||||
LFLAGS = $(OPENMP)
|
LFLAGS = $(OPENMP)
|
||||||
DEFINES = -D_GNU_SOURCE
|
DEFINES = -D_GNU_SOURCE
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
LIKWID_INC ?= -I/usr/local/include
|
|
||||||
LIKWID_DEFINES ?= -DLIKWID_PERFMON
|
|
||||||
LIKWID_LIB ?= -L/usr/local/lib
|
|
||||||
|
|
||||||
ifeq ($(strip $(ENABLE_LIKWID)),true)
|
|
||||||
INCLUDES += ${LIKWID_INC}
|
|
||||||
DEFINES += ${LIKWID_DEFINES}
|
|
||||||
LIBS += -llikwid
|
|
||||||
LFLAGS += ${LIKWID_LIB}
|
|
||||||
endif
|
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
double copy(
|
double copy(
|
||||||
double * restrict a,
|
double * restrict a,
|
||||||
@@ -37,15 +36,10 @@ double copy(
|
|||||||
double S, E;
|
double S, E;
|
||||||
|
|
||||||
S = getTimeStamp();
|
S = getTimeStamp();
|
||||||
#pragma omp parallel
|
#pragma omp parallel for
|
||||||
{
|
|
||||||
LIKWID_MARKER_START("COPY");
|
|
||||||
#pragma omp for
|
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
a[i] = b[i];
|
a[i] = b[i];
|
||||||
}
|
}
|
||||||
LIKWID_MARKER_STOP("COPY");
|
|
||||||
}
|
|
||||||
E = getTimeStamp();
|
E = getTimeStamp();
|
||||||
|
|
||||||
return E-S;
|
return E-S;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
double daxpy(
|
double daxpy(
|
||||||
double * restrict a,
|
double * restrict a,
|
||||||
@@ -38,15 +37,10 @@ double daxpy(
|
|||||||
double S, E;
|
double S, E;
|
||||||
|
|
||||||
S = getTimeStamp();
|
S = getTimeStamp();
|
||||||
#pragma omp parallel
|
#pragma omp parallel for
|
||||||
{
|
|
||||||
LIKWID_MARKER_START("DAXPY");
|
|
||||||
#pragma omp for
|
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
a[i] = a[i] + scalar * b[i];
|
a[i] = a[i] + scalar * b[i];
|
||||||
}
|
}
|
||||||
LIKWID_MARKER_STOP("DAXPY");
|
|
||||||
}
|
|
||||||
E = getTimeStamp();
|
E = getTimeStamp();
|
||||||
|
|
||||||
return E-S;
|
return E-S;
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* =======================================================================================
|
|
||||||
*
|
|
||||||
* Author: Jan Eitzinger (je), jan.treibig@gmail.com
|
|
||||||
* Copyright (c) 2019 RRZE, University Erlangen-Nuremberg
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* =======================================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef LIKWID_MARKERS_H
|
|
||||||
#define LIKWID_MARKERS_H
|
|
||||||
|
|
||||||
#ifdef LIKWID_PERFMON
|
|
||||||
#include <likwid.h>
|
|
||||||
#else
|
|
||||||
#define LIKWID_MARKER_INIT
|
|
||||||
#define LIKWID_MARKER_THREADINIT
|
|
||||||
#define LIKWID_MARKER_SWITCH
|
|
||||||
#define LIKWID_MARKER_REGISTER(regionTag)
|
|
||||||
#define LIKWID_MARKER_START(regionTag)
|
|
||||||
#define LIKWID_MARKER_STOP(regionTag)
|
|
||||||
#define LIKWID_MARKER_CLOSE
|
|
||||||
#define LIKWID_MARKER_GET(regionTag, nevents, events, time, count)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /*LIKWID_MARKERS_H*/
|
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
double init(
|
double init(
|
||||||
double * restrict a,
|
double * restrict a,
|
||||||
@@ -37,15 +36,10 @@ double init(
|
|||||||
double S, E;
|
double S, E;
|
||||||
|
|
||||||
S = getTimeStamp();
|
S = getTimeStamp();
|
||||||
#pragma omp parallel
|
#pragma omp parallel for
|
||||||
{
|
|
||||||
LIKWID_MARKER_START("INIT");
|
|
||||||
#pragma omp for
|
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
a[i] = scalar;
|
a[i] = scalar;
|
||||||
}
|
}
|
||||||
LIKWID_MARKER_STOP("INIT");
|
|
||||||
}
|
|
||||||
E = getTimeStamp();
|
E = getTimeStamp();
|
||||||
|
|
||||||
return E-S;
|
return E-S;
|
||||||
|
|||||||
13
src/main.c
13
src/main.c
@@ -38,7 +38,6 @@
|
|||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <allocate.h>
|
#include <allocate.h>
|
||||||
#include <affinity.h>
|
#include <affinity.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
#define HLINE "----------------------------------------------------------------------------\n"
|
#define HLINE "----------------------------------------------------------------------------\n"
|
||||||
|
|
||||||
@@ -106,17 +105,6 @@ int main (int argc, char** argv)
|
|||||||
{"SDaxpy: ", 4, 2}
|
{"SDaxpy: ", 4, 2}
|
||||||
};
|
};
|
||||||
|
|
||||||
LIKWID_MARKER_INIT;
|
|
||||||
#ifdef _OPENMP
|
|
||||||
#pragma omp parallel
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
LIKWID_MARKER_REGISTER("INIT");
|
|
||||||
LIKWID_MARKER_REGISTER("COPY");
|
|
||||||
#ifdef _OPENMP
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
a = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
a = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
||||||
b = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
b = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
||||||
c = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
c = (double*) allocate( ARRAY_ALIGNMENT, N * bytesPerWord );
|
||||||
@@ -212,7 +200,6 @@ int main (int argc, char** argv)
|
|||||||
printf(HLINE);
|
printf(HLINE);
|
||||||
|
|
||||||
check(a, b, c, d, N);
|
check(a, b, c, d, N);
|
||||||
LIKWID_MARKER_CLOSE;
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
double triad(
|
double triad(
|
||||||
double * restrict a,
|
double * restrict a,
|
||||||
@@ -39,15 +38,10 @@ double triad(
|
|||||||
double S, E;
|
double S, E;
|
||||||
|
|
||||||
S = getTimeStamp();
|
S = getTimeStamp();
|
||||||
#pragma omp parallel
|
#pragma omp parallel for
|
||||||
{
|
|
||||||
LIKWID_MARKER_START("TRIAD");
|
|
||||||
#pragma omp for
|
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
a[i] = b[i] + scalar * c[i];
|
a[i] = b[i] + scalar * c[i];
|
||||||
}
|
}
|
||||||
LIKWID_MARKER_STOP("TRIAD");
|
|
||||||
}
|
|
||||||
E = getTimeStamp();
|
E = getTimeStamp();
|
||||||
|
|
||||||
return E-S;
|
return E-S;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timing.h>
|
#include <timing.h>
|
||||||
#include <likwid_markers.h>
|
|
||||||
|
|
||||||
double update(
|
double update(
|
||||||
double * restrict a,
|
double * restrict a,
|
||||||
@@ -37,15 +36,10 @@ double update(
|
|||||||
double S, E;
|
double S, E;
|
||||||
|
|
||||||
S = getTimeStamp();
|
S = getTimeStamp();
|
||||||
#pragma omp parallel
|
#pragma omp parallel for
|
||||||
{
|
|
||||||
LIKWID_MARKER_START("UPDATE");
|
|
||||||
#pragma omp for
|
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
a[i] = a[i] * scalar;
|
a[i] = a[i] * scalar;
|
||||||
}
|
}
|
||||||
LIKWID_MARKER_STOP("UPDATE");
|
|
||||||
}
|
|
||||||
E = getTimeStamp();
|
E = getTimeStamp();
|
||||||
|
|
||||||
return E-S;
|
return E-S;
|
||||||
|
|||||||
Reference in New Issue
Block a user