Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${CLANG_VERSION} m
&& echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${CLANG_VERSION} main" >> /etc/apt/sources.list \
&& wget -q -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& apt-get update \
&& apt-get install -y libboost-all-dev ninja-build gfortran clang-${CLANG_VERSION} clangd-${CLANG_VERSION} libomp-${CLANG_VERSION}-dev \
&& apt-get install -y ninja-build gfortran clang-${CLANG_VERSION} clangd-${CLANG_VERSION} libomp-${CLANG_VERSION}-dev \
&& apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* \
&& ln -sf /usr/bin/clangd-${CLANG_VERSION} /usr/bin/clangd

Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@ else()
endif()
endif()

set(REQUIRED_BOOST_VERSION 1.73)
find_package(Boost ${REQUIRED_BOOST_VERSION} REQUIRED)

# setup main gridtools target
add_library(gridtools INTERFACE)
add_library(GridTools::gridtools ALIAS gridtools)
target_compile_features(gridtools INTERFACE cxx_std_17)
target_link_libraries(gridtools INTERFACE Boost::boost)
target_compile_definitions(gridtools INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:BOOST_PP_VARIADICS=1>)
target_compile_definitions(gridtools INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:GT_PP_VARIADICS=1>)
target_include_directories(gridtools
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/>
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ CUDAHOSTCXX=`which g++` # full path to the C++ compiler to be used as CUDA host

##### Requirements
- C++17 compiler (see also list of tested compilers)
- Boost headers (1.73 or later)
- CMake (3.21.0 or later)
- CUDA Toolkit (11.0 or later, optional)
- MPI (optional, CUDA-aware MPI for the GPU communication module `gcl_gpu`)
Expand Down
8 changes: 0 additions & 8 deletions ci/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,5 @@ RUN echo "${MPICH_PATH}/lib" >> /etc/ld.so.conf.d/cscs.conf && ldconfig
ENV CXX=${MPICH_PATH}/bin/mpicxx
ENV CC=${MPICH_PATH}/bin/mpicc

RUN wget --quiet https://archives.boost.io/release/1.85.0/source/boost_1_85_0.tar.gz && \
echo be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b boost_1_85_0.tar.gz > boost_hash.txt && \
sha256sum -c boost_hash.txt && \
tar xzf boost_1_85_0.tar.gz && \
mv boost_1_85_0/boost /usr/local/include/ && \
rm boost_1_85_0.tar.gz boost_hash.txt
ENV BOOST_ROOT /usr/local/

ENV CUDA_HOME /usr/local/cuda
ENV CUDA_ARCH=${CUDA_ARCH}
2 changes: 0 additions & 2 deletions ci/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ COPY . /gridtools
ARG BUILD_TYPE

ENV GTRUN_BUILD_COMMAND='make -j 32'
ENV GTCMAKE_Boost_NO_BOOST_CMAKE=ON
ENV GTCMAKE_Boost_NO_SYSTEM_PATHS=ON
ENV GTCMAKE_GT_TESTS_REQUIRE_FORTRAN_COMPILER=ON
ENV GTCMAKE_GT_TESTS_REQUIRE_C_COMPILER=ON
ENV GTCMAKE_GT_TESTS_REQUIRE_OpenMP=ON
Expand Down
3 changes: 0 additions & 3 deletions cmake/internal/GridToolsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ get_filename_component(GRIDTOOLS_CONFIG_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" P

# Only setup targets, if GridTools was not already included with a add_subdirectory/FetchContent
if(NOT @PROJECT_NAME@_BINARY_DIR AND NOT TARGET GridTools::gridtools)
include(CMakeFindDependencyMacro)
find_dependency(Boost @REQUIRED_BOOST_VERSION@)

include("${GRIDTOOLS_CONFIG_CMAKE_DIR}/GridToolsTargets.cmake" )

list(APPEND CMAKE_MODULE_PATH @PACKAGE_GRIDTOOLS_MODULE_PATH@)
Expand Down
5 changes: 2 additions & 3 deletions docs_src/manuals/introduction/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ computations in order to be optimal on the target hardware.
Dependencies
^^^^^^^^^^^^

|GT| requires a header-only installation of Boost_, a recent version of CMake_ and a modern compiler.
The exact version requirements can be found on `GitHub <https://github.com/GridTools/gridtools>`_.
|GT| requires a recent version of CMake_ and a modern compiler. The exact version requirements can be found on
`GitHub <https://github.com/GridTools/gridtools>`_.

.. _Boost: https://www.boost.org/
.. _CMake: https://www.cmake.org/

Addtionally |GT| requires the following optional dependencies.
Expand Down
2 changes: 1 addition & 1 deletion include/gridtools/common/host_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
/**
* A helper to implement a family of functions which are different from each other only by target specifies.
*
* It uses the same design pattern as `BOOST_PP_ITERATE` does.
* It uses the same design pattern as `GT_PP_ITERATE` does.
* For example if one wants to define a function with any possible combination of `__host__` and `__device__`
* specifiers he needs to write the following code:
*
Expand Down
36 changes: 18 additions & 18 deletions include/gridtools/common/tuple_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@
#include <type_traits>
#include <utility>

#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/for_each_i.hpp>
#include <boost/preprocessor/seq/transform.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/variadic/to_seq.hpp>
#include <gridtools/preprocessor/seq/enum.hpp>
#include <gridtools/preprocessor/seq/for_each.hpp>
#include <gridtools/preprocessor/seq/for_each_i.hpp>
#include <gridtools/preprocessor/seq/transform.hpp>
#include <gridtools/preprocessor/tuple/elem.hpp>
#include <gridtools/preprocessor/variadic/to_seq.hpp>

#include "../meta.hpp"
#include "defs.hpp"
Expand All @@ -135,28 +135,28 @@
friend class_name##_tuple_util_getter tuple_getter(class_name const &) { return {}; } \
static_assert(1)

#define GT_STRUCT_TUPLE_IMPL_DECL_(r, data, elem) BOOST_PP_TUPLE_ELEM(0, elem) BOOST_PP_TUPLE_ELEM(1, elem);
#define GT_STRUCT_TUPLE_IMPL_TYPE_(s, data, elem) BOOST_PP_TUPLE_ELEM(0, elem)
#define GT_STRUCT_TUPLE_IMPL_DECL_(r, data, elem) GT_PP_TUPLE_ELEM(0, elem) GT_PP_TUPLE_ELEM(1, elem);
#define GT_STRUCT_TUPLE_IMPL_TYPE_(s, data, elem) GT_PP_TUPLE_ELEM(0, elem)
#define GT_STRUCT_TUPLE_IMPL_GETS_(s, name, i, elem) \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = BOOST_PP_TUPLE_ELEM(0, elem)> \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \
static constexpr GT_FUNCTION T const &get(name const &obj) { \
return obj.BOOST_PP_TUPLE_ELEM(1, elem); \
return obj.GT_PP_TUPLE_ELEM(1, elem); \
} \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = BOOST_PP_TUPLE_ELEM(0, elem)> \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \
static constexpr GT_FUNCTION T &get(name &obj) { \
return obj.BOOST_PP_TUPLE_ELEM(1, elem); \
return obj.GT_PP_TUPLE_ELEM(1, elem); \
} \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = BOOST_PP_TUPLE_ELEM(0, elem)> \
template <::std::size_t I, ::std::enable_if_t<I == i, int> = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \
static constexpr GT_FUNCTION T &&get(name &&obj) { \
return static_cast<T &&>(obj.BOOST_PP_TUPLE_ELEM(1, elem)); \
return static_cast<T &&>(obj.GT_PP_TUPLE_ELEM(1, elem)); \
}
#define GT_STRUCT_TUPLE_IMPL_(name, members) \
BOOST_PP_SEQ_FOR_EACH(GT_STRUCT_TUPLE_IMPL_DECL_, _, members) \
GT_PP_SEQ_FOR_EACH(GT_STRUCT_TUPLE_IMPL_DECL_, _, members) \
struct gt_##name##_tuple_getter { \
BOOST_PP_SEQ_FOR_EACH_I(GT_STRUCT_TUPLE_IMPL_GETS_, name, members) \
GT_PP_SEQ_FOR_EACH_I(GT_STRUCT_TUPLE_IMPL_GETS_, name, members) \
}; \
friend gt_##name##_tuple_getter tuple_getter(name); \
friend ::gridtools::meta::list<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(GT_STRUCT_TUPLE_IMPL_TYPE_, _, members))> \
friend ::gridtools::meta::list<GT_PP_SEQ_ENUM(GT_PP_SEQ_TRANSFORM(GT_STRUCT_TUPLE_IMPL_TYPE_, _, members))> \
tuple_to_types(name); \
friend ::gridtools::meta::always<name> tuple_from_types(name)

Expand Down Expand Up @@ -187,7 +187,7 @@
* assert(x.b == 5.);
* ```
*/
#define GT_STRUCT_TUPLE(name, ...) GT_STRUCT_TUPLE_IMPL_(name, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))
#define GT_STRUCT_TUPLE(name, ...) GT_STRUCT_TUPLE_IMPL_(name, GT_PP_VARIADIC_TO_SEQ(__VA_ARGS__))

namespace gridtools {
namespace tuple_util {
Expand Down
26 changes: 13 additions & 13 deletions include/gridtools/gcl/high_level/call_generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#if !BOOST_PP_IS_ITERATING
#if !GT_PP_IS_ITERATING

#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <gridtools/preprocessor/arithmetic/inc.hpp>
#include <gridtools/preprocessor/iteration/iterate.hpp>
#include <gridtools/preprocessor/repetition/enum_binary_params.hpp>
#include <gridtools/preprocessor/repetition/enum_params.hpp>

#include "gcl_parameters.hpp"

// clang-format off
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, GCL_MAX_FIELDS, <gridtools/gcl/high_level/call_generic.hpp>))
#define GT_PP_ITERATION_PARAMS_1 (3, (1, GCL_MAX_FIELDS, <gridtools/gcl/high_level/call_generic.hpp>))
// clang-format on
#include BOOST_PP_ITERATE()
#include GT_PP_ITERATE()

#else

#define GCL_NOI BOOST_PP_ITERATION()
#define GCL_NOI GT_PP_ITERATION()

#define _GCL_PACK_F_NAME(x) m_pack##x##_generic_nv
#define GCL_PACK_F_NAME(x) _GCL_PACK_F_NAME(x)
Expand All @@ -33,11 +33,11 @@

#define _GCL_PRINT_FIELDS(z, m, s) \
(*filep) << "fieldx " << field##m << "\n" << sizeof(typename FOTF_T##m::value_type) << std::endl;
#define GCL_PRINT_FIELDS(m) BOOST_PP_REPEAT(m, _GCL_PRINT_FIELDS, nil)
#define GCL_PRINT_FIELDS(m) GT_PP_REPEAT(m, _GCL_PRINT_FIELDS, nil)

template <BOOST_PP_ENUM_PARAMS(GCL_NOI, typename FOTF_T)>
template <GT_PP_ENUM_PARAMS(GCL_NOI, typename FOTF_T)>
void GCL_PACK_F_NAME(GCL_KERNEL_TYPE)(
BOOST_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab, const int *d_msgsize) {
GT_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab, const int *d_msgsize) {
// GCL_PRINT_FIELDS(GCL_NOI);

#define GCL_QUOTE(x) #x
Expand All @@ -53,9 +53,9 @@ void GCL_PACK_F_NAME(GCL_KERNEL_TYPE)(
#define _GCL_UNPACK_FILE_NAME(x) invoke_kernels_U_##x##_PP.hpp
#define GCL_UNPACK_FILE_NAME(x) _GCL_UNPACK_FILE_NAME(x)

template <BOOST_PP_ENUM_PARAMS(GCL_NOI, typename FOTF_T)>
template <GT_PP_ENUM_PARAMS(GCL_NOI, typename FOTF_T)>
void GCL_UNPACK_F_NAME(GCL_KERNEL_TYPE)(
BOOST_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab_r, int *d_msgsize_r) {
GT_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab_r, int *d_msgsize_r) {

#define GCL_QUOTE(x) #x
#define _GCL_QUOTE(x) GCL_QUOTE(x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_XL_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_XU_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_YL_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_YU_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_ZL_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
2 changes: 1 addition & 1 deletion include/gridtools/gcl/high_level/invoke_kernels_ZU_PP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
} \
}

BOOST_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
GT_PP_REPEAT(GCL_NOI, GCL_MACRO_IMPL, all)
#undef GCL_MACRO_IMPL
Loading
Loading