Loading .gitlab-ci.yml +247 −36 Original line number Diff line number Diff line Loading @@ -3,9 +3,13 @@ # can use verions as well, like gcc:5.2 # see https://hub.docker.com/_/gcc/ variables: GIT_SUBMODULE_STRATEGY: normal stages: - build - test - deploy # Install dependencies for GCC builds before_script: Loading @@ -22,6 +26,39 @@ before_script: protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev cmake - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd ### GCC 5 Loading @@ -34,10 +71,10 @@ build:gcc:5: - mkdir build && cd build - ../configure --enable-tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - cd tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api ### GCC 6 Loading @@ -50,10 +87,10 @@ build:gcc:6: - mkdir build && cd build - ../configure --enable-tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - cd tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api ### GCC 7 Loading @@ -66,10 +103,10 @@ build:gcc:7: - mkdir build && cd build - ../configure --enable-tests - make -j4 - make -j$(nproc) - cd tests - make -j4 - make -j4 - make -j$(nproc) - make -j$(nproc) ### GCC 8 Loading @@ -82,16 +119,16 @@ build:gcc:8: - mkdir build && cd build - ../configure --enable-tests - make -j4 - make -j$(nproc) - cd tests - make -j4 - make -j4 - make -j$(nproc) - make -j$(nproc) ################################################################################ # test scripts ################################################################################ test:ubuntu:latest: test:coverage: image: ubuntu:latest stage: test Loading @@ -100,6 +137,7 @@ test:ubuntu:latest: - apt-get update && apt-get upgrade -y && apt-get install -y git build-essential autotools-dev automake Loading @@ -117,8 +155,44 @@ test:ubuntu:latest: protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev libcap2-bin valgrind cmake lcov - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd && ldconfig - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd && ldconfig # Build and test script: Loading @@ -126,36 +200,173 @@ test:ubuntu:latest: - mkdir build && cd build - ../configure --enable-tests # CFLAGS="-fsanitize=address" # CXXFLAGS="-fsanitize=address" # LDFLAGS="-fsanitize=address" # CPPFLAGS="-D__LOGGER_ENABLE_DEBUG__" - make -j4 CFLAGS="-O0 --coverage" CXXFLAGS="-O0 --coverage" LDFLAGS="--coverage" - make -j$(nproc) - cd tests - make -j4 core - ./core -as - make -j4 api # - NORNS_DEBUG_OUTPUT_TO_STDERR=1 NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - make -j$(nproc) core - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./core -as - make -j$(nproc) api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::NORNS_TASK]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_buffer_to_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_remove_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_add_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_remove_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" after_script: - (cd build && ../gencov.sh) - genhtml -o build/html/coverage build/norns.info - if [[ -e build/tests.log ]]; then cat $(tail -1 build/tests.log)/config/urd.log; fi artifacts: paths: - build/html/coverage/ test:optimized: image: ubuntu:latest stage: test # Install dependencies before_script: - apt-get update && apt-get upgrade -y && apt-get install -y git build-essential autotools-dev automake autoconf libtool pkg-config libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-regex-dev libprotobuf-dev protobuf-compiler libprotobuf-c-dev protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev libcap2-bin valgrind cmake - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd && ldconfig - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd && ldconfig # Build and test script: - ./bootstrap.sh - mkdir build && cd build - ../configure --enable-tests - make -j$(nproc) - cd tests - make -j$(nproc) core - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./core -as - make -j$(nproc) api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::NORNS_TASK]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_buffer_to_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_remove_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_add_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_remove_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" after_script: - pwd - if [[ -e tests.log ]]; - if [[ -e build/tests.log ]]; then cat $(tail -1 tests.log)/config/urd.log; cat $(tail -1 build/tests.log)/config/urd.log; fi pages: stage: deploy dependencies: - test:coverage script: - mv coverage/ public/ artifacts: paths: - public expire_in: 30 days only: - master .gitmodules 0 → 100644 +3 −0 Original line number Diff line number Diff line [submodule "src/externals/hermes"] path = src/externals/hermes url = ../hermes.git README.md +97 −23 Original line number Diff line number Diff line # Norns [](https://storage.bsc.es/gitlab/hpc/norns/commits/master) [](https://storage.bsc.es/gitlab/hpc/norns/commits/21-add-support-for-remote-transfers-2) Norns is an open-source data scheduling service that orchestrates asynchronous data transfers between different storage backends in an HPC cluster. Through its API, Norns provides three different functions. First, it allows system administrators to expose the storage architecture of an HPC cluster by creating **dataspaces** associated to different storage backends such as node-local NVMs and POSIX file systems, or system-wide parallel file systems and object stores, thus making them available to applications, services, and users. Second, it provides a framework for submitting and monitoring the asynchronous transfers of **data resources** between the (local and remote) dataspaces available to a user, such as process buffers, POSIX files and directories or objects. Third, it arbitrates requests by managing a queue of pending work and evaluating requests to maximize dataspace throughput while minimizing the interferences with normal application I/O. Norns Data Scheduler ==================== Norns has currently been tested only under GNU/Linux. Build dependencies: ## Building and installing from source - A c++11-conforming compiler - libboost-system >= 1.53 - libboost-filesystem >= 1.53 - libboost-program-options >= 1.53 - libboost-thread >= 1.53 - libboost-regex >= 1.53 (only if self tests are also built) - libprotobuf + protobuf compiler >= 2.5.0 - libprotobuf-c + protobuf-c compiler >= 1.0.2 - libyaml-cpp >= 0.5.1 - libyaml >= 0.1.4 Distribution tarballs are available from the [releases](releases) tab. If you are building Norns from a developer Git clone, you must first run the `bootstrap.sh` script, which will invoke the GNU Autotools to bootstrap Norns' configuration and build mechanisms. If you are building Norns from an official distribiution tarball, there is no need to run the `bootstrap.sh` script, since all distribution tarballs are already boostrapped. ### Dependencies - Installation in CentOS 7 git clone git@git.ph.ed.ac.uk:nextgenio/norns.git && cd norns ./bootstrap.sh mkdir <build-dir> cd <build-dir> ./configure --prefix=<install-dir> --sysconfdir=<config-dir> make make install cp <build-dir>/etc/norns.service /usr/lib/systemd/system/norns.service Compiling and running Norns requires up-to-date versions of the following software packages (note that, though it may compile and run, using excessively old versions of these packages can cause indirect errors that are very difficult to track down): sudo setcap cap_sys_ptrace,cap_chown=+ep ./urd - A standard **C++11** conforming compiler (the code is routinely tested against GCC 4.9/Clang 3.3 and higher). - Autotools (autoconf 2.69 or higher, automake 1.14.1 or higher, and libtool 2.4.2 or higher) and CMake (3.10.0 or higher). - The following Boost libraries (1.53 or higher): `system`, `filesystem`, `program_options`, and `thread`. Optionally, the `regex` library may also be required if self tests are enabled with the `--enable-tests` option. - Google's Protocol Buffers for [C](https://github.com/protobuf-c/protobuf-c) (1.0.2 or higher) and for [C++](https://github.com/protocolbuffers/protobuf) (2.5.0 or higher). - [LibYAML](https://github.com/yaml/libyaml) (0.1.4 or higher) and [yaml-cpp](https://github.com/jbeder/yaml-cpp) (0.5.1 or higher). - [Mercury](https://github.com/mercury-hpc/mercury) 1.0 or higher (**IMPORTANT** Mercury may require additional dependencies such as libfabric depending on the desired transport protocol). - [Hermes](https://storage.bsc.es/gitlab/hpc/hermes) (our own C++ wrapper for Mercury. It should be automatically downloaded when cloning with the `--recursive` option). #### Installation in CentOS TODO #### Installation in Ubuntu ```bash # Installing dependencies avaiable through package manager $ apt-get install -y libboost-system-dev libboost-filesystem-dev \ libboost-program-options-dev libboost-thread-dev \ libboost-regex-dev libprotobuf-dev protobuf-compiler \ libprotobuf-c-dev protobuf-c-compiler \ libyaml-cpp-dev libyaml-dev libtar-dev # Building and installing libfabric (required for Mercury's OFI/libfabric plugin) $ git clone https://github.com/ofiwg/libfabric.git && $ cd libfabric $ ./autogen.sh $ mkdir build && cd build $ ../configure && make && make install # Building and installing Mercury with OFI/libfabric plugin $ git clone https://github.com/mercury-hpc/mercury.git $ cd mercury $ mkdir build && cd build $ cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF \ -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF \ -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON \ -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON \ -DNA_USE_OFI:BOOL=ON \ .. $ make && make install # Building, testing and installing Norns under '/usr/local/', with configuration # files under '/etc/norns/' and temporary files under '/var/run/norns/' $ git clone --recursive https://storage.bsc.es/gitlab/hpc/norns.git $ cd norns $ ./bootstrap.sh $ mkdir build && cd build $ ../configure \ --enable-tests \ --prefix=/usr/local \ --sysconfdir=/etc/norns \ --localstatedir=/var/run/norns $ make && make check && make install # Optional: providing file system permission override capabilities to Norns # control daemon $ setcap cap_sys_ptrace,cap_chown=+ep /usr/local/bin/urd ``` configure.ac +19 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,9 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) AC_LANG([C]) AC_LANG([C++]) # Checks for programs. AC_PROG_AWK AC_PROG_SED Loading Loading @@ -119,6 +122,9 @@ AS_IF([test "x$is_enabled_build_tests" = "xyes"], AC_CONFIG_FILES(tests/Makefile) ], []) # check for mercury PKG_CHECK_MODULES([MERCURY], [mercury >= 0.26]) # check for libyaml-cpp PKG_CHECK_MODULES([YAMLCPP], [yaml-cpp >= 0.5.1]) Loading @@ -141,7 +147,13 @@ AS_IF([test "x${PROTOC}" == "x"], AC_SEARCH_LIBS([yaml_parser_initialize], [yaml], [YAML_LIBS="-lyaml" AC_SUBST(YAML_LIBS)], [AC_MSG_ERROR([This software required libyaml >= 0.1.4])]) [AC_MSG_ERROR([This software requires libyaml >= 0.1.4])]) # check for libtar manually (since it doesn't provide a pkgconfig file) AC_SEARCH_LIBS([tar_open], [tar], [TAR_LIBS="-ltar" AC_SUBST(TAR_LIBS)], [AC_MSG_ERROR([This software requires libtar >= 1.2.0])]) # Checks for header files. Loading @@ -149,7 +161,13 @@ AC_SEARCH_LIBS([yaml_parser_initialize], [yaml], AC_CHECK_HEADER_STDBOOL # Checks for library functions. AC_CHECK_FUNC([fallocate],[fallocate],[fallocate]) AS_IF([test "x${PROTOC}" == "x"], [AC_MSG_ERROR([ProtoBuf compiler "protoc" not found.])]) AC_CHECK_FUNC([fallocate], [AC_DEFINE([HAVE_FALLOCATE], [1], [Define if file preallocation is available])]) ################################################################################ ### write makefiles Loading etc/norns.conf.in +7 −1 Original line number Diff line number Diff line Loading @@ -18,11 +18,17 @@ global_settings: [ # path to pidfile pidfile: "@localstatedir@/urd.pid", # address to bind to bind_address: "127.0.0.1", # incoming port for remote connections remote_port: 42000, # number of worker threads to serve I/O requests workers: 4 workers: 4, # staging dir for temporary resources staging_directory: "/tmp/urd/" ] ## list of namespaces available by default when service starts Loading Loading
.gitlab-ci.yml +247 −36 Original line number Diff line number Diff line Loading @@ -3,9 +3,13 @@ # can use verions as well, like gcc:5.2 # see https://hub.docker.com/_/gcc/ variables: GIT_SUBMODULE_STRATEGY: normal stages: - build - test - deploy # Install dependencies for GCC builds before_script: Loading @@ -22,6 +26,39 @@ before_script: protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev cmake - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd ### GCC 5 Loading @@ -34,10 +71,10 @@ build:gcc:5: - mkdir build && cd build - ../configure --enable-tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - cd tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api ### GCC 6 Loading @@ -50,10 +87,10 @@ build:gcc:6: - mkdir build && cd build - ../configure --enable-tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" - cd tests - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j4 CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" core - make -j$(nproc) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" api ### GCC 7 Loading @@ -66,10 +103,10 @@ build:gcc:7: - mkdir build && cd build - ../configure --enable-tests - make -j4 - make -j$(nproc) - cd tests - make -j4 - make -j4 - make -j$(nproc) - make -j$(nproc) ### GCC 8 Loading @@ -82,16 +119,16 @@ build:gcc:8: - mkdir build && cd build - ../configure --enable-tests - make -j4 - make -j$(nproc) - cd tests - make -j4 - make -j4 - make -j$(nproc) - make -j$(nproc) ################################################################################ # test scripts ################################################################################ test:ubuntu:latest: test:coverage: image: ubuntu:latest stage: test Loading @@ -100,6 +137,7 @@ test:ubuntu:latest: - apt-get update && apt-get upgrade -y && apt-get install -y git build-essential autotools-dev automake Loading @@ -117,8 +155,44 @@ test:ubuntu:latest: protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev libcap2-bin valgrind cmake lcov - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd && ldconfig - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd && ldconfig # Build and test script: Loading @@ -126,36 +200,173 @@ test:ubuntu:latest: - mkdir build && cd build - ../configure --enable-tests # CFLAGS="-fsanitize=address" # CXXFLAGS="-fsanitize=address" # LDFLAGS="-fsanitize=address" # CPPFLAGS="-D__LOGGER_ENABLE_DEBUG__" - make -j4 CFLAGS="-O0 --coverage" CXXFLAGS="-O0 --coverage" LDFLAGS="--coverage" - make -j$(nproc) - cd tests - make -j4 core - ./core -as - make -j4 api # - NORNS_DEBUG_OUTPUT_TO_STDERR=1 NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - make -j$(nproc) core - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./core -as - make -j$(nproc) api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::NORNS_TASK]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_buffer_to_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_remove_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_add_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_remove_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" after_script: - (cd build && ../gencov.sh) - genhtml -o build/html/coverage build/norns.info - if [[ -e build/tests.log ]]; then cat $(tail -1 build/tests.log)/config/urd.log; fi artifacts: paths: - build/html/coverage/ test:optimized: image: ubuntu:latest stage: test # Install dependencies before_script: - apt-get update && apt-get upgrade -y && apt-get install -y git build-essential autotools-dev automake autoconf libtool pkg-config libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-regex-dev libprotobuf-dev protobuf-compiler libprotobuf-c-dev protobuf-c-compiler libyaml-cpp-dev libyaml-dev libtar-dev libcap2-bin valgrind cmake - pushd . && git clone https://github.com/ofiwg/libfabric.git && cd libfabric && ./autogen.sh && mkdir build && cd build && ../configure && make -j $(nproc) && make install && popd && ldconfig - pushd . && git clone https://github.com/mercury-hpc/mercury.git && cd mercury && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DNA_USE_OFI:BOOL=ON .. && make -j $(nproc) && make install && popd && ldconfig # Build and test script: - ./bootstrap.sh - mkdir build && cd build - ../configure --enable-tests - make -j$(nproc) - cd tests - make -j$(nproc) core - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./core -as - make -j$(nproc) api - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::NORNS_TASK]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_buffer_to_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_pull_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_links]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_memory_to_posix_file_errors]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_file]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_push_to_posix_subdir]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_remove_local_posix_files]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_add_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_remove_process]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_send_command]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]" - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]" after_script: - pwd - if [[ -e tests.log ]]; - if [[ -e build/tests.log ]]; then cat $(tail -1 tests.log)/config/urd.log; cat $(tail -1 build/tests.log)/config/urd.log; fi pages: stage: deploy dependencies: - test:coverage script: - mv coverage/ public/ artifacts: paths: - public expire_in: 30 days only: - master
.gitmodules 0 → 100644 +3 −0 Original line number Diff line number Diff line [submodule "src/externals/hermes"] path = src/externals/hermes url = ../hermes.git
README.md +97 −23 Original line number Diff line number Diff line # Norns [](https://storage.bsc.es/gitlab/hpc/norns/commits/master) [](https://storage.bsc.es/gitlab/hpc/norns/commits/21-add-support-for-remote-transfers-2) Norns is an open-source data scheduling service that orchestrates asynchronous data transfers between different storage backends in an HPC cluster. Through its API, Norns provides three different functions. First, it allows system administrators to expose the storage architecture of an HPC cluster by creating **dataspaces** associated to different storage backends such as node-local NVMs and POSIX file systems, or system-wide parallel file systems and object stores, thus making them available to applications, services, and users. Second, it provides a framework for submitting and monitoring the asynchronous transfers of **data resources** between the (local and remote) dataspaces available to a user, such as process buffers, POSIX files and directories or objects. Third, it arbitrates requests by managing a queue of pending work and evaluating requests to maximize dataspace throughput while minimizing the interferences with normal application I/O. Norns Data Scheduler ==================== Norns has currently been tested only under GNU/Linux. Build dependencies: ## Building and installing from source - A c++11-conforming compiler - libboost-system >= 1.53 - libboost-filesystem >= 1.53 - libboost-program-options >= 1.53 - libboost-thread >= 1.53 - libboost-regex >= 1.53 (only if self tests are also built) - libprotobuf + protobuf compiler >= 2.5.0 - libprotobuf-c + protobuf-c compiler >= 1.0.2 - libyaml-cpp >= 0.5.1 - libyaml >= 0.1.4 Distribution tarballs are available from the [releases](releases) tab. If you are building Norns from a developer Git clone, you must first run the `bootstrap.sh` script, which will invoke the GNU Autotools to bootstrap Norns' configuration and build mechanisms. If you are building Norns from an official distribiution tarball, there is no need to run the `bootstrap.sh` script, since all distribution tarballs are already boostrapped. ### Dependencies - Installation in CentOS 7 git clone git@git.ph.ed.ac.uk:nextgenio/norns.git && cd norns ./bootstrap.sh mkdir <build-dir> cd <build-dir> ./configure --prefix=<install-dir> --sysconfdir=<config-dir> make make install cp <build-dir>/etc/norns.service /usr/lib/systemd/system/norns.service Compiling and running Norns requires up-to-date versions of the following software packages (note that, though it may compile and run, using excessively old versions of these packages can cause indirect errors that are very difficult to track down): sudo setcap cap_sys_ptrace,cap_chown=+ep ./urd - A standard **C++11** conforming compiler (the code is routinely tested against GCC 4.9/Clang 3.3 and higher). - Autotools (autoconf 2.69 or higher, automake 1.14.1 or higher, and libtool 2.4.2 or higher) and CMake (3.10.0 or higher). - The following Boost libraries (1.53 or higher): `system`, `filesystem`, `program_options`, and `thread`. Optionally, the `regex` library may also be required if self tests are enabled with the `--enable-tests` option. - Google's Protocol Buffers for [C](https://github.com/protobuf-c/protobuf-c) (1.0.2 or higher) and for [C++](https://github.com/protocolbuffers/protobuf) (2.5.0 or higher). - [LibYAML](https://github.com/yaml/libyaml) (0.1.4 or higher) and [yaml-cpp](https://github.com/jbeder/yaml-cpp) (0.5.1 or higher). - [Mercury](https://github.com/mercury-hpc/mercury) 1.0 or higher (**IMPORTANT** Mercury may require additional dependencies such as libfabric depending on the desired transport protocol). - [Hermes](https://storage.bsc.es/gitlab/hpc/hermes) (our own C++ wrapper for Mercury. It should be automatically downloaded when cloning with the `--recursive` option). #### Installation in CentOS TODO #### Installation in Ubuntu ```bash # Installing dependencies avaiable through package manager $ apt-get install -y libboost-system-dev libboost-filesystem-dev \ libboost-program-options-dev libboost-thread-dev \ libboost-regex-dev libprotobuf-dev protobuf-compiler \ libprotobuf-c-dev protobuf-c-compiler \ libyaml-cpp-dev libyaml-dev libtar-dev # Building and installing libfabric (required for Mercury's OFI/libfabric plugin) $ git clone https://github.com/ofiwg/libfabric.git && $ cd libfabric $ ./autogen.sh $ mkdir build && cd build $ ../configure && make && make install # Building and installing Mercury with OFI/libfabric plugin $ git clone https://github.com/mercury-hpc/mercury.git $ cd mercury $ mkdir build && cd build $ cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_TESTING:BOOL=OFF \ -DMERCURY_USE_SM_ROUTING:BOOL=OFF -DMERCURY_USE_SELF_FORWARD:BOOL=OFF \ -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DMERCURY_USE_BOOST_PP:BOOL=ON \ -DMERCURY_USE_EAGER_BULK:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON \ -DNA_USE_OFI:BOOL=ON \ .. $ make && make install # Building, testing and installing Norns under '/usr/local/', with configuration # files under '/etc/norns/' and temporary files under '/var/run/norns/' $ git clone --recursive https://storage.bsc.es/gitlab/hpc/norns.git $ cd norns $ ./bootstrap.sh $ mkdir build && cd build $ ../configure \ --enable-tests \ --prefix=/usr/local \ --sysconfdir=/etc/norns \ --localstatedir=/var/run/norns $ make && make check && make install # Optional: providing file system permission override capabilities to Norns # control daemon $ setcap cap_sys_ptrace,cap_chown=+ep /usr/local/bin/urd ```
configure.ac +19 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,9 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) AC_LANG([C]) AC_LANG([C++]) # Checks for programs. AC_PROG_AWK AC_PROG_SED Loading Loading @@ -119,6 +122,9 @@ AS_IF([test "x$is_enabled_build_tests" = "xyes"], AC_CONFIG_FILES(tests/Makefile) ], []) # check for mercury PKG_CHECK_MODULES([MERCURY], [mercury >= 0.26]) # check for libyaml-cpp PKG_CHECK_MODULES([YAMLCPP], [yaml-cpp >= 0.5.1]) Loading @@ -141,7 +147,13 @@ AS_IF([test "x${PROTOC}" == "x"], AC_SEARCH_LIBS([yaml_parser_initialize], [yaml], [YAML_LIBS="-lyaml" AC_SUBST(YAML_LIBS)], [AC_MSG_ERROR([This software required libyaml >= 0.1.4])]) [AC_MSG_ERROR([This software requires libyaml >= 0.1.4])]) # check for libtar manually (since it doesn't provide a pkgconfig file) AC_SEARCH_LIBS([tar_open], [tar], [TAR_LIBS="-ltar" AC_SUBST(TAR_LIBS)], [AC_MSG_ERROR([This software requires libtar >= 1.2.0])]) # Checks for header files. Loading @@ -149,7 +161,13 @@ AC_SEARCH_LIBS([yaml_parser_initialize], [yaml], AC_CHECK_HEADER_STDBOOL # Checks for library functions. AC_CHECK_FUNC([fallocate],[fallocate],[fallocate]) AS_IF([test "x${PROTOC}" == "x"], [AC_MSG_ERROR([ProtoBuf compiler "protoc" not found.])]) AC_CHECK_FUNC([fallocate], [AC_DEFINE([HAVE_FALLOCATE], [1], [Define if file preallocation is available])]) ################################################################################ ### write makefiles Loading
etc/norns.conf.in +7 −1 Original line number Diff line number Diff line Loading @@ -18,11 +18,17 @@ global_settings: [ # path to pidfile pidfile: "@localstatedir@/urd.pid", # address to bind to bind_address: "127.0.0.1", # incoming port for remote connections remote_port: 42000, # number of worker threads to serve I/O requests workers: 4 workers: 4, # staging dir for temporary resources staging_directory: "/tmp/urd/" ] ## list of namespaces available by default when service starts Loading