diff --git a/BasicSolver/2D-seq/Makefile b/BasicSolver/2D-seq/Makefile index aab8407..60f4df1 100644 --- a/BasicSolver/2D-seq/Makefile +++ b/BasicSolver/2D-seq/Makefile @@ -18,7 +18,7 @@ include $(MAKE_DIR)/include_$(TAG).mk INCLUDES += -I$(SRC_DIR) -I$(BUILD_DIR) VPATH = $(SRC_DIR) -SRC = $(wildcard $(SRC_DIR)/*.c) +SRC = $(filter-out $(wildcard $(SRC_DIR)/*-*.c),$(wildcard $(SRC_DIR)/*.c)) ASM = $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.s, $(SRC)) OBJ = $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(SRC)) SOURCES = $(SRC) $(wildcard $(SRC_DIR)/*.h) diff --git a/BasicSolver/2D-seq/config.mk b/BasicSolver/2D-seq/config.mk index af5f1a0..d228f66 100644 --- a/BasicSolver/2D-seq/config.mk +++ b/BasicSolver/2D-seq/config.mk @@ -4,7 +4,7 @@ ENABLE_OPENMP ?= false #Feature options OPTIONS += -DARRAY_ALIGNMENT=64 -OPTIONS += -DVERBOSE +# OPTIONS += -DVERBOSE #OPTIONS += -DDEBUG #OPTIONS += -DBOUNDCHECK #OPTIONS += -DVERBOSE_AFFINITY diff --git a/BasicSolver/2D-seq/dcavity.par b/BasicSolver/2D-seq/dcavity.par index 3ba6a1c..67287ef 100644 --- a/BasicSolver/2D-seq/dcavity.par +++ b/BasicSolver/2D-seq/dcavity.par @@ -26,8 +26,8 @@ p_init 0.0 # initial value for pressure xlength 1.0 # domain size in x-direction ylength 1.0 # domain size in y-direction -imax 40 # number of interior cells in x-direction -jmax 40 # number of interior cells in y-direction +imax 100 # number of interior cells in x-direction +jmax 100 # number of interior cells in y-direction # Time Data: # --------- diff --git a/BasicSolver/2D-seq/src/allocate.c b/BasicSolver/2D-seq/src/allocate.c index 855cf32..cf2efd6 100644 --- a/BasicSolver/2D-seq/src/allocate.c +++ b/BasicSolver/2D-seq/src/allocate.c @@ -5,10 +5,13 @@ * license that can be found in the LICENSE file. */ #include +#include #include #include -void* allocate(int alignment, size_t bytesize) +#include "allocate.h" + +void* allocate(size_t alignment, size_t bytesize) { int errorCode; void* ptr; diff --git a/BasicSolver/2D-seq/src/allocate.h b/BasicSolver/2D-seq/src/allocate.h index 1a5c8cb..77f4ba0 100644 --- a/BasicSolver/2D-seq/src/allocate.h +++ b/BasicSolver/2D-seq/src/allocate.h @@ -8,6 +8,6 @@ #define __ALLOCATE_H_ #include -extern void* allocate(int alignment, size_t bytesize); +extern void* allocate(size_t alignment, size_t bytesize); #endif diff --git a/BasicSolver/2D-seq/src/likwid-marker.h b/BasicSolver/2D-seq/src/likwid-marker.h index eb7cc78..c3770c0 100644 --- a/BasicSolver/2D-seq/src/likwid-marker.h +++ b/BasicSolver/2D-seq/src/likwid-marker.h @@ -4,23 +4,23 @@ * Author: Jan Eitzinger (je), jan.eitzinger@fau.de * Copyright (c) 2020 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 + * 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 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. + * 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. * * ======================================================================================= */ diff --git a/BasicSolver/2D-seq/src/timing.c b/BasicSolver/2D-seq/src/timing.c index 50bc72f..78b01c4 100644 --- a/BasicSolver/2D-seq/src/timing.c +++ b/BasicSolver/2D-seq/src/timing.c @@ -7,18 +7,16 @@ #include #include -double getTimeStamp() +double getTimeStamp(void) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return (double)ts.tv_sec + (double)ts.tv_nsec * 1.e-9; } -double getTimeResolution() +double getTimeResolution(void) { struct timespec ts; clock_getres(CLOCK_MONOTONIC, &ts); return (double)ts.tv_sec + (double)ts.tv_nsec * 1.e-9; } - -double getTimeStamp_() { return getTimeStamp(); } diff --git a/BasicSolver/2D-seq/src/timing.h b/BasicSolver/2D-seq/src/timing.h index d00aea9..ed05a8c 100644 --- a/BasicSolver/2D-seq/src/timing.h +++ b/BasicSolver/2D-seq/src/timing.h @@ -7,8 +7,7 @@ #ifndef __TIMING_H_ #define __TIMING_H_ -extern double getTimeStamp(); -extern double getTimeResolution(); -extern double getTimeStamp_(); +extern double getTimeStamp(void); +extern double getTimeResolution(void); #endif // __TIMING_H_ diff --git a/BasicSolver/2D-seq/src/util.h b/BasicSolver/2D-seq/src/util.h index 780c778..e36948a 100644 --- a/BasicSolver/2D-seq/src/util.h +++ b/BasicSolver/2D-seq/src/util.h @@ -7,8 +7,7 @@ #ifndef __UTIL_H_ #define __UTIL_H_ #define HLINE \ - "------------------------------------------------------------------------" \ - "----\n" + "----------------------------------------------------------------------------\n" #ifndef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) @@ -20,4 +19,11 @@ #define ABS(a) ((a) >= 0 ? (a) : -(a)) #endif +#define P(i, j) p[(j) * (imaxLocal + 2) + (i)] +#define F(i, j) f[(j) * (imaxLocal + 2) + (i)] +#define G(i, j) g[(j) * (imaxLocal + 2) + (i)] +#define U(i, j) u[(j) * (imaxLocal + 2) + (i)] +#define V(i, j) v[(j) * (imaxLocal + 2) + (i)] +#define RHS(i, j) rhs[(j) * (imaxLocal + 2) + (i)] + #endif // __UTIL_H_