From 96389e9da66bab65601d02171f20a87cc9026b38 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Thu, 23 Jan 2020 20:03:25 +0200 Subject: [PATCH] Modified standalone includes to function with new astaroth headers --- src/standalone/autotest.cc | 8 ++++++-- src/standalone/benchmark.cc | 4 ++-- src/standalone/config_loader.cc | 4 ++-- src/standalone/main.cc | 2 +- src/standalone/model/host_forcing.cc | 2 +- src/standalone/model/host_memory.cc | 2 +- src/standalone/model/host_timestep.cc | 2 +- src/standalone/model/model_boundconds.cc | 2 +- src/standalone/model/model_diff.h | 2 +- src/standalone/model/model_reduce.cc | 2 +- src/standalone/renderer.cc | 6 +++--- src/standalone/simulation.cc | 4 ++-- 12 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/standalone/autotest.cc b/src/standalone/autotest.cc index 7510dd4..6362965 100644 --- a/src/standalone/autotest.cc +++ b/src/standalone/autotest.cc @@ -29,15 +29,15 @@ #include #include "config_loader.h" +#include "math_utils.h" #include "model/host_forcing.h" #include "model/host_memory.h" #include "model/host_timestep.h" #include "model/model_boundconds.h" #include "model/model_reduce.h" #include "model/model_rk3.h" -#include "src/core/math_utils.h" -#include "src/core/errchk.h" +#include "errchk.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -75,6 +75,10 @@ static const InitType test_cases[] = {INIT_TYPE_RANDOM, INIT_TYPE_XWAVE, INIT_TYPE_GAUSSIAN_RADIAL_EXPL, INIT_TYPE_ABC_FLOW}; // #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) +#ifndef AC_DOUBLE_PRECISION +#define AC_DOUBLE_PRECISION (0) +#endif + static inline bool is_valid(const ModelScalar a) { diff --git a/src/standalone/benchmark.cc b/src/standalone/benchmark.cc index 4e82301..e5bcdef 100644 --- a/src/standalone/benchmark.cc +++ b/src/standalone/benchmark.cc @@ -35,7 +35,7 @@ #include "model/model_rk3.h" #include "timer_hires.h" -#include "src/core/errchk.h" +#include "errchk.h" #include #include #include @@ -246,7 +246,7 @@ run_benchmark(void) #if AUTO_OPTIMIZE const char* benchmark_path = "benchmark.out"; -#include "src/core/kernels/rk3_threadblock.conf" +#include "kernels/rk3_threadblock.conf" static int write_result_to_file(const float& ms_per_step) { diff --git a/src/standalone/config_loader.cc b/src/standalone/config_loader.cc index 4e4e5e9..6577707 100644 --- a/src/standalone/config_loader.cc +++ b/src/standalone/config_loader.cc @@ -31,8 +31,8 @@ #include // print #include // memset -#include "src/core/errchk.h" -#include "src/core/math_utils.h" +#include "errchk.h" +#include "math_utils.h" /** \brief Find the index of the keyword in names diff --git a/src/standalone/main.cc b/src/standalone/main.cc index cfaa830..075d6e2 100644 --- a/src/standalone/main.cc +++ b/src/standalone/main.cc @@ -29,7 +29,7 @@ #include #include "run.h" -#include "src/core/errchk.h" +#include "errchk.h" // Write all errors from stderr to an in the current working // directory diff --git a/src/standalone/model/host_forcing.cc b/src/standalone/model/host_forcing.cc index 7b4458e..cd83ea8 100644 --- a/src/standalone/model/host_forcing.cc +++ b/src/standalone/model/host_forcing.cc @@ -26,7 +26,7 @@ */ #include "host_forcing.h" -// #include "src/core/math_utils.h" +// #include "math_utils.h" #include using namespace std; diff --git a/src/standalone/model/host_memory.cc b/src/standalone/model/host_memory.cc index 7377492..f48b49a 100644 --- a/src/standalone/model/host_memory.cc +++ b/src/standalone/model/host_memory.cc @@ -28,7 +28,7 @@ #include -#include "src/core/errchk.h" +#include "errchk.h" #define AC_GEN_STR(X) #X const char* init_type_names[] = {AC_FOR_INIT_TYPES(AC_GEN_STR)}; diff --git a/src/standalone/model/host_timestep.cc b/src/standalone/model/host_timestep.cc index 671f36e..fb1b52c 100644 --- a/src/standalone/model/host_timestep.cc +++ b/src/standalone/model/host_timestep.cc @@ -26,7 +26,7 @@ */ #include "host_timestep.h" -#include "src/core/math_utils.h" +#include "math_utils.h" static AcReal timescale = AcReal(1.0); diff --git a/src/standalone/model/model_boundconds.cc b/src/standalone/model/model_boundconds.cc index 03e5b88..2e0533a 100644 --- a/src/standalone/model/model_boundconds.cc +++ b/src/standalone/model/model_boundconds.cc @@ -26,7 +26,7 @@ */ #include "model_boundconds.h" -#include "src/core/errchk.h" +#include "errchk.h" void boundconds(const AcMeshInfo& mesh_info, ModelMesh* mesh) diff --git a/src/standalone/model/model_diff.h b/src/standalone/model/model_diff.h index eb6a31a..b22e75c 100644 --- a/src/standalone/model/model_diff.h +++ b/src/standalone/model/model_diff.h @@ -25,7 +25,7 @@ * */ #pragma once -#include "src/core/errchk.h" +#include "errchk.h" typedef long double MODEL_REAL; diff --git a/src/standalone/model/model_reduce.cc b/src/standalone/model/model_reduce.cc index 78c64b8..58c1a8f 100644 --- a/src/standalone/model/model_reduce.cc +++ b/src/standalone/model/model_reduce.cc @@ -28,7 +28,7 @@ #include -#include "src/core/errchk.h" +#include "errchk.h" // Function pointer definitions typedef ModelScalar (*ReduceFunc)(const ModelScalar&, const ModelScalar&); diff --git a/src/standalone/renderer.cc b/src/standalone/renderer.cc index c0825d8..25a3ff8 100644 --- a/src/standalone/renderer.cc +++ b/src/standalone/renderer.cc @@ -32,13 +32,13 @@ #include // memcpy #include "config_loader.h" +#include "errchk.h" +#include "math_utils.h" #include "model/host_forcing.h" #include "model/host_memory.h" #include "model/host_timestep.h" #include "model/model_reduce.h" #include "model/model_rk3.h" -#include "src/core/errchk.h" -#include "src/core/math_utils.h" #include "timer_hires.h" // NEED TO BE DEFINED HERE. IS NOT NOTICED BY compile_acc call. @@ -453,7 +453,7 @@ run_renderer(const char* config_path) return 0; } #else // BUILD_RT_VISUALIZATION == 0 -#include "src/core/errchk.h" +#include "errchk.h" int run_renderer(const char* /*config_path*/) { diff --git a/src/standalone/simulation.cc b/src/standalone/simulation.cc index df1b1a4..01106af 100644 --- a/src/standalone/simulation.cc +++ b/src/standalone/simulation.cc @@ -32,8 +32,8 @@ #include "model/host_timestep.h" #include "model/model_reduce.h" #include "model/model_rk3.h" -#include "src/core/errchk.h" -#include "src/core/math_utils.h" +#include "errchk.h" +#include "math_utils.h" #include "timer_hires.h" #include