From 6e35b74542092cd2d24cdfd96ea8bd184837e865 Mon Sep 17 00:00:00 2001 From: rnou Date: Tue, 12 Jul 2022 09:24:30 +0200 Subject: [PATCH] AGIOS dependency added --- CMakeLists.txt | 4 ++ README.md | 2 + cmake/FindAGIOS.cmake | 79 +++++++++++++++++++++++++++++++++++++ docker/0.2.0-wip/Dockerfile | 9 +++++ src/scord/scord.cpp | 2 + 5 files changed, 96 insertions(+) create mode 100644 cmake/FindAGIOS.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index fbf85077..6f1a0aad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,6 +253,10 @@ FetchContent_Declare( FetchContent_MakeAvailable(expected) +pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9) + +find_package(AGIOS REQUIRED) + if (SCORD_BUILD_TESTS) enable_testing() diff --git a/README.md b/README.md index ab7dd106..de736f43 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ available in the system: - [libfabric](https://github.com/ofiwg/libfabric) version 1.14.0rc3 and/or [ucx](https://github.com/openucx/ucx.git) version 1.13. - [JSON-C](https://github.com/json-c/json-c) version 0.13.1. +- [libconfig-dev] version 1.4.9 or later. +- [agios] (https://github.com/francielizanon/agios) (development branch) The following libraries are also required by `scord`, but will be downloaded and compiled by the project as part of the standard build process. diff --git a/cmake/FindAGIOS.cmake b/cmake/FindAGIOS.cmake new file mode 100644 index 00000000..9139f3bf --- /dev/null +++ b/cmake/FindAGIOS.cmake @@ -0,0 +1,79 @@ +################################################################################ +# Copyright 2022, Barcelona Supercomputing Center (BSC), Spain # +# # +# This software was partially supported by the EuroHPC-funded project ADMIRE # +# (Project ID: 956748, https://www.admire-eurohpc.eu). # +# # +# This file is part of scord. # +# # +# scord is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# scord is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with scord. If not, see . # +# # +# SPDX-License-Identifier: GPL-3.0-or-later # +################################################################################ + +#[=======================================================================[.rst: +FindAGIOS +--------- + +Find AGIOS include dirs and libraries. + +Use this module by invoking find_package with the form:: + + find_package(AGIOS + [REQUIRED] # Fail with error if yaml-cpp is not found + ) + + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``AGIOS_INCLUDE_DIRS`` + Include directories needed to use Agios. +``AGIOS_LIBRARIES`` + Libraries needed to link to Agios. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``AGIOS_INCLUDE_DIR`` + The directory containing ``agios.h``. +``AGIOS_LIBRARY`` + The path to the agios library. + +#]=======================================================================] + + +find_path(AGIOS_INCLUDE_DIR + NAMES agios.h +) + +find_library(AGIOS_LIBRARY + NAMES agios +) + +set(AGIOS_INCLUDE_DIRS ${AGIOS_INCLUDE_DIR}) +set(AGIOS_LIBRARIES ${AGIOS_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(AGIOS DEFAULT_MSG AGIOS_LIBRARIES AGIOS_INCLUDE_DIRS) + +mark_as_advanced( + AGIOS_LIBRARY + AGIOS_INCLUDE_DIR +) + diff --git a/docker/0.2.0-wip/Dockerfile b/docker/0.2.0-wip/Dockerfile index 9a4f269b..b8dd77a8 100644 --- a/docker/0.2.0-wip/Dockerfile +++ b/docker/0.2.0-wip/Dockerfile @@ -59,6 +59,7 @@ RUN apt-get update && \ git clone https://github.com/mercury-hpc/mercury --recurse-submodules && \ git clone https://github.com/mochi-hpc/mochi-margo --recurse-submodules && \ git clone https://github.com/sewenew/redis-plus-plus --recurse-submodules && \ + git clone https://github.com/francielizanon/agios --recurse-submodules && \ export LD_LIBRARY_PATH=${INSTALL_PATH}/lib:${INSTALL_PATH}/lib64 && \ export PKG_CONFIG_PATH=${INSTALL_PATH}/lib/pkgconfig:${INSTALL_PATH}/lib64/pkgconfig && \ cd && \ @@ -102,6 +103,14 @@ RUN apt-get update && \ make install -j && \ cd ../../ && \ cd && \ + cd deps/agios && \ + git checkout development && \ + mkdir build && \ + cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} .. && \ + make install -j && \ + cd ../../ && \ + cd && \ rm -rf deps && \ # Clean apt cache to reduce image layer size rm -rf /var/lib/apt/lists/* && \ diff --git a/src/scord/scord.cpp b/src/scord/scord.cpp index 48c3d6d6..b317923b 100644 --- a/src/scord/scord.cpp +++ b/src/scord/scord.cpp @@ -37,6 +37,8 @@ #include #include "rpc_handlers.hpp" +#include + namespace fs = std::filesystem; namespace bpo = boost::program_options; -- GitLab