diff --git a/.gitignore b/.gitignore index db5131f..f83f745 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bin/* benchmark/results/* +cmake-build-debug/* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..30f3dbd --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,48 @@ +# Copyright (c) 2018 Marcel Ehrhardt +# Copyright (c) 2018 Matthias Noack +# +# See accompanying file LICENSE and README for further information. + +project(ham LANGUAGES CXX) +cmake_minimum_required(VERSION 3.2 FATAL_ERROR) # TODO verfify + +# set output directory +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +message(STATUS "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR}) + +### thirdparty dependencies + +# Boost +find_package(Boost 1.40 COMPONENTS program_options system REQUIRED) +add_library(boost_library INTERFACE) +target_include_directories (boost_library INTERFACE ${Boost_INCLUDE_DIRS}) +target_link_libraries (boost_library INTERFACE ${Boost_LIBRARIES}) + +# MPI +find_package(MPI) # not required +if (MPI_FOUND) + add_library (mpi_library INTERFACE) + target_include_directories (mpi_library INTERFACE ${MPI_CXX_INCLUDE_PATH}) + target_compile_options (mpi_library INTERFACE ${MPI_CXX_COMPILE_FLAGS}) + target_link_libraries (mpi_library INTERFACE ${MPI_CXX_LIBRARIES}) +endif () + +# Intel SCIF (for Xeon Phi accelerators with KNC architecture) +find_file(SCIF_HEADER_FILE "scif.h") +if (SCIF_HEADER_FILE) + set(SCIF_FOUND ON) + get_filename_component(SCIF_INCLUDE_DIR "${SCIF_HEADER_FILE}" DIRECTORY) + message(STATUS "Found SCIF: ${SCIF_HEADER_FILE}") + + add_library (scif_library INTERFACE) + target_include_directories (scif_library INTERFACE ${SCIF_INCLUDE_DIR}) +else () + message(STATUS "Could NOT find SCIF (missing: scif.h)") +endif () + +# tell the compiler to be strict +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAM_DEBUG_ON") + +add_subdirectory(thirdparty/bmt ${CMAKE_CURRENT_BINARY_DIR}/build.noma_bmt) +add_subdirectory(src) diff --git a/Jamroot b/Jamroot index f4bb375..16b4f72 100644 --- a/Jamroot +++ b/Jamroot @@ -24,7 +24,7 @@ rule get-boost-lib-path ( properties * ) } lib boost_program_options : : boost_program_options @get-boost-lib-path ; -lib scif : : scif ; +# lib scif : : scif ; project HAM : source-location $(SRC) @@ -32,14 +32,15 @@ project HAM $(INC) $(BOOST_PATH)/include debug:HAM_DEBUG_ON - debug_mic:HAM_DEBUG_ON + debug_mic:HAM_DEBUG_ON # intel:"-static-intel" on # off, on, full #speed # off, speed, space - "-std=c++11" + "-hstd=c++11" multi -# static - : default-build debug release debug_mic release_mic + static + : default-build release +# : default-build debug release debug_mic release_mic ; # Object files that are compiled the same for all targets @@ -56,40 +57,59 @@ obj offload_obj_mpi : ham/offload/offload.cpp : /mpi//mpi HAM_C constant OBJ_FILES_MPI : communicator_obj_mpi runtime_obj_mpi offload_obj_mpi communicator_mpi_obj_mpi ; -obj communicator_obj_scif : ham/net/communicator.cpp : scif HAM_COMM_SCIF ; -obj communicator_scif_obj_scif : ham/net/communicator_scif.cpp : scif HAM_COMM_SCIF ; -obj runtime_obj_scif : ham/offload/runtime.cpp : scif HAM_COMM_SCIF ; -obj offload_obj_scif : ham/offload/offload.cpp : scif HAM_COMM_SCIF ; +obj communicator_obj_mpi_rma_dyn : ham/net/communicator.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +obj communicator_mpi_rma_dyn_obj_mpi_rma_dyn : ham/net/communicator_mpi_rma_dynamic.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +obj runtime_obj_mpi_rma_dyn : ham/offload/runtime.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +obj offload_obj_mpi_rma_dyn : ham/offload/offload.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; -constant OBJ_FILES_SCIF : communicator_obj_scif runtime_obj_scif offload_obj_scif communicator_scif_obj_scif ; +constant OBJ_FILES_MPI_RMA_DYN : communicator_obj_mpi_rma_dyn communicator_mpi_rma_dyn_obj_mpi_rma_dyn runtime_obj_mpi_rma_dyn offload_obj_mpi_rma_dyn ; + +# obj communicator_obj_scif : ham/net/communicator.cpp : scif HAM_COMM_SCIF ; +# obj communicator_scif_obj_scif : ham/net/communicator_scif.cpp : scif HAM_COMM_SCIF ; +# obj runtime_obj_scif : ham/offload/runtime.cpp : scif HAM_COMM_SCIF ; +# obj offload_obj_scif : ham/offload/offload.cpp : scif HAM_COMM_SCIF ; + +# constant OBJ_FILES_SCIF : communicator_obj_scif runtime_obj_scif offload_obj_scif communicator_scif_obj_scif ; # Libraries obj main_obj_mpi : ham/offload/main.cpp : /mpi//mpi HAM_COMM_MPI ; -obj main_obj_scif : ham/offload/main.cpp : scif HAM_COMM_SCIF ; +obj main_obj_mpi_rma_dyn : ham/offload/main.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +# obj main_obj_scif : ham/offload/main.cpp : scif HAM_COMM_SCIF ; lib ham_offload_mpi : $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI) main_obj_mpi boost_program_options : /mpi//mpi HAM_COMM_MPI ; -lib ham_offload_scif - : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_obj_scif boost_program_options - : scif HAM_COMM_SCIF - ; +lib ham_offload_mpi_rma_dyn + : $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI_RMA_DYN) main_obj_mpi_rma_dyn boost_program_options + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC + ; + +# lib ham_offload_scif +# : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_obj_scif boost_program_options +# : scif HAM_COMM_SCIF +# ; obj main_explicit_obj_mpi : ham/offload/main_explicit.cpp : /mpi//mpi HAM_COMM_MPI ; -obj main_explicit_obj_scif : ham/offload/main_explicit.cpp : scif HAM_COMM_SCIF ; +obj main_explicit_obj_mpi_rma_dyn : ham/offload/main_explicit.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +# obj main_explicit_obj_scif : ham/offload/main_explicit.cpp : scif HAM_COMM_SCIF ; lib ham_offload_mpi_explicit : $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI) main_explicit_obj_mpi boost_program_options : /mpi//mpi HAM_COMM_MPI HAM_EXPLICIT ; -lib ham_offload_scif_explicit - : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_explicit_obj_scif boost_program_options - : scif HAM_COMM_SCIF HAM_EXPLICIT - ; +lib ham_offload_mpi_rma_dyn_explicit + : $(OBJ_FILES_COMMON) $(OBJ_FILES_MPI_RMA_DYN) main_explicit_obj_mpi_rma_dyn boost_program_options + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC HAM_EXPLICIT + ; + +# lib ham_offload_scif_explicit +# : $(OBJ_FILES_COMMON) $(OBJ_FILES_SCIF) main_explicit_obj_scif boost_program_options +# : scif HAM_COMM_SCIF HAM_EXPLICIT +# ; # Benchmarks @@ -99,11 +119,17 @@ exe benchmark_ham_offload_mpi : /mpi//mpi ham_offload_mpi ; -obj benchmark_ham_offload_scif_obj : benchmark_ham_offload.cpp : scif HAM_COMM_SCIF ; -exe benchmark_ham_offload_scif - : benchmark_ham_offload_scif_obj boost_program_options ham_offload_scif - : scif - ; +obj benchmark_ham_offload_mpi_rma_dyn_obj : benchmark_ham_offload.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +exe benchmark_ham_offload_mpi_rma_dyn + : benchmark_ham_offload_mpi_rma_dyn_obj boost_program_options + : /mpi//mpi ham_offload_mpi_rma_dyn + ; + +# obj benchmark_ham_offload_scif_obj : benchmark_ham_offload.cpp : scif HAM_COMM_SCIF ; +# exe benchmark_ham_offload_scif +# : benchmark_ham_offload_scif_obj boost_program_options ham_offload_scif +# : scif +# ; exe benchmark_intel_leo : benchmark_intel_leo.cpp boost_program_options @@ -116,51 +142,69 @@ exe active_msgs : active_msgs.cpp ; +exe active_msgs_over_file + : active_msgs_over_file.cpp boost_program_options + ; + exe ham_offload - : ham_offload.cpp ham_offload_scif boost_program_options + : ham_offload.cpp ham_offload_mpi_rma_dyn boost_program_options # : /mpi//mpi HAM_COMM_MPI - : scif HAM_COMM_SCIF + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC +# : scif HAM_COMM_SCIF ; exe ham_offload_explicit - : ham_offload_explicit.cpp ham_offload_mpi_explicit boost_program_options - : /mpi//mpi HAM_COMM_MPI + : ham_offload_explicit.cpp ham_offload_mpi_rma_dyn_explicit boost_program_options +# : /mpi//mpi HAM_COMM_MPI + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC # : scif HAM_COMM_SCIF ; -exe inner_product_scif - : [ obj inner_product_obj : inner_product.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options - : scif HAM_COMM_SCIF - ; +# exe inner_product_scif +# : [ obj inner_product_obj : inner_product.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options +# : scif HAM_COMM_SCIF +# ; exe inner_product_mpi : [ obj inner_product_obj : inner_product.cpp : /mpi//mpi HAM_COMM_MPI ] ham_offload_mpi boost_program_options : /mpi//mpi HAM_COMM_MPI ; -# -exe test_data_transfer_scif - : [ obj test_data_transfer_obj : test_data_transfer.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options - : scif HAM_COMM_SCIF - ; +exe inner_product_mpi_rma_dynamic + : [ obj inner_product_obj : inner_product.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options + : /mpi//mpi -g HAM_COMM_MPI_RMA_DYNAMIC + ; + +# exe test_data_transfer_scif +# : [ obj test_data_transfer_obj : test_data_transfer.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options +# : scif HAM_COMM_SCIF +# ; exe test_data_transfer_mpi : [ obj test_data_transfer_obj : test_data_transfer.cpp : /mpi//mpi HAM_COMM_MPI ] ham_offload_mpi boost_program_options : /mpi//mpi HAM_COMM_MPI ; - -exe test_argument_transfer_scif - : [ obj test_argument_transfer_obj : test_argument_transfer.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options - : scif HAM_COMM_SCIF +exe test_data_transfer_mpi_rma_dynamic + : [ obj test_data_transfer_obj : test_data_transfer.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ; +# exe test_argument_transfer_scif +# : [ obj test_argument_transfer_obj : test_argument_transfer.cpp : scif HAM_COMM_SCIF ] ham_offload_scif boost_program_options +# : scif HAM_COMM_SCIF +# ; + exe test_argument_transfer_mpi : [ obj test_argument_transfer_obj : test_argument_transfer.cpp : /mpi//mpi HAM_COMM_MPI ] ham_offload_mpi boost_program_options : /mpi//mpi HAM_COMM_MPI ; +exe test_argument_transfer_mpi_rma_dynamic + : [ obj test_argument_transfer_obj : test_argument_transfer.cpp : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC ] ham_offload_mpi_rma_dyn boost_program_options + : /mpi//mpi HAM_COMM_MPI_RMA_DYNAMIC + ; # Explicit targets (not built by default) explicit benchmark_intel_leo ; -explicit test_data_transfer_scif ; +# explicit test_data_transfer_scif ; diff --git a/include/ham/misc/constants.hpp b/include/ham/misc/constants.hpp index 28483a9..b37c690 100644 --- a/include/ham/misc/constants.hpp +++ b/include/ham/misc/constants.hpp @@ -17,6 +17,8 @@ namespace constants { enum net { MSG_SIZE = HAM_MESSAGE_SIZE, MSG_BUFFERS = 256, + DATA_PUT_CODE = 1, + DATA_GET_CODE = 2, }; enum arch { diff --git a/include/ham/misc/migratable.hpp b/include/ham/misc/migratable.hpp index 012a99e..0a31b42 100644 --- a/include/ham/misc/migratable.hpp +++ b/include/ham/misc/migratable.hpp @@ -28,12 +28,12 @@ class migratable //: value(std::forward(arg)) // NOTE: compatible types are allowed : value(std::forward(arg)) // NOTE: compatible types are allowed { -// std::cout << "migratable-ctor: " << value << std::endl; + // std::cout << "migratable-ctor: " << value << std::endl; } operator const T& () const { -// std::cout << "migratable-conversion: " << value << std::endl; + // std::cout << "migratable-conversion: " << value << std::endl; return value; } private: diff --git a/include/ham/misc/types.hpp b/include/ham/misc/types.hpp index 458eefc..f50fa0e 100644 --- a/include/ham/misc/types.hpp +++ b/include/ham/misc/types.hpp @@ -9,9 +9,13 @@ #include #include +#include "ham/misc/migratable.hpp" + namespace ham { typedef size_t node_t; // node type, e.g. MPI rank, identifies remote target process +typedef size_t flag_t; // MPI RMA completion flag / buffer index +typedef char byte_t; typedef char* msg_buffer_t; // buffer type for messages namespace net { @@ -29,7 +33,7 @@ class result_container T get() { return T(std::move(res)); } private: - T res; + migratable res; }; template<> diff --git a/include/ham/net/communicator.hpp b/include/ham/net/communicator.hpp index 52fe25b..ea410f8 100644 --- a/include/ham/net/communicator.hpp +++ b/include/ham/net/communicator.hpp @@ -37,7 +37,14 @@ namespace net { { char data[constants::MSG_SIZE]; }; - + + struct + msg_flag_buffer + { + // buffer for fully rma backend. windows will consist of several of those + char msg[constants::MSG_SIZE]; + flag_t flag; + }; node_t this_node(); } @@ -49,8 +56,14 @@ namespace net { #elif defined HAM_COMM_SCIF #define HAM_COMM_ONE_SIDED #include "ham/net/communicator_scif.hpp" +#elif defined HAM_COMM_MPI_RMA_DYNAMIC +#include "ham/net/communicator_mpi_rma_dynamic.hpp" +#elif defined HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY +#include "ham/net/communicator_mpi_rma_dynamic_data_only.hpp" +#elif defined HAM_COMM_TCP +#include "ham/net/communicator_tcp.hpp" #else -static_assert(false, "Please define either HAM_COMM_MPI, or HAM_COMM_SCIF."); +static_assert(false, "Please define either HAM_COMM_MPI, HAM_COMM_SCIF, HAM_COMM_MPI_RMA_DYNAMIC, HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY or HAM_COMM_TCP"); #endif #endif // ham_net_communicator_hpp diff --git a/include/ham/net/communicator_mpi_rma_dynamic.hpp b/include/ham/net/communicator_mpi_rma_dynamic.hpp new file mode 100644 index 0000000..e74c1ba --- /dev/null +++ b/include/ham/net/communicator_mpi_rma_dynamic.hpp @@ -0,0 +1,600 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ham_net_communicator_mpi_rma_dynamic_hpp +#define ham_net_communicator_mpi_rma_dynamic_hpp + +#include + +#include +#include // memcpy +#include // posix_memalign + +#include "ham/misc/constants.hpp" +#include "ham/misc/resource_pool.hpp" +#include "ham/misc/types.hpp" +#include "ham/util/debug.hpp" +#include "ham/util/log.hpp" +#include "communicator.hpp" + +namespace ham { +namespace net { + +template +class buffer_ptr { +public: + buffer_ptr(); + buffer_ptr(T* ptr, node_t node) : ptr_(ptr), node_(node), mpi_address_(0) { } + buffer_ptr(T* ptr, node_t node, MPI_Aint mpi_address) : ptr_(ptr), node_(node), mpi_address_(mpi_address) { } + + + T* get() { return ptr_; } + node_t node() { return node_; } + MPI_Aint get_mpi_address() { return mpi_address_; } + + // element access + T& operator [] (size_t i); + + // basic pointer arithmetic to address sub-buffers + buffer_ptr operator+(size_t off) + { + return buffer_ptr(ptr_ + off, node_); + } + +private: + T* ptr_; + node_t node_; + MPI_Aint mpi_address_; +}; + +class node_descriptor +{ +public: + const char* name() const { return name_; } +private: + //std::string name_; // TODO(improvement): unify node description for all back-ends, NOTE: std::string is not trivally transferable + char name_[MPI_MAX_PROCESSOR_NAME + 1]; + + friend class net::communicator; +}; + +class communicator { +public: + enum { + NO_BUFFER_INDEX = constants::MSG_BUFFERS, // invalid buffer index (max valid + 1) + FLAG_FALSE = constants::MSG_BUFFERS + 1 // special value, outside normal index range + }; + + // externally used interface of request must be shared across all communicator-implementations + class request { + public: + request() : valid_(false) {} // instantiate invalid + + request(node_t target_node, node_t source_node, size_t remote_buffer_index, size_t local_buffer_index) + : target_node(target_node), source_node(source_node), valid_(true), remote_buffer_index(remote_buffer_index), local_buffer_index(local_buffer_index), req_count(0), data_transfer_type(0) + {} + + // return true if request was finished + // will not work as intended for rma ops, no equivalent to test() available for remote completion + bool test() + { + if(data_transfer_type) { // this will be true for rma data transfers + int flag = 0; + MPI_Testall(req_count, mpi_reqs, &flag, MPI_STATUS_IGNORE); // test on RGET is what we want, because local completion = full completion for get, but for RPut local is not enough and there is no non-blocking remote-completion test + HAM_DEBUG( HAM_LOG << "request::test(), warning: may give false positive on rma put remote completion" << std::endl; ) + // TODO - Daniel: this is bad but MPI RMA doesn't have anything better + return flag != 0; + } + return communicator::instance().test_local_flag(target_node, local_buffer_index); + } + + void* get() // blocks + { + if(data_transfer_type) { + HAM_DEBUG( HAM_LOG << "request::get(), before MPI_Waitall()" << std::endl; ) + MPI_Waitall(req_count, mpi_reqs, MPI_STATUS_IGNORE); // Get will have fully completed + HAM_DEBUG( HAM_LOG << "request::get(), after MPI_Waitall()" << std::endl; ) + if(data_transfer_type == constants::DATA_PUT_CODE) { + HAM_DEBUG( HAM_LOG << "request::get(), before MPI_Win_flush()" << std::endl; ) + communicator::instance().flush_data(target_node); + HAM_DEBUG( HAM_LOG << "request::get(), after MPI_Win_flush()" << std::endl; ) + } + // this will only be true for async rma GETs + // there will be no result returned, so this won't poll on anything and return a dummy instead. + return nullptr; + // TODO - Daniel: this is bad but MPI RMA doesn't have anything better + } else { + return communicator::instance().recv_msg(target_node, local_buffer_index); + } + } + + template + void send_result(T* result_msg, size_t size) + { + assert(communicator::this_node() == target_node); // this assert fails if send_result is called from the wrong side + + communicator::instance().send_msg(source_node, local_buffer_index, NO_BUFFER_INDEX, result_msg, size); + } + + bool valid() const + { + return valid_; + } + + bool is_rma_data_transfer() const + { + return data_transfer_type; + } + + MPI_Request& next_mpi_request() + { + HAM_DEBUG( HAM_LOG << "next_mpi_request(): this=" << this << ", req_count=" << req_count << ", NUM_REQUESTS=" << NUM_REQUESTS << std::endl; ) + assert(req_count < NUM_REQUESTS); + return mpi_reqs[req_count++]; // NOTE: post-increment + } + + node_t target_node; + node_t source_node; + bool valid_; + short data_transfer_type; + + // only needed by the sender + enum { NUM_REQUESTS = 3 }; + + size_t remote_buffer_index; // buffer to use for sending the message + size_t local_buffer_index; // buffer to use for receiving the result + size_t req_count; + + private: + MPI_Request mpi_reqs[NUM_REQUESTS]; // for sending the msg, receiving the result, and an associated data transfer + }; // class request + + typedef request& request_reference_type; + typedef const request& request_const_reference_type; + + communicator(int argc, char* argv[]) + { + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initialising MPI" << std::endl; ) + + instance_ = this; + int p; + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &p); + if (p != MPI_THREAD_MULTIPLE) + { + std::cerr << "Could not initialise MPI with MPI_THREAD_MULTIPLE, MPI_Init_thread() returned " << p << std::endl; + } + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initialising MPI ..." << std::endl; ) + + int t; + MPI_Comm_rank(MPI_COMM_WORLD, &t); + this_node_ = t; + MPI_Comm_size(MPI_COMM_WORLD, &t); + nodes_ = t; + host_node_ = 0; // TODO(improvement): make configureable, like for SCIF + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initialising MPI done" << std::endl; ) + + peers = new mpi_peer[nodes_]; + + // start of node descriptor code: + node_descriptions.resize(nodes_); + + // build own node descriptor + node_descriptor node_description; + int count; + MPI_Get_processor_name(node_description.name_, &count); + node_description.name_[count] = 0x0; // null terminate + + // communicate descriptors between nodes + HAM_DEBUG( HAM_LOG << "communicator::communicator(): gathering node descriptions" << std::endl; ) + MPI_Allgather(&node_description, sizeof(node_descriptor), MPI_BYTE, node_descriptions.data(), sizeof(node_descriptor), MPI_BYTE, MPI_COMM_WORLD); + HAM_DEBUG( HAM_LOG << "communicator::communicator(): gathering node descriptions done" << std::endl; ) + + + // initialise data windows + for (node_t i = 0; i < nodes_; ++i) { + // dynamic data window + MPI_Win_create_dynamic(MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[i].rma_data_win)); + } + + // initialise message windows + for (node_t i = 0; i < nodes_; ++i) { // loop through ranks + + if (i == this_node_) { // create local windows with allocated memory for targets, host creates one inbound set of windows for all targets + + // allocate memory and create windows + if (this_node_ == host_node_) { // host creates one large window with subsets associated with different targets + + // (MSG_SIZE+FLAG_SIZE) * MSG_BUFFERS * num_nodes = bytes of memory allocated (sizes are implicit in msg_flag_buffer struct) + peers[this_node_].msg_flag_data = allocate_peer_buffer(constants::MSG_BUFFERS * nodes_, this_node_); + // peers[this_node_].flag_data = allocate_peer_buffer(constants::MSG_BUFFERS * nodes_, this_node_); + // set flags to FLAG_FALSE + reset_flags(peers[this_node_].msg_flag_data, constants::MSG_BUFFERS * nodes_); // structs are contiguos, this is ok + + // fill resource pools for managing indices on the host + for (size_t j = 0; j < nodes_; ++j) { + for (size_t k = constants::MSG_BUFFERS; k > 0; --k) { + // target buffers + peers[j].local_buffer_pool.add(k - 1); + peers[j].remote_buffer_pool.add(k - 1); + } + // allocate first next_request, + allocate_next_request(j); + } + // create window with memory + MPI_Win_create((peers[this_node_].msg_flag_data.get()), sizeof(msg_flag_buffer) * constants::MSG_BUFFERS * nodes_, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[this_node_].msg_flag_win)); + // MPI_Win_create((peers[this_node_].flag_data.get()), sizeof(cache_line_buffer) * constants::MSG_BUFFERS * nodes_, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[this_node_].flag_win)); + + } else { // targets create one window with the size of their msg "queue" + // (MSG_SIZE+FLAG_SIZE) * MSG_BUFFERS = bytes of memory allocated (sizes are implicit in msg_flag_buffer struct) + peers[this_node_].msg_flag_data = allocate_peer_buffer(constants::MSG_BUFFERS, this_node_); + // peers[this_node_].flag_data = allocate_peer_buffer(constants::MSG_BUFFERS, this_node_); + // set flags to FLAG_FALSE + reset_flags(peers[this_node_].msg_flag_data, constants::MSG_BUFFERS); + + // create window with memory + MPI_Win_create((peers[this_node_].msg_flag_data.get()), sizeof(msg_buffer) * constants::MSG_BUFFERS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[this_node_].msg_flag_win)); + // MPI_Win_create((peers[this_node_].flag_data.get()), sizeof(cache_line_buffer) * constants::MSG_BUFFERS, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[this_node_].flag_win)); + } + + // debug msg + HAM_DEBUG( HAM_LOG << "Rank: " << this_node_ << " in loop run " << i << " created REAL windows..." << std::endl; ) + + } else { // create remote windows without memory (join the collective call and retreive the window handle) + + MPI_Win_create(nullptr, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[i].msg_flag_win)); + + // debug msg + HAM_DEBUG( HAM_LOG << "Rank: " << this_node_ << " in loop run " << i << " creating EMPTY windows..." << std::endl; ) + } + } + + // get all locks to targets for data + // targets lock to other targets for copies + for (node_t i = 0; i < nodes_; ++i) { // TODO(improvement): needs to be changed when host-rank becomes configurable + if (i != this_node_) { + MPI_Win_lock(MPI_LOCK_SHARED, i, 0, peers[i].rma_data_win); // shared locks because all ranks lock on every target concurrently + } + } + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): rma window creation completed" << std::endl; ) + HAM_DEBUG( HAM_LOG << "communicator::communicator(): communicator initialization completed" << std::endl; ) + } + + ~communicator() + { + MPI_Finalize(); // TODO(improvement): check on error and create output if there was one + HAM_DEBUG( HAM_LOG << "~communicator" << std::endl; ) + } + + // this is only used by the host to manage remote msg buffers and local reply buffers and assign them to requests + const request& allocate_next_request(node_t remote_node) + { + // this allocates a host-managed index for the remote nodes msg "queue" + // so the host knows which buffers are available on the target + const size_t remote_buffer_index = peers[remote_node].remote_buffer_pool.allocate(); + // this allocates an index in the hosts "reply queue" + // request is included in offload message, so the target knows into which buffers replys must be written + // when used, the index will need to be added to an offset determined by a targets rank to address the part of the buffer belonging to this target + // NOTE: the actual host buffer is stored at the hosts peers[0], but the buffer_pools are stored at the corresponding peers[target] + // buffer_pools manage idices within the targets section of the hosts buffer + const size_t local_buffer_index = peers[remote_node].local_buffer_pool.allocate(); + + peers[remote_node].next_request = {remote_node, this_node_, remote_buffer_index, local_buffer_index}; + + return peers[remote_node].next_request; + } + + // only used by host + request allocate_request(node_t remote_node) + { + HAM_DEBUG( HAM_LOG << "communicator::allocate_next_request(): remote_node = " << remote_node << std::endl; ) + + return peers[remote_node].next_request; + } + + // used for rma data transfers, so they wont take up unneeded buffer indices + // only put() and get() use this, copy() offloads an active msg to the data source and therefore uses allocate_request() + request allocate_data_request(node_t remote_node) { + HAM_DEBUG( HAM_LOG << "communicator::allocate_next_request(): remote_node = " << remote_node << std::endl; ) + return { remote_node, this_node_, NO_BUFFER_INDEX, NO_BUFFER_INDEX }; + } + + // only used by host + void free_request(request& req) + { + assert(req.valid()); + assert(req.source_node == this_node_); + + // dont do any of the following for data transfer requests + if(req.remote_buffer_index == NO_BUFFER_INDEX ) { + return; + } + + mpi_peer& peer = peers[req.target_node]; + + + // reset local flag + // local flag is inside the hosts large array of msg_flag_buffers @ peers[host] + // index offset computed using target node + // as this is an access to rma window memory, we need to lock again... + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, this_node_, 0, peers[this_node_].msg_flag_win); + size_t offset = constants::MSG_BUFFERS * req.target_node; // offset msg_flag_buffers to the corresponding nodes region + peers[this_node_].msg_flag_data.get()[offset + req.local_buffer_index].flag = FLAG_FALSE; + MPI_Win_unlock(this_node_, peers[this_node_].msg_flag_win); + + peer.remote_buffer_pool.free(req.remote_buffer_index); + + peer.local_buffer_pool.free(req.local_buffer_index); + + req.valid_ = false; + } + +public: + // make private?! + // called by func below + void send_msg(node_t node, size_t buffer_index, size_t next_buffer_index, void* msg, size_t size) { + // write msg to target msg buffer + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): node = " << node << std::endl; ) + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): remote buffer index = " << buffer_index << std::endl; ) + + if (node != host_node_) { // to targets + + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, node, 0, peers[node].msg_flag_win); + // put msg + MPI_Put(msg, size, MPI_BYTE, node, sizeof(msg_flag_buffer) * buffer_index, size, MPI_BYTE, peers[node].msg_flag_win); + // put flag + MPI_Put(&next_buffer_index, sizeof(next_buffer_index), MPI_BYTE, node, sizeof(msg_flag_buffer) * buffer_index + constants::MSG_SIZE, sizeof(next_buffer_index), MPI_BYTE, peers[node].msg_flag_win); + + MPI_Win_unlock(node, peers[node].msg_flag_win); + + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): wrote msg + flag" << std::endl; ) + + } else { // to host, used by send_result + + // compute offset in the hosts window + size_t offset = constants::MSG_BUFFERS * this_node_; + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): using msg host-offset (bytes): " << offset*sizeof(msg_buffer) << std::endl; ) + + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, node, 0, peers[node].msg_flag_win); + // put msg/result + MPI_Put(msg, size, MPI_BYTE, node, sizeof(msg_flag_buffer) * (offset + buffer_index), size, MPI_BYTE, peers[node].msg_flag_win); + // put flag/result notification + MPI_Put(&next_buffer_index, sizeof(next_buffer_index), MPI_BYTE, node, sizeof(msg_flag_buffer) * (offset + buffer_index) + constants::MSG_SIZE, sizeof(next_buffer_index), MPI_BYTE, peers[node].msg_flag_win); + MPI_Win_unlock(node, peers[node].msg_flag_win); + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): wrote msg + flag" << std::endl; ) + } + } + + // this is used by the host + void send_msg(request_reference_type req, void* msg, size_t size) { + const request& next_req = allocate_next_request(req.target_node); // this is only required for the host + send_msg(req.target_node, req.remote_buffer_index, next_req.remote_buffer_index, msg, size); + } + + // make private?! + // called by function below + void* recv_msg(node_t node, size_t buffer_index = NO_BUFFER_INDEX, void* msg = nullptr, size_t size = constants::MSG_SIZE) { + buffer_index = buffer_index == NO_BUFFER_INDEX ? peers[node].next_flag : buffer_index; + HAM_DEBUG(HAM_LOG << "communicator::recv_msg(): remote node is: " << node << std::endl; ) + HAM_DEBUG(HAM_LOG << "communicator::recv_msg(): using buffer index: " << buffer_index << std::endl; ) + + // size_t *local_flag; + flag_t received_flag = FLAG_FALSE; + + // needed on host to access the memory belonging to the node from which to receive + size_t offset = (this_node_ == host_node_) ? constants::MSG_BUFFERS * node : 0; + + HAM_DEBUG(HAM_LOG << "communicator::recv_msg(): FLAG before polling: " << peers[this_node_].msg_flag_data.get()[offset + buffer_index].flag << std::endl; ) + HAM_DEBUG(HAM_LOG << "communicator::recv_msg(): polling at offset (bytes): " + << (offset + buffer_index) * sizeof(msg_flag_buffer) << std::endl; ) + + while (received_flag == FLAG_FALSE) { + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, this_node_, 0, peers[this_node_].msg_flag_win); + MPI_Get(&received_flag, sizeof(flag_t), MPI_BYTE, this_node_, + sizeof(msg_flag_buffer) * (offset + buffer_index) + constants::MSG_SIZE, sizeof(flag_t), + MPI_BYTE, peers[this_node_].msg_flag_win); + // using a get here, with proper unified memory model just accessing the memory should be okay too, like below + // received_flag = peers[this_node_].msg_flag_data.get()[offset + buffer_index].flag); + MPI_Win_unlock(this_node_, peers[this_node_].msg_flag_win); + } // poll on flag for completion + HAM_DEBUG(HAM_LOG << "communicator::recv_msg(): FLAG after polling: " + << peers[this_node_].msg_flag_data.get()[offset + buffer_index].flag << std::endl; ) + + // reset the flag + // this is weird: theoretically this reset does not need to be visible publicly, as no other process ever reads the flags -> could leave out the locking + // however, if in the separate model the local wincopy has an update that is not updated to the public copy, behaviour when the target locks again for polling is undefined + // might overwrite local change with old flag still valid in public window (which will undo resetting the flag and result in infinite re-execution of the last AM until host writes new flag to public win) + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, this_node_, 0, peers[this_node_].msg_flag_win); + peers[this_node_].msg_flag_data.get()[offset + buffer_index].flag = FLAG_FALSE; // offset==0 for non-hosts + MPI_Win_unlock(this_node_, peers[this_node_].msg_flag_win); + + if (received_flag != NO_BUFFER_INDEX) { // the flag contains the next buffer index to poll on + peers[node].next_flag = received_flag; + } + + HAM_DEBUG( HAM_LOG << "communicator::recv_msg(): done " << std::endl; ) + + return &peers[this_node_].msg_flag_data.get()[offset + buffer_index]; // offset==0 for non-hosts + } + + // to be used by the offload target's main loop: synchronously receive one message at a time + void* recv_msg_host(void* msg = nullptr, size_t size = constants::MSG_SIZE) + { + return static_cast(recv_msg(host_node_, NO_BUFFER_INDEX, msg, size)); + } + + // trigger asyncly receiving the result of a message on the sending side + void recv_result(request_reference_type req) + { + // nothing to do here, since this communicator implementation uses one-sided communication + // the data will be written to where it is expected + HAM_DEBUG( HAM_LOG << "communicator::recv_result(): This does nothing with the MPI RMA communicator" << std::endl; ) + return; + } + + // only used by the host through request.test() (top of this file) called by future.test() (offload.hpp) + bool test_local_flag(node_t node, size_t buffer_index) { + size_t offset = constants::MSG_BUFFERS * node; + flag_t temp_flag = FLAG_FALSE; + // public window flag changes may have not have been updated in local window... so we need to lock again here + MPI_Win_lock(MPI_LOCK_EXCLUSIVE, this_node_, 0, peers[this_node_].msg_flag_win); + temp_flag = peers[node].msg_flag_data.get()[offset + buffer_index].flag; + MPI_Win_unlock(this_node_, peers[this_node_].msg_flag_win); + return temp_flag != FLAG_FALSE; + } + + void flush_data(node_t node) { + MPI_Win_flush(node, peers[node].rma_data_win); + } + + // this is only called @ communicator construction to initialize flags with FLAG_FALSE + // calling this at any other point may reset flags belonging to messages that have not yet been executed (and never will be then) + void reset_flags(buffer_ptr msg_flags, size_t size) { + // now this is where a struct of arrays would have been cooler... + // TODO - Daniel: Ask Matthias if he knows a cooler solution + for (int i = 0; i <= size ; ++i) { + msg_flags.get()[i].flag = FLAG_FALSE; + } + } + + // in MPI RMA backend only used by copy + // host uses async version + // targets don't send data to host as host uses rma get + template + void send_data(T* local_source, buffer_ptr remote_dest, size_t size) { + // execute transfer + MPI_Put(local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), remote_dest.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_dest.node()].rma_data_win); + MPI_Win_flush(remote_dest.node(), peers[remote_dest.node()].rma_data_win); + } + + // to be used by the host only + template + void send_data_async(request_reference_type req, T* local_source, buffer_ptr remote_dest, size_t size) { + req.data_transfer_type = constants::DATA_PUT_CODE; + MPI_Rput(local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), remote_dest.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_dest.node()].rma_data_win, &req.next_mpi_request()); + } + + // not used in MPI RMA backend + // host uses async version + // targets don't use get + // should be safe to remove + template + void recv_data(buffer_ptr remote_source, T* local_dest, size_t size) + { + MPI_Get(local_dest, size * sizeof(T), MPI_BYTE, remote_source.node(), remote_source.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_source.node()].rma_data_win); + MPI_Win_flush(remote_source.node(), peers[remote_source.node()].rma_data_win); + } + + // to be used by the host + template + void recv_data_async(request_reference_type req, buffer_ptr remote_source, T* local_dest, size_t size) { + req.data_transfer_type = constants::DATA_GET_CODE; + MPI_Rget(local_dest, size * sizeof(T), MPI_BYTE, remote_source.node(), remote_source.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_source.node()].rma_data_win, &req.next_mpi_request()); + } + + template + buffer_ptr allocate_buffer(const size_t n, node_t source_node) + { + T* ptr; + + MPI_Alloc_mem(n * sizeof(T), MPI_INFO_NULL, &ptr); + // attach to own window + HAM_DEBUG( HAM_LOG << "communicator::allocate_buffer(), allocating buffer @: " << (long)ptr << std::endl; ) + MPI_Win_attach(peers[this_node_].rma_data_win, (void*)ptr, n * sizeof(T)); + + MPI_Aint mpi_address; + MPI_Get_address((void*)ptr, &mpi_address); + // NOTE: no ctor is called + return buffer_ptr(ptr, this_node_, mpi_address); + } + + // for host to allocate peer message buffers, needed because original function now manages dynamic window for data buffers + template + buffer_ptr allocate_peer_buffer(const size_t n, node_t source_node) + { + T* ptr; + // using MPI_Alloc instead of posix_memalign as these buffers are used for RMA accesses + MPI_Alloc_mem(n * sizeof(T), MPI_INFO_NULL, &ptr); + // NOTE: no ctor is called + return buffer_ptr(ptr, this_node_); + } + + // used for data buffers only + template + void free_buffer(buffer_ptr ptr) + { + assert(ptr.node() == this_node_); + // NOTE: no dtor is called + // remove from own rma window + HAM_DEBUG( HAM_LOG << "communicator::free_buffer(), freeing buffer @: " << (long)ptr.get() << " belonging to node: " << ptr.node() << std::endl; ) + MPI_Win_detach(peers[this_node_].rma_data_win, ptr.get()); + MPI_Free_mem(ptr.get()); + } + + // for host to free peer message buffers, needed because original function now manages rma window which must not happen for host-only local buffers + template + void free_peer_buffer(buffer_ptr ptr) + { + // this must never be called on the actual memory mapped to static mpi windows, freeing it would equal "disconnecting" the corresponding target + assert(ptr.node() == this_node_); + // NOTE: no dtor is called + MPI_Free_mem(ptr.get()); + } + + static communicator& instance() { return *instance_; } + static node_t this_node() { return instance().this_node_; } + static size_t num_nodes() { return instance().nodes_; } + bool is_host() { return this_node_ == 0; } // TODO(improvement): ham_address == ham_host_address ; } + bool is_host(node_t node) { return node == 0; } // TODO(improvement): node == ham_host_address; } + + static const node_descriptor& get_node_description(node_t node) + { + return instance().node_descriptions[node]; + } + +private: + static communicator* instance_; + node_t this_node_; + size_t nodes_; + node_t host_node_; + std::vector node_descriptions; // not as member in peer below, because Allgather is used to exchange node descriptions + + struct mpi_peer { + // needed by sender to manage which buffers are in use and which are free + // just manages indices, that can be used by + detail::resource_pool local_buffer_pool; + detail::resource_pool remote_buffer_pool; + + request next_request; + size_t next_flag = 0; + // NOTE: behind these buffers are MSG_BUFFERS many buffers of size MSG_SIZE+FLAG_SIZE, indices are managed by buffer_pool + + // static window for inbound rma messages and their flags + buffer_ptr msg_flag_data; + MPI_Win msg_flag_win; + + // mpi rma dynamic window for data + MPI_Win rma_data_win; + }; + + mpi_peer* peers; + +}; + +template +buffer_ptr::buffer_ptr() : buffer_ptr(nullptr, communicator::this_node()) { } + +template +T& buffer_ptr::operator[](size_t i) +{ + assert(node_ == communicator::this_node()); + return ptr_[i]; +} + +} // namespace net +} // namespace ham + +#endif // ham_net_communicator_mpi_rma_dynamic_hpp diff --git a/include/ham/net/communicator_mpi_rma_dynamic_data_only.hpp b/include/ham/net/communicator_mpi_rma_dynamic_data_only.hpp new file mode 100644 index 0000000..eb2c762 --- /dev/null +++ b/include/ham/net/communicator_mpi_rma_dynamic_data_only.hpp @@ -0,0 +1,394 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ham_net_communicator_mpi_rma_dynamic_data_only_hpp +#define ham_net_communicator_mpi_rma_dynamic_data_only_hpp + +#include + +#include +#include // memcpy +#include // posix_memalign + +#include "ham/misc/constants.hpp" +#include "ham/misc/resource_pool.hpp" +#include "ham/misc/types.hpp" +#include "ham/util/debug.hpp" +#include "ham/util/log.hpp" + +namespace ham { +namespace net { + +template +class buffer_ptr { +public: + buffer_ptr(); + buffer_ptr(T* ptr, node_t node) : ptr_(ptr), node_(node), mpi_address_(0) { } + buffer_ptr(T* ptr, node_t node, MPI_Aint mpi_address) : ptr_(ptr), node_(node), mpi_address_(mpi_address) { } + + + T* get() { return ptr_; } + node_t node() { return node_; } + MPI_Aint get_mpi_address() { return mpi_address_; } + + // element access + T& operator [] (size_t i); + + // basic pointer arithmetic to address sub-buffers + buffer_ptr operator+(size_t off) + { + return buffer_ptr(ptr_ + off, node_); + } + +private: + T* ptr_; + node_t node_; + MPI_Aint mpi_address_; +}; + +class node_descriptor +{ +public: + const char* name() const { return name_; } +private: + //std::string name_; // TODO(improvement): unify node description for all back-ends, NOTE: std::string is not trivally transferable + char name_[MPI_MAX_PROCESSOR_NAME + 1]; + + friend class net::communicator; +}; + +class communicator { +public: + // externally used interface of request must be shared across all communicator-implementations + class request { + public: + request() : valid_(false) {} // instantiate invalid + + request(node_t target_node, node_t source_node, size_t send_buffer_index, size_t recv_buffer_index) + : target_node(target_node), source_node(source_node), valid_(true), send_buffer_index(send_buffer_index), recv_buffer_index(recv_buffer_index), req_count(0), uses_rma_(false) + {} + + // return true if request was finished + // will not work as intended for rma ops, no equivalent to test() available for remote completion + bool test() + { + int flag = 0; + MPI_Testall(req_count, mpi_reqs, &flag, MPI_STATUS_IGNORE); // just test the receive request, since the send belonging to the request triggers the remote send that is received + + if(uses_rma_) + { + HAM_DEBUG( HAM_LOG << "request::test(), warning: may give false positive on rma remote completion" << std::endl; ) + } + return flag != 0; + } + + void* get() // blocks + { + HAM_DEBUG( HAM_LOG << "request::get(), before MPI_Waitall()" << std::endl; ) + MPI_Waitall(req_count, mpi_reqs, MPI_STATUS_IGNORE); // must wait for all requests to satisfy the standard + HAM_DEBUG( HAM_LOG << "request::get(), after MPI_Waitall()" << std::endl; ) + if(uses_rma_) + { + MPI_Win_flush(target_node, communicator::instance().peers[target_node].rma_win); + } + return static_cast(&communicator::instance().peers[target_node].msg_buffers[recv_buffer_index]); + } + + template + void send_result(T* result_msg, size_t size) + { + assert(communicator::this_node() == target_node); // this assert fails if send_result is called from the wrong side + + // TODO(improvement, low priority): better go through communicator, such that no MPI calls are anywhere else + MPI_Send(result_msg, size, MPI_BYTE, source_node, constants::RESULT_TAG, MPI_COMM_WORLD); + } + + bool valid() const + { + return valid_; + } + + bool uses_rma() const + { + return uses_rma_; + } + + MPI_Request& next_mpi_request() + { + HAM_DEBUG( HAM_LOG << "next_mpi_request(): this=" << this << ", req_count=" << req_count << ", NUM_REQUESTS=" << NUM_REQUESTS << std::endl; ) + assert(req_count < NUM_REQUESTS); + return mpi_reqs[req_count++]; // NOTE: post-increment + } + + node_t target_node; + node_t source_node; + bool valid_; + bool uses_rma_; + + // only needed by the sender + enum { NUM_REQUESTS = 3 }; + + size_t send_buffer_index; // buffer to use for sending the message + size_t recv_buffer_index; // buffer to use for receiving the result + size_t req_count; + + private: + MPI_Request mpi_reqs[NUM_REQUESTS]; // for sending the msg, receiving the result, and an associated data transfer + }; // class request + + typedef request& request_reference_type; + typedef const request& request_const_reference_type; + + communicator(int argc, char* argv[]) + { + HAM_DEBUG( std::cout << "communicator::communicator(): initialising MPI" << std::endl; ) + + instance_ = this; + int p; + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &p); + if (p != MPI_THREAD_MULTIPLE) + { + std::cerr << "Could not initialise MPI with MPI_THREAD_MULTIPLE, MPI_Init_thread() returned " << p << std::endl; + } + HAM_DEBUG( std::cout << "communicator::communicator(): initialising MPI ..." << std::endl; ) + + int t; + MPI_Comm_rank(MPI_COMM_WORLD, &t); + this_node_ = t; + MPI_Comm_size(MPI_COMM_WORLD, &t); + nodes_ = t; + host_node_ = 0; // TODO(improvement): make configureable, like for SCIF + + HAM_DEBUG( std::cout << "communicator::communicator(): initialising MPI done" << std::endl; ) + + peers = new mpi_peer[nodes_]; + + // start of node descriptor code: + node_descriptions.resize(nodes_); + + // build own node descriptor + node_descriptor node_description; + int count; + MPI_Get_processor_name(node_description.name_, &count); + node_description.name_[count] = 0x0; // null terminate + + // communicate descriptors between nodes + HAM_DEBUG( HAM_LOG << "communicator::communicator(): gathering node descriptions" << std::endl; ) + MPI_Allgather(&node_description, sizeof(node_descriptor), MPI_BYTE, node_descriptions.data(), sizeof(node_descriptor), MPI_BYTE, MPI_COMM_WORLD); + HAM_DEBUG( HAM_LOG << "communicator::communicator(): gathering node descriptions done" << std::endl; ) + + + if (is_host()) { + + for (node_t i = 1; i < nodes_; ++i) { // TODO(improvement): needs to be changed when host-rank becomes configurable + // allocate buffers + peers[i].msg_buffers = allocate_peer_buffer(constants::MSG_BUFFERS, this_node_); + // fill resource pools + for (size_t j = constants::MSG_BUFFERS; j > 0; --j) { + peers[i].buffer_pool.add(j - 1); + } + } + } + + // initialise 1 global window per target for data + for (node_t i = 1; i < nodes_; ++i) { + MPI_Win_create_dynamic(MPI_INFO_NULL, MPI_COMM_WORLD, &(peers[i].rma_win)); + } + + // get all locks to targets + // targets lock to other targets for copies + for (node_t i = 1; i < nodes_; ++i) { // TODO(improvement): needs to be changed when host-rank becomes configurable + if(i != this_node_) { + MPI_Win_lock(MPI_LOCK_SHARED, i, 0, peers[i].rma_win); // shared locks because all ranks lock on every target concurrently + } + } + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): rma window creation done" << std::endl; ) + + } + + ~communicator() + { + MPI_Finalize(); // TODO(improvement): check on error and create output if there was one + HAM_DEBUG( HAM_LOG << "~communicator" << std::endl; ) + } + + + request allocate_request(node_t remote_node) + { + HAM_DEBUG( HAM_LOG << "communicator::allocate_next_request(): remote_node = " << remote_node << std::endl; ) + + const size_t send_buffer_index = peers[remote_node].buffer_pool.allocate(); + const size_t recv_buffer_index = peers[remote_node].buffer_pool.allocate(); + + return { remote_node, this_node_, send_buffer_index, recv_buffer_index }; + } + + void free_request(request& req) + { + assert(req.valid()); + assert(req.source_node == this_node_); + + mpi_peer& peer = peers[req.target_node]; + + peer.buffer_pool.free(req.send_buffer_index); + peer.buffer_pool.free(req.recv_buffer_index); + req.valid_ = false; + } + +public: + void send_msg(request_reference_type req, void* msg, size_t size) + { + // copy message from caller into transfer buffer + void* msg_buffer = static_cast(&peers[req.target_node].msg_buffers[req.send_buffer_index]); + memcpy(msg_buffer, msg, size); + MPI_Isend(msg_buffer, size, MPI_BYTE, req.target_node, constants::DEFAULT_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + } + + // to be used by the offload target's main loop: synchronously receive one message at a time + // NOTE: the local static receive buffer! + void* recv_msg_host(void* msg = nullptr, size_t size = constants::MSG_SIZE) + { + static msg_buffer buffer; // NOTE ! + MPI_Recv(&buffer, size, MPI_BYTE, host_node_, constants::DEFAULT_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + return static_cast(&buffer); + } + + // trigger receiving the result of a message on the sending side + void recv_result(request_reference_type req) + { + // nothing todo here, since this communicator implementation uses one-sided communication + // the data is already where it is expected (in the buffer referenced in req) + MPI_Irecv(static_cast(&peers[req.target_node].msg_buffers[req.recv_buffer_index]), constants::MSG_SIZE, MPI_BYTE, req.target_node, constants::RESULT_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + return; + } + + // in MPI RMA backend only used by copy + // host uses async version + // targets don't send data to host as host uses rma get + template + void send_data(T* local_source, buffer_ptr remote_dest, size_t size) + { + // execute transfer + MPI_Put(local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), remote_dest.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_dest.node()].rma_win); + MPI_Win_flush(remote_dest.node(), peers[remote_dest.node()].rma_win); + } + + // to be used by the host only + template + void send_data_async(request_reference_type req, T* local_source, buffer_ptr remote_dest, size_t size) + { + req.uses_rma_ = true; + + MPI_Rput(local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), remote_dest.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_dest.node()].rma_win, &req.next_mpi_request()); + } + + // not used in MPI RMA backend + // host uses async version + // targets don't use get + // should be safe to remove + template + void recv_data(buffer_ptr remote_source, T* local_dest, size_t size) + { + MPI_Get(remote_source, size * sizeof(T), MPI_BYTE, remote_source.node(), remote_source.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_source.node()].rma_win); + MPI_Win_flush(remote_source.node(), peers[remote_source.node()].rma_win); + } + + // to be used by the host + template + void recv_data_async(request_reference_type req, buffer_ptr remote_source, T* local_dest, size_t size) + { + req.uses_rma_ = true; + MPI_Rget(local_dest, size * sizeof(T), MPI_BYTE, remote_source.node(), remote_source.get_mpi_address(), size * sizeof(T), MPI_BYTE, peers[remote_source.node()].rma_win, &req.next_mpi_request()); + } + + template + buffer_ptr allocate_buffer(const size_t n, node_t source_node) + { + T* ptr; + posix_memalign((void**)&ptr, constants::CACHE_LINE_SIZE, n * sizeof(T)); + // attach to own window + MPI_Win_attach(peers[this_node_].rma_win, (void*)ptr, n * sizeof(T)); + MPI_Aint mpi_address; + MPI_Get_address((void*)ptr, &mpi_address); + // NOTE: no ctor is called + return buffer_ptr(ptr, this_node_, mpi_address); + } + + // for host to allocate peer message buffers, needed because original function now manages rma window which must not happen for host-only local buffers + template + buffer_ptr allocate_peer_buffer(const size_t n, node_t source_node) + { + T* ptr; + posix_memalign((void**)&ptr, constants::CACHE_LINE_SIZE, n * sizeof(T)); + // NOTE: no ctor is called + return buffer_ptr(ptr, this_node_); + } + + template + void free_buffer(buffer_ptr ptr) + { + assert(ptr.node() == this_node_); + // NOTE: no dtor is called + // remove from own rma window + MPI_Win_detach(peers[this_node_].rma_win, ptr.get()); + free(static_cast(ptr.get())); + } + + // for host to free peer message buffers, needed because original function now manages rma window which must not happen for host-only local buffers + template + void free_peer_buffer(buffer_ptr ptr) + { + assert(ptr.node() == this_node_); + // NOTE: no dtor is called + free(static_cast(ptr.get())); + } + + static communicator& instance() { return *instance_; } + static node_t this_node() { return instance().this_node_; } + static size_t num_nodes() { return instance().nodes_; } + bool is_host() { return this_node_ == 0; } // TODO(improvement): ham_address == ham_host_address ; } + bool is_host(node_t node) { return node == 0; } // TODO(improvement): node == ham_host_address; } + + static const node_descriptor& get_node_description(node_t node) + { + return instance().node_descriptions[node]; + } + +private: + static communicator* instance_; + node_t this_node_; + size_t nodes_; + node_t host_node_; + std::vector node_descriptions; // not as member in peer below, because Allgather is used to exchange node descriptions + + struct mpi_peer { + buffer_ptr msg_buffers; // buffers used for MPI_ISend and IRecv by the sender + + // needed by sender to manage which buffers are in use and which are free + // just manages indices, that can be used by + detail::resource_pool buffer_pool; + + // mpi rma dynamic window for data transfers + MPI_Win rma_win; + }; + + mpi_peer* peers; +}; + +template +buffer_ptr::buffer_ptr() : buffer_ptr(nullptr, communicator::this_node()) { } + +template +T& buffer_ptr::operator[](size_t i) +{ + assert(node_ == communicator::this_node()); + return ptr_[i]; +} + +} // namespace net +} // namespace ham + +#endif // ham_net_communicator_mpi_rma_dynamic_data_only_hpp diff --git a/include/ham/net/communicator_tcp.hpp b/include/ham/net/communicator_tcp.hpp new file mode 100644 index 0000000..888dfb7 --- /dev/null +++ b/include/ham/net/communicator_tcp.hpp @@ -0,0 +1,562 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ham_net_communicator_tcp_hpp +#define ham_net_communicator_tcp_hpp + +#include +#include // memcpy +#include // posix_memalign +#include // async thread +// #include // std::shared_ptr + +#include +#include + +#include "ham/misc/options.hpp" +#include "ham/misc/constants.hpp" +#include "ham/misc/resource_pool.hpp" +#include "ham/misc/types.hpp" +#include "ham/util/debug.hpp" +#include "ham/util/log.hpp" + +using boost::asio::ip::tcp; + +namespace ham { +namespace net { + +template +class buffer_ptr { +public: + buffer_ptr(); + buffer_ptr(T* ptr, node_t node) : ptr_(ptr), node_(node) { } + + T* get() { return ptr_; } + node_t node() { return node_; } + + // element access + T& operator [] (size_t i); + + // basic pointer arithmetic to address sub-buffers + buffer_ptr operator+(size_t off) + { + return buffer_ptr(ptr_ + off, node_); + } + +private: + T* ptr_; + node_t node_; +}; + +class node_descriptor +{ +public: + const char* name() const { return name_; } +private: + //std::string name_; // TODO(improvement): unify node description for all back-ends, NOTE: std::string is not trivally transferable + char name_[64]= "Node descriptions not available for TCP backend"; + + friend class net::communicator; +}; + +class communicator { // : public std::enable_shared_from_this +public: + // externally used interface of request must be shared across all communicator-implementations + class request { + public: + request() : valid_(false), received_(false), sent_(false) {} // instantiate invalid + + request(node_t target_node, node_t source_node, size_t send_buffer_index, size_t recv_buffer_index) + : target_node(target_node), source_node(source_node), valid_(true), sent_(false), received_(false), send_buffer_index(send_buffer_index), recv_buffer_index(recv_buffer_index), req_count(0) + {} + + // return true if request was finished + bool test() + { + // tcp backend does not feature asynchronous operations yet + // HAM_DEBUG( HAM_LOG << "request::test(), TCP backend does not feature asynchronous operations" << std::endl; ) + + // int flag = 0; + // MPI_Testall(req_count, mpi_reqs, &flag, MPI_STATUS_IGNORE); // just test the receive request, since the send belonging to the request triggers the remote send that is received + return received_; + } + + void* get() // blocks + { + // tcp backend does not feature asynchronous operations yet + // HAM_DEBUG( HAM_LOG << "request::get(), TCP backend does not feature asynchronous operations" << std::endl; ) + // HAM_DEBUG( HAM_LOG << "request::get(), before MPI_Waitall()" << std::endl; ) + // MPI_Waitall(req_count, mpi_reqs, MPI_STATUS_IGNORE); // must wait for all requests to satisfy the standard + + // block until async receive handler reports completion + while(!received_); + + return static_cast(&communicator::instance().peers[target_node].msg_buffers[recv_buffer_index]); + } + + template + void send_result(T* result_msg, size_t size) + { + assert(communicator::this_node() == target_node); // this assert fails if send_result is called from the wrong side + + // TODO(improvement, low priority): better go through communicator, such that no MPI calls are anywhere else + // MPI_Send(result_msg, size, MPI_BYTE, source_node, constants::RESULT_TAG, MPI_COMM_WORLD); + + + + communicator::instance().send_result(source_node, result_msg, size); + // don't need size * sizeof(T) because req.send_result is called as send_result((void*)&a, sizeof(a)) in offload_msg.hpp + } + + bool valid() const + { + return valid_; + } + + bool received() const { + return received_; + } + + bool sent() const { + return sent_; + } + + void wait_sent() const { + while(!sent_) {}; + } + + node_t target_node; + node_t source_node; + bool valid_; + volatile bool received_; // used for the async receive handler to set to true, checked for completion + volatile bool sent_; // used for the async send handler to set to true... unused, but the handler likes to do something + + // only needed by the sender + enum { NUM_REQUESTS = 3 }; + + size_t send_buffer_index; // buffer to use for sending the message + size_t recv_buffer_index; // buffer to use for receiving the result + size_t req_count; + + private: + // not needed since tcp backend does not offer async operations + // MPI_Request mpi_reqs[NUM_REQUESTS]; // for sending the msg, receiving the result, and an associated data transfer + }; // class request + + typedef request& request_reference_type; + typedef const request& request_const_reference_type; + + communicator(int argc, char* argv[]) : node_desc_dummy() + { + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initialising configuration" << std::endl; ) + + instance_ = this; + + // command line configuration + nodes_ = 0; // number of nodes + this_node_ = 0; // "rank" of this node + this_port_ = 0; // tcp port used for this node + host_node_ = 0; // host node + host_address_ = "empty"; // host IP address or resolvable name + host_port_ = "empty"; // host port + + + // command line options + boost::program_options::options_description desc("HAM Options"); + desc.add_options() + ("ham-help", "Shows this message") + ("ham-process-count", boost::program_options::value(&nodes_)->required(), "Required: Number of processes the job consists of.") + ("ham-address", boost::program_options::value(&this_node_)->required(), "Required: This processes UNIQUE address, between 0 and ham-process-count-1. 0 will make the process the host (required EXACTLY once). -1 will assign any free non-host rank.") + ("ham-tcp-port", boost::program_options::value(&this_port_)->default_value(this_port_), "TCP port used if this process is a client. Default will auto select an available port. Host will use ham-tcp-hostport and ignore this.") + ("ham-tcp-hostname", boost::program_options::value(&host_address_)->required(), "Required: IP address or resolvable hostname of the host process. Required. May be used on host to select interface.") + ("ham-tcp-hostport", boost::program_options::value(&host_port_)->required(), "Required: TCP port used by the host.") + ; + + boost::program_options::variables_map vm; + + const char* options_env = std::getenv("HAM_OPTIONS"); + if (options_env) + { + char split_character = ' '; + if (std::getenv("HAM_OPTIONS_NO_SPACES")) // value does not matter + split_character = '_'; + + // parse from environment + boost::program_options::store(boost::program_options::command_line_parser(detail::options::split(std::string(options_env), split_character)).options(desc).allow_unregistered().run(), vm); + } + else + { + // parse from command line + boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(desc).allow_unregistered().run(), vm); + } + + boost::program_options::notify(vm); + + if(vm.count("ham-help")) + { + std::cout << desc << std::endl; + exit(0); + } + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): command line config:" << std::endl + << "ham-process-count: " << nodes_ << std::endl + << "ham-address: " << this_node_ << std::endl + << "ham-tcp-port: " << this_port_ << std::endl + << "ham-tcp-hostname: " << host_address_ << std::endl + << "ham-tcp-hostport: " << host_port_ << std:: endl; + ) + + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initialising configuration done" << std::endl; ) + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): connecting targets to host" << std::endl; ) + + + // init peers structure + peers = new tcp_peer[nodes_]; + + // targets init tcp connection to host + if(!is_host()) { + tcp::socket* sock = new tcp::socket(io_context); // socket is always stored with index = target node, so no "if_host" switching is necessary for functions executed on host and target + peers[host_node_].tcp_socket = sock; + tcp::resolver resolver(io_context); + //tcp::resolver::query query(tcp::v4(), host_address_, host_port_); + //tcp::resolver::iterator iter = resolver.resolve(query); + boost::asio::connect(*peers[host_node_].tcp_socket, resolver.resolve(host_address_, host_port_)); + + // send requested rank to host + HAM_DEBUG( HAM_LOG << "communicator::communicator(): requesting ham-address " << this_node_ << " from host" << std::endl; ) + boost::asio::write(*peers[host_node_].tcp_socket, boost::asio::buffer((void*)&this_node_, sizeof(this_node_))); + // recv rank from host + boost::asio::read(*peers[host_node_].tcp_socket, boost::asio::buffer((void*)&this_node_, sizeof(this_node_))); + HAM_DEBUG( HAM_LOG << "communicator::communicator(): received ham-address " << this_node_ << " from host" << std::endl; ) + } + + // host accepts tcp connection from targets + if(is_host()) { + tcp::resolver resolver(io_context); + tcp::resolver::query query(tcp::v4(), host_address_, host_port_); + tcp::resolver::iterator iter = resolver.resolve(query); + tcp::endpoint endpoint = iter->endpoint(); + tcp::acceptor acc(io_context, endpoint); + + node_t req_ranks[nodes_]; // store requested ranks in order of connection + tcp::socket* temp_socks[nodes_]; // store sockets temporarily in connection order + for (int l = 1; l < nodes_; ++l) { + temp_socks[l] = new tcp::socket(io_context); + } + + bool taken_ranks[nodes_]; + for (int x = 0; x < nodes_; ++x) { + taken_ranks[x]= false; + } + taken_ranks[0] = true; // host rank has to be correctly provided and is therefore already taken (by the executing process) + + for(int i=1; i < nodes_; i++) { + // temp_socks[i]->close(); + acc.accept(*temp_socks[i]); // accept connection + + // recv rank + boost::asio::read(*temp_socks[i], boost::asio::buffer((void *) &req_ranks[i], sizeof(node_t))); + } + + // rearrange sockets and inform targets of resulting rank + for (int j = 1; j < nodes_; ++j) { + if((req_ranks[j] > (nodes_-1))) { // check if rank invalid // TODO: fix -1 wildcard, currently not possible because req_ranks is unsigned node_t=size_t + std::cout << "communicator::communicator(): illegal ham-address requested: " << req_ranks[j] << std::endl; + exit(-1); + }else if(req_ranks[j] == -1) { // skip wildcard ranks, handled later to avoid conflicting ranks with following connects + HAM_DEBUG( HAM_LOG << "communicator::communicator(): connection " << j << " requested wildcard ham-address" << std::endl; ) + continue; + } + if(taken_ranks[req_ranks[j]]) { // check if rank already taken + std::cout << "communicator::communicator(): ham-address requested more than once:" << req_ranks[j] << std::endl; + exit(-1); + } else { + node_t rrank = req_ranks[j]; + HAM_DEBUG( HAM_LOG << "communicator::communicator(): connection " << j << " requested ham-address: " << rrank << std::endl; ) + peers[rrank].tcp_socket = temp_socks[j]; // = move https://www.boost.org/doc/libs/1_65_0/doc/html/boost_asio/reference/basic_stream_socket/operator_eq_.html + taken_ranks[rrank] = true; // mark the requested rank as taken + HAM_DEBUG( HAM_LOG << "communicator::communicator(): associated ham-address: " << rrank << " with connection " << j << std::endl; ) + // send assigned rank to target + boost::asio::write(*peers[rrank].tcp_socket, boost::asio::buffer((void*)&rrank, sizeof(rrank))); + } + } + + // handle wildcard ranks + for (int k = 1; k < nodes_; ++k) { // k is index to connections in connection order + if(req_ranks[k] == -1) { // find wildcard connections + + for (int i = 1; i < nodes_; ++i) { // i is index to ranks in final rank order + if(!taken_ranks[i]) { // find a free rank + HAM_DEBUG( HAM_LOG << "communicator::communicator(): associating wildcard connection: " << k << " with ham-address " << i << std::endl; ) + peers[i].tcp_socket = temp_socks[k]; + taken_ranks[i] = true; + boost::asio::write(*peers[i].tcp_socket, boost::asio::buffer((void*)&i, sizeof(i))); + break; // stop if free rank is assigned, go back to k-loop for next wildcard connection + } + } + } + } + } + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): connecting hosts done" << std::endl; ) + + // host init message buffers + if (is_host()) { + for (node_t i = 1; i < nodes_; ++i) { // TODO(improvement): needs to be changed when host-rank becomes configurable + // allocate buffers + peers[i].msg_buffers = allocate_buffer(constants::MSG_BUFFERS, this_node_); + // fill resource pools + for(size_t j = constants::MSG_BUFFERS; j > 0; --j) { + peers[i].buffer_pool.add(j-1); + } + } + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): initializing buffers done" << std::endl; ) + + // host runs io_context in separate thread (asynchronous progress thread) for async operations + thread_ = std::thread([this](){ + HAM_DEBUG( HAM_LOG << "ASYNC THREAD: Heyooo, I live." << std::endl; ) + // TODO(bug fix): need to figure out how to reset work from main thread so the background thread can return from run() before the host killst the io_context + boost::asio::io_service::work work(io_context); + io_context.run(); + HAM_DEBUG( HAM_LOG << "ASYNC THREAD: Oh noes, I'm dead!" << std::endl; ) + } + ); + // thread_.detach(); no longer needed with member thread + + HAM_DEBUG( HAM_LOG << "communicator::communicator(): async thread started" << std::endl; ) + } + + + + } + + ~communicator() + { + // TODO(bug fix): what we actually want: + // stop the work guard, so the thread will return from io_context.run() when all outstanding ops completed + // join the thread so the host waits until above is done + // stop the context + // currently: have to kill the context first because otherwise the thread wont complete to be joined + // but this causes thread to abandon any outstanding ops + io_context.stop(); + if(is_host()) { + thread_.join(); + } + HAM_DEBUG( HAM_LOG << "~communicator" << std::endl; ) + } + + + request allocate_request(node_t remote_node) + { + HAM_DEBUG( HAM_LOG << "communicator::allocate_next_request(): remote_node = " << remote_node << std::endl; ) + + const size_t send_buffer_index = peers[remote_node].buffer_pool.allocate(); + const size_t recv_buffer_index = peers[remote_node].buffer_pool.allocate(); + + return { remote_node, this_node_, send_buffer_index, recv_buffer_index }; + } + + void free_request(request& req) + { + assert(req.valid()); + assert(req.source_node == this_node_); + + tcp_peer& peer = peers[req.target_node]; + + peer.buffer_pool.free(req.send_buffer_index); + peer.buffer_pool.free(req.recv_buffer_index); + req.valid_ = false; + } + +public: + + // called by host only + void send_msg(request_reference_type req, void* msg, size_t size) + { + // copy message from caller into transfer buffer + void* msg_buffer = static_cast(&peers[req.target_node].msg_buffers[req.send_buffer_index]); + memcpy(msg_buffer, msg, size); + + // tcp write + // auto self(shared_from_this()); + HAM_DEBUG( HAM_LOG << "communicator::send_msg(): sending msg to: " << req.target_node << std::endl; ) + //always write full message size TODO(improvement): improve with delimiter and read_until @ target + boost::asio::async_write(*peers[req.target_node].tcp_socket, boost::asio::buffer(msg_buffer, constants::MSG_SIZE), + [this, &req](boost::system::error_code ec, size_t length) { + if (!ec) + { + req.sent_ = true; + HAM_DEBUG( HAM_LOG << "THREAD: Async completion handler executed, send_msg() to " << req.target_node << " completed. Wrote " << length << " Bytes." << std::endl; ) + } else { + HAM_DEBUG( HAM_LOG << "THREAD: Async completion handler executed, failed to send_msg() to " << req.target_node << " Error: " << ec.message() << std::endl; ) + } + } + ); + // MPI_Isend(msg_buffer, size, MPI_BYTE, req.target_node, constants::DEFAULT_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + } + + // to be used by the offload target's main loop: synchronously receive one message at a time + // NOTE: the local static receive buffer! + void* recv_msg_host(void* msg = nullptr, size_t size = constants::MSG_SIZE) + { + static msg_buffer buffer; // NOTE ! + // MPI_Recv(&buffer, size, MPI_BYTE, host_node_, constants::DEFAULT_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + HAM_DEBUG( HAM_LOG << "communicator::recv_msg_host(): node " << this_node_ << " awaiting AM from host" << std::endl; ) + boost::asio::read(*peers[host_node_].tcp_socket, boost::asio::buffer(&buffer, size)); // will always read full MSG_SIZE + return static_cast(&buffer); + } + + // target only -> sync + // send result through communicator + // only to be used by request.send_result() + template + void send_result(node_t target_node, T* message, size_t size) { + HAM_DEBUG( HAM_LOG << "communicator::send_result(): node " << this_node_ << " sending result to node: " << target_node << std::endl; ) + void* ptr; // ugly stuff to wrap result into MSG_SIZE buffer TODO(improvement): change to transfering only actual result size by using delimiter and read_until in recv_result() + posix_memalign((void**)&ptr, constants::CACHE_LINE_SIZE, constants::MSG_SIZE); + memcpy(ptr, message, size); + boost::asio::write(*peers[target_node].tcp_socket, boost::asio::buffer(ptr, constants::MSG_SIZE)); + } + + // host only -> async + // trigger receiving the result of an active message on the host + void recv_result(request_reference_type req) + { + // tcp receive + // auto self(shared_from_this()); + HAM_DEBUG( HAM_LOG << "communicator::recv_result(): receiving msg from: " << req.target_node << std::endl; ) + + boost::asio::async_read(*peers[req.target_node].tcp_socket, boost::asio::buffer(static_cast(&peers[req.target_node].msg_buffers[req.recv_buffer_index]), constants::MSG_SIZE), + [this, &req](boost::system::error_code ec, size_t length) { + if (!ec) + { + req.received_ = true; + HAM_DEBUG( HAM_LOG << "THREAD: Async completion handler executed, recv_result() completed " << req.target_node << std::endl; ) + } else { + HAM_DEBUG( HAM_LOG << "THREAD: Async completion handler executed, failed to recv_result() from " << req.target_node << " Error: " << ec.message() << std::endl; ) + } + } + ); + // MPI_Irecv(static_cast(&peers[req.target_node].msg_buffers[req.recv_buffer_index]), constants::MSG_SIZE, MPI_BYTE, req.target_node, constants::RESULT_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + return; + } + + // target only, host never uses sync variant + template + void send_data(T* local_source, buffer_ptr remote_dest, size_t size) + { + // tcp send + boost::asio::write(*peers[remote_dest.node()].tcp_socket, boost::asio::buffer((void*)local_source, size * sizeof(T))); + + // MPI_Send((void*)local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), constants::DATA_TAG, MPI_COMM_WORLD); + } + + // host only + template + void send_data_async(request_reference_type req, T* local_source, buffer_ptr remote_dest, size_t size) + { + // auto self(shared_from_this()); + boost::asio::async_write(*peers[remote_dest.node()].tcp_socket, boost::asio::buffer((void*)local_source, size*sizeof(T)), + [&req](boost::system::error_code ec, size_t length) { + req.sent_ = true; + } + ); + // MPI_Isend((void*)local_source, size * sizeof(T), MPI_BYTE, remote_dest.node(), constants::DATA_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + } + + // target only + template + void recv_data(buffer_ptr remote_source, T* local_dest, size_t size) + { + // tcp recv + boost::asio::read(*peers[remote_source.node()].tcp_socket, boost::asio::buffer((void*)local_dest, size * sizeof(T))); + // MPI_Recv((void*)local_dest, size * sizeof(T), MPI_BYTE, remote_source.node(), constants::DATA_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + } + + // to be used by the host + template + void recv_data_async(request_reference_type req, buffer_ptr remote_source, T* local_dest, size_t size) + { + // auto self(shared_from_this()); + boost::asio::async_read(*peers[remote_source.node()].tcp_socket, boost::asio::buffer(static_cast(local_dest), size*sizeof(T)), + [&req](boost::system::error_code ec, size_t length) { + req.received_ = true; + } + ); + // MPI_Irecv(static_cast(local_dest), size * sizeof(T), MPI_BYTE, remote_source.node(), constants::DATA_TAG, MPI_COMM_WORLD, &req.next_mpi_request()); + } + + template + buffer_ptr allocate_buffer(const size_t n, node_t source_node) + { + T* ptr; + //int err = + posix_memalign((void**)&ptr, constants::CACHE_LINE_SIZE, n * sizeof(T)); + // NOTE: no ctor is called + return buffer_ptr(ptr, this_node_); + } + + template + void free_buffer(buffer_ptr ptr) + { + assert(ptr.node() == this_node_); + // NOTE: no dtor is called + free(static_cast(ptr.get())); + } + + static communicator& instance() { return *instance_; } + static node_t this_node() { return instance().this_node_; } + static size_t num_nodes() { return instance().nodes_; } + bool is_host() { return this_node_ == 0; } // TODO(improvement): ham_address == ham_host_address ; } + bool is_host(node_t node) { return node == 0; } // TODO(improvement): node == ham_host_address; } + + static const node_descriptor& get_node_description(node_t node) + { + return instance().node_desc_dummy; + } + +private: + static communicator* instance_; + size_t nodes_; + node_t this_node_; + int this_port_; + node_t host_node_; + std::string host_address_; + std::string host_port_; + node_descriptor node_desc_dummy; + boost::asio::io_service io_context; + std::thread thread_; + + struct tcp_peer { + buffer_ptr msg_buffers; // buffers used for MPI_ISend and IRecv by the sender + + // needed by sender to manage which buffers are in use and which are free + // just manages indices, that can be used by + detail::resource_pool buffer_pool; + + // tcp socket + tcp::socket* tcp_socket; + }; + + tcp_peer* peers; +}; + +template +buffer_ptr::buffer_ptr() : buffer_ptr(nullptr, communicator::this_node()) { } + +template +T& buffer_ptr::operator[](size_t i) +{ + assert(node_ == communicator::this_node()); + return ptr_[i]; +} + +} // namespace net +} // namespace ham + +#endif // ham_net_communicator_tcp_hpp diff --git a/include/ham/offload/offload.hpp b/include/ham/offload/offload.hpp index a84d338..b96c988 100644 --- a/include/ham/offload/offload.hpp +++ b/include/ham/offload/offload.hpp @@ -197,6 +197,9 @@ void ping(node_t node, Functor&& func) HAM_DEBUG( HAM_LOG << "runtime::ping(): sending msg..." << std::endl; ) net::communicator::request req = comm.allocate_request(node); // TODO(improvement): resource deallocation of this request (currently only used for terminating) comm.send_msg(req, (void*)&msg, sizeof msg); +#if defined(HAM_COMM_TCP) + req.wait_sent(); // ugly workaround to prevent target from crashing because of connection teardown before the terminate functor is executed +#endif HAM_DEBUG( HAM_LOG << "runtime::ping(): sending msg done." << std::endl; ) } @@ -223,7 +226,7 @@ future put(T* local_source, buffer_ptr& remote_dest, size_t n) // TODO(improvement): create a data transfer thread for one-sided comm.send_data(local_source, remote_dest, n); // sync return future(true); // return dummy future -#else +#elif defined(HAM_COMM_MPI) || defined(HAM_COMM_TCP) // allocate a request and construct a future future result(comm.allocate_request(remote_dest.node())); // generate an offload message @@ -234,6 +237,11 @@ future put(T* local_source, buffer_ptr& remote_dest, size_t n) comm.recv_result(result.get_request()); // trigger receiving the msgs result // async return result; +#elif defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) + future result(comm.allocate_data_request(remote_dest.node())); + HAM_DEBUG( HAM_LOG << "offload::put(): initiating RMA put..." << std::endl; ) + comm.send_data_async(result.get_request(), local_source, remote_dest, n); + return result; #endif } @@ -256,7 +264,7 @@ future get(buffer_ptr remote_source, T* local_dest, size_t n) // TODO(improvement): create a data transfer thread for one-sided comm.recv_data(remote_source, local_dest, n); // sync return future(true); // return dummy future -#else +#elif defined(HAM_COMM_MPI) || defined(HAM_COMM_TCP) // allocate a request and construct a future future result(comm.allocate_request(remote_source.node())); // generate an offload message @@ -265,8 +273,13 @@ future get(buffer_ptr remote_source, T* local_dest, size_t n) comm.send_msg(result.get_request(), (void*)&msg, sizeof msg); comm.recv_data_async(result.get_request(), remote_source, local_dest, n); comm.recv_result(result.get_request()); // trigger receiving the result - + // TODO(improvement): the recv_result() is not needed, could remove and remove send_result() from offload_read_msg to reduce synchronization overhead return result; +#elif defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) + future result(comm.allocate_data_request(remote_source.node())); + HAM_DEBUG( HAM_LOG << "offload::put(): initiating RMA get..." << std::endl; ) + comm.recv_data_async(result.get_request(), remote_source, local_dest, n); + return result; #endif } @@ -299,17 +312,37 @@ void get_sync(buffer_ptr remote_source, T* local_dest, size_t n) //} -#ifndef HAM_COMM_ONE_SIDED // TODO(feature, high priority): implement -template +#if defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) + template +future copy(buffer_ptr source, buffer_ptr dest, size_t n) +{ + net::communicator& comm = runtime::instance().communicator(); + + // make sure there is no winlock on dest from host + // solution: shared lock, unlocking from host not necessary + + // issues a put on the source node targeting the destination node + future result(comm.allocate_request(source.node())); + HAM_DEBUG( HAM_LOG << "offload::copy_sync(): initiating copy between " << source.node() << " and " << dest.node() << std::endl; ) + auto copy_msg = detail::offload_rma_copy_msg(result.get_request(), dest.node(), dest.get_mpi_address(), source.get(), n); + comm.send_msg(result.get_request(), (void*)©_msg, sizeof copy_msg); + comm.recv_result(result.get_request()); + + return result; +} +#endif + +#if !defined(HAM_COMM_ONE_SIDED)// TODO(feature, high priority): implement + template void copy_sync(buffer_ptr source, buffer_ptr dest, size_t n) { net::communicator& comm = runtime::instance().communicator(); -#ifdef HAM_COMM_ONE_SIDED +#if defined(HAM_COMM_ONE_SIDED) // TODO(feature, high priority): implement // fix 1st arg: // comm.send_data(src_node, local_source, remote_dest, n); // static_assert(false, "copy is not implemented yet for the SCIF back-end"); -#else +#elif defined(HAM_COMM_MPI) // send corresponding write and read messages to the sender and the receiver // issues a send operation on the source node, that sends the memory at source to the destination node @@ -325,10 +358,21 @@ void copy_sync(buffer_ptr source, buffer_ptr dest, size_t n) comm.recv_result(write_result.get_request()); // trigger receiving the msg result // async // synchronise + // TODO(improvement): this is oversynchronized, waiting for the target to complete receiving should be sufficient read_result.get(); write_result.get(); +#elif defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) + // use async copy + sync + copy(source, dest, n).get(); +#elif defined(HAM_COMM_TCP) + T* ptr; + posix_memalign((void**)&ptr, constants::CACHE_LINE_SIZE, n * sizeof(T)); + get_sync(source, ptr, n); + put_sync(ptr, dest,n); #endif } + + #endif // TODO(feature): new API elements diff --git a/include/ham/offload/offload_msg.hpp b/include/ham/offload/offload_msg.hpp index c42ffb8..7e381b6 100644 --- a/include/ham/offload/offload_msg.hpp +++ b/include/ham/offload/offload_msg.hpp @@ -6,6 +6,11 @@ #ifndef ham_offload_offload_msg_hpp #define ham_offload_offload_msg_hpp +// for the copy msg we want to store the remote memory address as MPI_Aint +#if defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) +#include +#endif + #include "ham/msg/active_msg.hpp" #include "ham/msg/execution_policy.hpp" #include "ham/misc/constants.hpp" @@ -40,6 +45,7 @@ struct helper { }; // executes the functor, and send back its result +// used for all offloads, remote allocation template class ExecutionPolicy = default_execution_policy> class offload_result_msg : public active_msg, ExecutionPolicy> @@ -65,6 +71,7 @@ class offload_result_msg }; // just execute the functor +// fire & forget, not used by current HAM-Offload API template class ExecutionPolicy = default_execution_policy> class offload_msg : public active_msg, ExecutionPolicy> @@ -80,6 +87,8 @@ class offload_msg } }; +// data transfer message type, triggers RECEIVING data at the target +// not used by MPI_RMA_COMMUNICATOR since one-sided put is used template class ExecutionPolicy = default_execution_policy> class offload_write_msg : public active_msg, ExecutionPolicy> @@ -106,6 +115,8 @@ class offload_write_msg }; +// data transfer message type, triggers SENDING data at the target +// not used by MPI_RMA_COMMUNICATOR since one-sided put is used template class ExecutionPolicy = default_execution_policy> class offload_read_msg : public active_msg, ExecutionPolicy> @@ -116,9 +127,10 @@ class offload_read_msg void operator()() //const { - communicator::instance().send_data(local_source, buffer_ptr(nullptr, remote_node), n); // NOTE: Why nullptr? This is for two-sided communicators, so we do not know the remote address, but match a receive operation that has the address. + communicator::instance().send_data(local_source, buffer_ptr(nullptr, remote_node), n); // NOTE: Why nullptr? This is for two-sided communicators, so we do not know the remote address, but match a receive operation that has the address. // send a result message to tell the sender, that the transfer is done + // TODO(improvement, potential speedup): this may be removed along with receiving the result in offload get(). For host-target transfer completion of receive is sufficient, for copy the destination informs the host of completion if (req.valid()) { req.send_result((void*)&n, sizeof n); } @@ -131,6 +143,38 @@ class offload_read_msg size_t n; }; +#if defined(HAM_COMM_MPI_RMA_DYNAMIC) || defined(HAM_COMM_MPI_RMA_DYNAMIC_DATA_ONLY) + // data transfer message, triggers RMA data transfer to copy target + // used only with MPI_RMA communicator + // necessary because of the target buffer's address (remote_addr) + template class ExecutionPolicy = default_execution_policy> + class offload_rma_copy_msg + : public active_msg, ExecutionPolicy> + { + public: + offload_rma_copy_msg(communicator::request req, node_t remote_node, MPI_Aint remote_addr, T* local_source, size_t n) + : req(req), remote_node(remote_node), remote_addr(remote_addr), local_source(local_source), n(n) { } + + void operator()() //const + { + // MPI_RMA_COMMUNICATOR-only variant of send_data(), because of buffer address (remote_addr) + communicator::instance().send_data(local_source, buffer_ptr(nullptr, remote_node, remote_addr), n); + + // send a result message to tell the sender, that the transfer is done + if (req.valid()) { + req.send_result((void*)&n, sizeof n); + } + } + private: + communicator::request req; // TODO(improvement, high priority): use a subset of req here! + + node_t remote_node; + MPI_Aint remote_addr; // this is why we imported mpi.h + T* local_source; + size_t n; + }; +#endif + } // namespace detail } // namespace offload } // namespace ham diff --git a/include/ham/offload/stream.hpp b/include/ham/offload/stream.hpp new file mode 100644 index 0000000..8225f14 --- /dev/null +++ b/include/ham/offload/stream.hpp @@ -0,0 +1,171 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// something for "requires ham_offload_hpp" + +#ifndef ham_offload_stream_hpp +#define ham_offload_stream_hpp + +#include "ham/net/communicator.hpp" + +#include +#include + +#include "ham/misc/types.hpp" +#include "ham/functor/buffer.hpp" +#include "ham/offload/offload_msg.hpp" +#include "ham/offload/offload.hpp" +#include "ham/offload/runtime.hpp" +#include "ham/util/at_end_of_scope_do.hpp" +#include "ham/util/debug.hpp" +#include "ham/util/log.hpp" + + +namespace ham { +namespace offload { +namespace stream { + +using ::ham::net::buffer_ptr; +using ::ham::node_t; +using ::ham::byte_t; + +class ostream; + +class stream_base { +public: + stream_base(node_t target) : target_(target) {} + + stream_base(node_t target, buffer_ptr buffer, size_t size) : target_(target), buffer_(buffer), + size_(size) {} + // put common stuff of ostream/istream here + + buffer_ptr buffer() { return buffer_; } + + void buffer(buffer_ptr buffer) { buffer_ = buffer; } + + size_t size() { return size_; } + + void size(size_t size) { size_ = size; } + + node_t target() { return target_; } // no setting intended +protected: + node_t target_; + buffer_ptr buffer_; // remote sink, remote memory + size_t size_; // size of remote sink +}; + +class stream_proxy { + + friend class istream; + +public: + stream_proxy() = default; // default contstuctor needed for return transport dummy entries + stream_proxy(stream_base *stream) : target_(stream->target()), buffer_(stream->buffer()), + size_(stream->size()) { + HAM_DEBUG( HAM_LOG << "stream_proxy::ctor() called" << std::endl; ) + } + +private: + node_t target_; + buffer_ptr buffer_; + size_t size_; +}; + +class ostream : public stream_base, public std::ostringstream { + +public: + // always need the node associated with this stream + ostream(node_t target) : stream_base(target), std::ostringstream() { + HAM_DEBUG( HAM_LOG << "ostream::ctor() called" << std::endl; ) + } + + ostream(node_t target, size_t size) : stream_base(target), std::ostringstream(), fixed_(true) { + posix_memalign((void **) &fixed_ptr_, constants::CACHE_LINE_SIZE, size); + rdbuf()->pubsetbuf(fixed_ptr_, size); + HAM_DEBUG( HAM_LOG << "ostream::ctor() for provided buffer size called" << std::endl; ) + // NOTE: this does NOT set the streams buffer or size. It will only associate a buffer that should be large enough to not need resizing (user's responsibility) + // if it should not be large enough, it may still be resized/reallocated + } + + ~ostream() { + if (fixed_) std::free((void *) fixed_ptr_); + HAM_DEBUG( HAM_LOG << "ostream::dtor()" << std::endl; ) + } + + const stream_proxy sync() { + std::string temp = rdbuf()->str(); // COPY ... no other option, direct pointers not accessible + if (ham::offload::is_host()) { // on host + HAM_DEBUG( HAM_LOG << "host executing ostream::sync()" << std::endl; ) + size_ = temp.size(); + buffer_ = offload::allocate(target_, size_); + HAM_DEBUG( HAM_LOG << "ostream::sync() allocated buffer @" << target_ << " size: " << size_ << std::endl; ) + offload::put_sync((byte_t *) temp.c_str(), buffer_, size_); + HAM_DEBUG( HAM_LOG << "ostream::sync() sent data to " << target_ << " size: " << size_ << std::endl; ) + return stream_proxy(this); + } else { // on target + HAM_DEBUG( HAM_LOG << "target executing ostream::sync()" << std::endl; ) + ham::net::communicator &comm = ham::offload::runtime::instance().communicator(); + size_ = temp.size(); + buffer_ = comm.allocate_buffer(size_, ham::offload::this_node()); + HAM_DEBUG( HAM_LOG << "ostream::sync() allocated local buffer size: " << size_ << std::endl; ) + memcpy((char *) buffer_.get(), temp.c_str(), size_); // COPY ... no other option, depending on backend we need the mem to be allocated by new_buffer + return stream_proxy(this); + } + } + + // we reduce the dynamic here + /* + - use like a local in-memory stream, i.e. stringstream, maybe inherit stringstream, or output version + - ss.str().data() and size() + - on explicit synchronisation request from user + - allocate remote memory, set internal butter_ptr with known size + - put() data onto target + */ +private: + bool fixed_ = false; + byte_t *fixed_ptr_ = nullptr; +}; + + +class istream : public stream_base, public std::istringstream { +public: + istream(const stream_proxy proxy) : stream_base(proxy.target_, proxy.buffer_, proxy.size_), + std::istringstream() { + HAM_DEBUG( HAM_LOG << "istream::ctor() called with stream_proxy from: " << target_ << std::endl; ) + if (ham::offload::is_host()) { + posix_memalign((void **) &local_ptr_, constants::CACHE_LINE_SIZE, size_); + offload::get_sync(buffer_, local_ptr_, size_); + HAM_DEBUG( HAM_LOG << "istream::ctor() host retrieved data from " << buffer_.node() << " size: " << size_ << std::endl; ) + this->rdbuf()->pubsetbuf(local_ptr_, size_); + } else { + rdbuf()->pubsetbuf(buffer_.get(), size_); // avoid a copy that would be necessary when using str(string) to set the content + HAM_DEBUG( HAM_LOG << "istream::ctor() target set streambuffer to remote buffer" << target_ << " size: " << size_ << std::endl; ) + } + } + // fail on underflow, set flags/state whatever, check std::istream interface + + // maybe use stringstream and reconstruct from data_ + + ~istream() { + if (ham::offload::is_host()) { + offload::free(buffer_); + HAM_DEBUG( HAM_LOG << "istream::dtor() freed memory @" << target_ << std::endl; ) + std::free((void *) local_ptr_); + } else { + ham::net::communicator &comm = ham::offload::runtime::instance().communicator(); + comm.free_buffer(buffer_); // this is where we trash "used" buffers on the targets + HAM_DEBUG( HAM_LOG << "istream::dtor() freed local memory" << std::endl; ) + } + } + +private: + byte_t *local_ptr_ = nullptr; +}; + + +} // namespace stream +} +} // namespace ham +#endif // ham_offload_stream_hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..98baf8f --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,126 @@ +# Copyright (c) 2018 Marcel Ehrhardt +# Copyright (c) 2018 Matthias Noack +# +# See accompanying file LICENSE and README for further information. + +project(ham_exe LANGUAGES CXX) +cmake_minimum_required(VERSION 3.2 FATAL_ERROR) # TODO verfify + +add_subdirectory(ham) + +### Benchmarks + +## Explicit targets (not built by default) + +# TCP benchmarks +add_executable(benchmark_ham_offload_tcp benchmark_ham_offload.cpp) +target_link_libraries(benchmark_ham_offload_tcp ham_offload_tcp) + +# Intel LEO offload directive benchmark, requires Intel compiler +if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + add_executable(benchmark_intel_leo EXCLUDE_FROM_ALL benchmark_intel_leo.cpp) + target_link_libraries(benchmark_intel_leo ham_interface) +endif () + +if (MPI_FOUND) + add_executable (benchmark_ham_offload_mpi benchmark_ham_offload.cpp) + target_link_libraries (benchmark_ham_offload_mpi ham_offload_mpi) + + add_executable (benchmark_ham_offload_mpi_rma_dynamic benchmark_ham_offload.cpp) + target_link_libraries (benchmark_ham_offload_mpi_rma_dynamic ham_offload_mpi_rma_dynamic) + + add_executable (benchmark_ham_offload_mpi_rma_dynamic_data_only benchmark_ham_offload.cpp) + target_link_libraries (benchmark_ham_offload_mpi_rma_dynamic_data_only ham_offload_mpi_rma_dynamic_data_only) +endif() + +if (SCIF_FOUND) + add_executable (benchmark_ham_offload_scif benchmark_ham_offload.cpp) + target_link_libraries (benchmark_ham_offload_scif ham_offload_scif) +endif() + +### Examples/Tests + +# some tests for the active msg layer +add_executable(active_msgs active_msgs.cpp) +target_link_libraries(active_msgs ham_interface) + +# TCP tests +add_executable(ham_offload_test_tcp ham_offload.cpp) +target_link_libraries(ham_offload_test_tcp ham_offload_tcp) + +add_executable(inner_product_tcp inner_product.cpp) +target_link_libraries(inner_product_tcp ham_offload_tcp) + +add_executable(test_data_transfer_tcp test_data_transfer.cpp) +target_link_libraries(test_data_transfer_tcp ham_offload_tcp) + +add_executable(test_argument_transfer_tcp test_argument_transfer.cpp) +target_link_libraries(test_argument_transfer_tcp ham_offload_tcp) + +if (MPI_FOUND) +# two-sided MPI + add_executable(ham_offload_test_mpi ham_offload.cpp) + target_link_libraries(ham_offload_test_mpi ham_offload_mpi) + + add_executable(ham_offload_test_explicit_mpi ham_offload_explicit.cpp) + target_link_libraries(ham_offload_test_explicit_mpi ham_offload_mpi_explicit) + + add_executable(inner_product_mpi inner_product.cpp) + target_link_libraries(inner_product_mpi ham_offload_mpi) + + add_executable(test_data_transfer_mpi test_data_transfer.cpp) + target_link_libraries(test_data_transfer_mpi ham_offload_mpi) + + add_executable(test_argument_transfer_mpi test_argument_transfer.cpp) + target_link_libraries(test_argument_transfer_mpi ham_offload_mpi) + +# Streaming Test MPI + add_executable(test_streams_mpi test_streams.cpp) + target_link_libraries(test_streams_mpi ham_offload_mpi) + +# RMA DYNAMIC MPI (full) + + add_executable(ham_offload_test_mpi_rma_dynamic ham_offload.cpp) + target_link_libraries(ham_offload_test_mpi_rma_dynamic ham_offload_mpi_rma_dynamic) + + add_executable(inner_product_mpi_rma_dynamic inner_product.cpp) + target_link_libraries(inner_product_mpi_rma_dynamic ham_offload_mpi_rma_dynamic) + + add_executable(test_data_transfer_mpi_rma_dynamic test_data_transfer.cpp) + target_link_libraries(test_data_transfer_mpi_rma_dynamic ham_offload_mpi_rma_dynamic) + + add_executable(test_argument_transfer_mpi_rma_dynamic test_argument_transfer.cpp) + target_link_libraries(test_argument_transfer_mpi_rma_dynamic ham_offload_mpi_rma_dynamic) + +# RMA DYNAMIC MPI (data only) + + add_executable(ham_offload_test_mpi_rma_dynamic_data_only ham_offload.cpp) + target_link_libraries(ham_offload_test_mpi_rma_dynamic_data_only ham_offload_mpi_rma_dynamic_data_only) + + add_executable(inner_product_mpi_rma_dynamic_data_only inner_product.cpp) + target_link_libraries(inner_product_mpi_rma_dynamic_data_only ham_offload_mpi_rma_dynamic_data_only) + + add_executable(test_data_transfer_mpi_rma_dynamic_data_only test_data_transfer.cpp) + target_link_libraries(test_data_transfer_mpi_rma_dynamic_data_only ham_offload_mpi_rma_dynamic_data_only) + + add_executable(test_argument_transfer_mpi_rma_dynamic_data_only test_argument_transfer.cpp) + target_link_libraries(test_argument_transfer_mpi_rma_dynamic_data_only ham_offload_mpi_rma_dynamic_data_only) + +endif() + +if (SCIF_FOUND) + add_executable(ham_offload_test_scif ham_offload.cpp) + target_link_libraries(ham_offload_test_scif ham_offload_scif) + + add_executable(ham_offload_test_explicit_scif ham_offload_explicit.cpp) + target_link_libraries(ham_offload_test_explicit_scif ham_offload_scif_explicit) + + add_executable(inner_product_scif inner_product.cpp) + target_link_libraries(inner_product_scif ham_offload_scif) + + add_executable(test_data_transfer_scif test_data_transfer.cpp) + target_link_libraries(test_data_transfer_scif ham_offload_scif) + + add_executable(test_argument_transfer_scif test_argument_transfer.cpp) + target_link_libraries(test_argument_transfer_scif ham_offload_scif) +endif() diff --git a/src/active_msgs_over_file.cpp b/src/active_msgs_over_file.cpp new file mode 100644 index 0000000..9b3cc4e --- /dev/null +++ b/src/active_msgs_over_file.cpp @@ -0,0 +1,195 @@ +// modified by Daniel Deppisch (deppisch@zib.de) from: +// active_msgs.cpp +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include + +#include "ham/msg/active_msg_base.hpp" +#include "ham/msg/execution_policy.hpp" +#include "ham/msg/active_msg.hpp" +#include "ham/misc/migratable.hpp" + +using namespace std; + + +namespace ham { + + template<> + class migratable { + public: + migratable(const migratable &) = default; + + migratable(migratable &&) = default; + + migratable &operator=(const migratable &) = default; + + migratable &operator=(migratable &&) = default; + + // forward compatible arg into T's ctor + template + migratable(Compatible &&arg) { + std::cout << "migratable-ctor: " << arg << std::endl; + std::strcpy(value, arg.c_str()); + } + + operator std::string() const { + std::cout << "migratable-conversion: " << value << std::endl; + return value; + } + + private: + char value[256]; + }; +} // namespace ham + +// a simple message type for testing + +class MsgA : public ham::msg::active_msg { +public: + void operator()() { + cout << "MsgA::operator() successfully called." << endl; + // the message could perform some task here + // and possible send back a result afterwards, e.g. by + // - using data transferred as member inside the message + // - calling some communication layer + // - ... + } + + // the message could include members that are safe to transfer between the communicating entities +}; + +class MsgB : public ham::msg::active_msg { +public: + MsgB(const char* t_in, std::string text2) + : text2(text2) + { + std::strcpy(text, t_in); + } + + void operator()() { + cout << "MsgB::operator() successfully called." << endl; + cout << "Text: " << text << endl; + cout << "Text2: " << static_cast(text2) << endl; + // the message could perform some task here + // and possible send back a result afterwards, e.g. by + // - using data transferred as member inside the message + // - calling some communication layer + // - ... + } + // the message could include members that are safe to transfer between the communicating entities +private: + char text[256]; + ham::migratable text2; +}; + +// a simple test which simulates a communication channel via filesystem +// of course, this does NOT test the communication backend +// this may be used to write and read a message from filesystem to simulate communication between different binaries without a supported backend + +// write message to file and shut down +template +bool write_active_msg(Msg& func, std::string const & filename) +{ + size_t msgSize = sizeof(func); + + + std::ofstream b_stream(filename.c_str(), std::fstream::out | std::fstream::binary); + + if (b_stream) { + b_stream.write(reinterpret_cast(&func), msgSize); + return (b_stream.good()); + } + + return false; +} + +// read message from file and execute +bool read_active_msg(std::string const & filename) +{ + std::ifstream b_stream(filename.c_str(), std::fstream::in | std::fstream::binary); + b_stream.seekg(0, ios::end); + int bufferSize = b_stream.tellg(); + char* buffer = new char[bufferSize]; + b_stream.seekg(0, ios::beg); + + if (!b_stream.read(buffer, bufferSize)) { + cout << "ERROR: reading file " << filename << " failed" << endl; + return false; + } + + // simulate reading from the channel, thereby we cast the buffer back to the known base class of all active messages + auto functor = *reinterpret_cast(buffer); + + // This is where the magick happens. + // Calling the buffer as an active_msg_base functor with the receive buffer + // as argument triggers a handler look-up, followed by the execution of + // that handler (which is defined by the execution policy of the actual + // message type). The handler can perform a safe upcast of the buffer to + // the actual type of the message and directly execute it as functor, + // enqeue it somewhere for further processing, or whatever a policy + // specifies. + functor(buffer); + + delete [] buffer; + + return true; +} + + +int main (int argc, char * argv[]) { + + // initialise active message handler address conversion data + ham::msg::msg_handler_registry::init(); + + // print message registry data + ham::msg::msg_handler_registry::print_handler_map(std::cout); // generated at static-init-time + ham::msg::msg_handler_registry::print_handler_vector(std::cout); // generated by the init-call above + + + + // filename to be used + std::string filename; + std::string text; + + // command line handling + boost::program_options::options_description desc("Options"); + desc.add_options() + ("file,f", boost::program_options::value(&filename), "specify file name (default: \"msgfile\"") + ("write,w", "make this process write a message to file") + ("read,r", "make this process read a message from file") + ("help,h", "print this help information") + ("text,t", boost::program_options::value(&text), "add some text to display when executing message"); + + boost::program_options::variables_map vm; + boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(desc).allow_unregistered().run(), vm); + boost::program_options::notify(vm); + + if (!vm.count("file")) { + filename = "msgfile"; + } + + // simple message type + MsgA fA; + // extended message type + MsgB fB(text.c_str(), "asdfasdasd"); + + if(vm.count("write")) { + if(vm.count("text")) { + write_active_msg(fB, filename); + } else { + write_active_msg(fA, filename); + } + } else if (vm.count("read")) { + read_active_msg(filename); + } else { + cout << "ERROR: did not specify whether process should write or read." << endl; + } + + return 0; +} + diff --git a/src/benchmark_ham_offload.cpp b/src/benchmark_ham_offload.cpp index 90a0f64..dabe62d 100644 --- a/src/benchmark_ham_offload.cpp +++ b/src/benchmark_ham_offload.cpp @@ -10,6 +10,7 @@ #include #include #include // posix_memalign +//#include #include "ham/util/time.hpp" @@ -124,6 +125,7 @@ int main(int argc, char * argv[]) ("allocate,a", boost::program_options::value()->zero_tokens(), "benchmark memory allocation/deallocation on target") ("copy-in,i", boost::program_options::value()->zero_tokens(), "benchmark data copy to target") ("copy-out,o", boost::program_options::value()->zero_tokens(), "benchmark data copy from target") + ("copy-direct,d", boost::program_options::value()->zero_tokens(), "benchmark data copy from target to another target") ("call,c", boost::program_options::value()->zero_tokens(), "benchmark function call on target") ("call-mul,m", boost::program_options::value()->zero_tokens(), "benchmark function call (multiplication) on target") ("async,y", boost::program_options::value()->zero_tokens(), "perform benchmark function calls asynchronously") @@ -157,8 +159,17 @@ int main(int argc, char * argv[]) std::cout << "# COMM_MPI enabled" << std::endl; #else std::cout << "# COMM_MPI disabled" << std::endl; + #endif + #ifdef HAM_COMM_MPI_RMA_DYNAMIC + std::cout << "# COMM_MPI_RMA_DYNAMIC enabled" << std::endl; + #else + std::cout << "# COMM_MPI_RMA_DYNAMIC disabled" << std::endl; #endif - + #ifdef HAM_COMM_TCP + std::cout << "# COMM_TCP enabled" << std::endl; + #else + std::cout << "# COMM_TCP disabled" << std::endl; +#endif #ifdef HAM_COMM_SCIF std::cout << "# HAM_COMM_SCIF enabled" << std::endl; #ifdef HAM_SCIF_RMA_CPU @@ -258,6 +269,29 @@ int main(int argc, char * argv[]) copy_out_time.to_file(filename + "copy_out_time"); } + if (vm.count("copy-direct")) + { + // first allocate memory + offload::buffer_ptr remote_source = offload::allocate(1, data_size); + offload::buffer_ptr remote_target = offload::allocate(2, data_size); + statistics copy_direct_time(runs, warmup_runs); + + for (size_t i = 0; i < (runs + warmup_runs); ++i) + { + timer clock; + offload_copy_direct(remote_source, remote_target, data_size); + copy_direct_time.add(clock); + } + // free memory + offload_free(remote_source); + offload_free(remote_target); + + cout << "HAM-Offload copy-direct time: " << endl + << header_string_data << endl + << "copy-direct:\t" << copy_direct_time.string() << "\t" << data_size << endl; + copy_direct_time.to_file(filename + "copy_direct_time"); + } + if (vm.count("call")) { statistics call_time(runs, warmup_runs); diff --git a/src/benchmark_streams.cpp b/src/benchmark_streams.cpp new file mode 100644 index 0000000..049c4b8 --- /dev/null +++ b/src/benchmark_streams.cpp @@ -0,0 +1,168 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/offload.hpp" +#include "ham/offload/stream.hpp" + +#include + +#include "cereal/archives/binary.hpp" + +#include "ham/util/time.hpp" + +#include +#include + +using namespace std; +using namespace ham::util::time; +using namespace ham; + +// this is set in main. locally for host, through offload for target +// it is ugly, but is used to remove the allocation of the user-buffer from the benchmarked time, +// because we want to measure the overhead of the streaming abstraction, not how long it takes to instantiate user data +class cheese { +public: + static char* d1; + static size_t cheese_size; +}; +char* cheese::d1 = nullptr; +size_t cheese::cheese_size = 0; + +void set_cheese(size_t size) { + posix_memalign((void**)&cheese::d1, constants::CACHE_LINE_SIZE, size); + cheese::cheese_size = size; +} + +ham::offload::stream::stream_proxy offloaded_fun(ham::offload::stream::stream_proxy osp) +{ + ham::offload::stream::istream his(osp); + + { + cereal::BinaryInputArchive iarchive(his); + + iarchive(cereal::binary_data(cheese::d1, sizeof(char)*cheese::cheese_size)); + } + + //if(cheese::d1[1337] == 'a') cheese::d1[1337] = 'b'; + ham::offload::stream::ostream hos(0, cheese::cheese_size); + { + cereal::BinaryOutputArchive oarchive(hos); + oarchive(cereal::binary_data(cheese::d1, sizeof(char)*cheese::cheese_size)); + } + auto out_proxy = hos.sync(); + return out_proxy; +} + +int main(int argc, char* argv[]) +{ + // option defaults + unsigned int warmup_runs = 1; + unsigned int runs = 1000; + size_t data_size = 1024*1024; + + // command line options + boost::program_options::options_description desc("Supported options"); + desc.add_options() + ("help,h", "Shows this message") + ("runs,r", boost::program_options::value(&runs)->default_value(runs), "number of identical inner runs for which the average time will be computed") + ("warmup-runs", boost::program_options::value(&warmup_runs)->default_value(warmup_runs), "number of number of additional warmup runs before times are measured") + ("size,s", boost::program_options::value(&data_size)->default_value(data_size), "size of transferred data in byte (multiple of 4)") + ; + + boost::program_options::variables_map vm; + + boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(desc).allow_unregistered().run(), vm); + boost::program_options::notify(vm); + + ham::offload::node_t target = 1; + + // used to avoid benchmarking memory allocation for the target object on the target side + set_cheese(data_size); + ham::offload::ping(target, f2f(&set_cheese, data_size)); + + statistics comp_time(runs, warmup_runs); + statistics put_time(runs, warmup_runs); + statistics call_time(runs, warmup_runs); + statistics get_time(runs, warmup_runs); + statistics os_time(runs, warmup_runs); + statistics is_time(runs, warmup_runs); + + for (int i = 0; i < (runs + warmup_runs) ; ++i) { + //cheese::d1[1337] = 'a'; + timer comp; + ham::offload::stream::ostream hos(target, cheese::cheese_size); + timer ost; + { + cereal::BinaryOutputArchive oarchive(hos); + oarchive(cereal::binary_data(cheese::d1, sizeof(char)*data_size)); //sizeof(char)*data_size) + } + os_time.add(ost); + timer put; + auto out_proxy = hos.sync(); + put_time.add(put); + timer call; + auto in_proxy = ham::offload::sync(target, f2f(&offloaded_fun, out_proxy)); + call_time.add(call); + timer get; + ham::offload::stream::istream his(in_proxy); + get_time.add(get); + timer ist; + { + cereal::BinaryInputArchive iarchive(his); + iarchive(cereal::binary_data(cheese::d1, sizeof(char)*data_size)); + } + is_time.add(ist); + comp_time.add(comp); + //assert(cheese::d1[1337] == 'b'); + } + + std::string header_string = "name\t" + statistics::header_string() + "\tdata_size"; + + cout << endl <<"HAM-Offload stream overall: " << endl + << header_string << endl + << "stream:\t" << comp_time.string() << "\t" << data_size << endl << endl; + cout << "HAM-Offload streams ostream: " << endl + << header_string << endl + << "stream:\t" << os_time.string() << "\t" << data_size << endl << endl; + cout << "HAM-Offload streams copy-in: " << endl + << header_string << endl + << "stream:\t" << put_time.string() << "\t" << data_size << endl << endl; + cout << "HAM-Offload streamed call: " << endl + << header_string << endl + << "stream:\t" << call_time.string() << "\t" << data_size << endl << endl; + cout << "HAM-Offload streamed copy-out: " << endl + << header_string << endl + << "stream:\t" << get_time.string() << "\t" << data_size << endl << endl; + cout << "HAM-Offload streamed istream: " << endl + << header_string << endl + << "stream:\t" << is_time.string() << "\t" << data_size << endl << endl; + + + statistics str_time(1, 0); + + ham::offload::stream::ostream hos(target, cheese::cheese_size); + { + cereal::BinaryOutputArchive oarchive(hos); + oarchive(cereal::binary_data(cheese::d1, sizeof(char)*data_size)); //sizeof(char)*data_size) + } + timer str_tim; + + string tmp = hos.rdbuf()->str(); + + str_time.add(str_tim); + statistics cpy_time(1, 0); + statistics cstr_time(1, 0); + timer cpy_tim; + memcpy((void *) cheese::d1, tmp.c_str(), cheese::cheese_size); + cpy_time.add(cpy_tim); + timer cstr_tim; + const char* asdf = tmp.c_str(); + cstr_time.add(cstr_tim); + cout << str_time.string() << endl; + cout << cpy_time.string() << endl; + cout << cstr_time.string() << endl; + return 0; +} + diff --git a/src/ham/CMakeLists.txt b/src/ham/CMakeLists.txt new file mode 100644 index 0000000..4a24c8b --- /dev/null +++ b/src/ham/CMakeLists.txt @@ -0,0 +1,95 @@ +# Copyright (c) 2018 Marcel Ehrhardt +# Copyright (c) 2018 Matthias Noack +# +# See accompanying file LICENSE and README for further information. + +project(ham_lib LANGUAGES CXX) +cmake_minimum_required(VERSION 3.2 FATAL_ERROR) # TODO verfify + +# interface target for ham +add_library(ham_interface INTERFACE) +target_compile_features(ham_interface INTERFACE ) +target_link_libraries(ham_interface INTERFACE noma_bmt boost_library) +target_include_directories(ham_interface INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../../include) + +set(HAM_LIB_SRC + net/communicator.cpp + net/communicator_mpi.cpp + net/communicator_mpi_rma_dynamic.cpp + offload/runtime.cpp + offload/offload.cpp + offload/stream.cpp + util/cpu_affinity.cpp) + +# TCP +add_library(ham_offload_tcp # SHARED if BUILD_SHARED_LIBS = TRUE + net/communicator.cpp + net/communicator_tcp.cpp + offload/runtime.cpp + offload/offload.cpp + offload/stream.cpp + offload/main.cpp + util/cpu_affinity.cpp) +target_compile_definitions(ham_offload_tcp PUBLIC -DHAM_COMM_TCP=1) +target_link_libraries(ham_offload_tcp PUBLIC ham_interface boost_library pthread) + +set_target_properties(ham_offload_tcp PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + +if (MPI_FOUND) + add_library(ham_offload_mpi # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main.cpp + net/communicator_mpi.cpp) + target_compile_definitions(ham_offload_mpi PUBLIC -DHAM_COMM_MPI=1) + target_link_libraries(ham_offload_mpi PUBLIC ham_interface mpi_library) + + add_library(ham_offload_mpi_explicit # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main_explicit.cpp + net/communicator_mpi.cpp) + target_compile_definitions(ham_offload_mpi_explicit PUBLIC -DHAM_COMM_MPI=1 -DHAM_EXPLICIT=1) + target_link_libraries(ham_offload_mpi_explicit PUBLIC ham_interface mpi_library) + + add_library(ham_offload_mpi_rma_dynamic # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main.cpp + net/communicator_mpi_rma_dynamic.cpp) + target_compile_definitions(ham_offload_mpi_rma_dynamic PUBLIC -DHAM_COMM_MPI_RMA_DYNAMIC=1) + target_link_libraries(ham_offload_mpi_rma_dynamic PUBLIC ham_interface mpi_library) + + add_library(ham_offload_mpi_rma_dynamic_data_only # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main.cpp + net/communicator_mpi_rma_dynamic_data_only.cpp) + target_compile_definitions(ham_offload_mpi_rma_dynamic_data_only PUBLIC -DHAM_COMM_MPI_RMA_DYNAMIC=1) + target_link_libraries(ham_offload_mpi_rma_dynamic_data_only PUBLIC ham_interface mpi_library) + + set_target_properties(ham_offload_mpi ham_offload_mpi_explicit ham_offload_mpi_rma_dynamic ham_offload_mpi_rma_dynamic_data_only PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) +endif () + +if (SCIF_FOUND) + add_library(ham_offload_scif # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main.cpp + net/communicator_scif.cpp) + target_compile_definitions(ham_offload_scif PUBLIC -DHAM_COMM_SCIF=1) + target_link_libraries(ham_offload_scif_explicit PUBLIC ham_interface scif_library) + + add_library(ham_offload_scif_explicit # SHARED if BUILD_SHARED_LIBS = TRUE + ${HAM_LIB_SRC} + offload/main_explicit.cpp + net/communicator_scif.cpp) + target_compile_definitions(ham_offload_scif_explicit PUBLIC -DHAM_COMM_SCIF=1 -DHAM_EXPLICIT=1) + target_link_libraries(ham_offload_scif_explicit PUBLIC ham_interface scif_library) + + set_target_properties(ham_offload_scif ham_offload_scif_explicit PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) +endif () diff --git a/src/ham/net/communicator_mpi_rma_dynamic.cpp b/src/ham/net/communicator_mpi_rma_dynamic.cpp new file mode 100644 index 0000000..e4e5dbd --- /dev/null +++ b/src/ham/net/communicator_mpi_rma_dynamic.cpp @@ -0,0 +1,9 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/net/communicator.hpp" + +ham::net::communicator* ham::net::communicator::instance_ = nullptr; + diff --git a/src/ham/net/communicator_mpi_rma_dynamic_data_only.cpp b/src/ham/net/communicator_mpi_rma_dynamic_data_only.cpp new file mode 100644 index 0000000..e4e5dbd --- /dev/null +++ b/src/ham/net/communicator_mpi_rma_dynamic_data_only.cpp @@ -0,0 +1,9 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/net/communicator.hpp" + +ham::net::communicator* ham::net::communicator::instance_ = nullptr; + diff --git a/src/ham/net/communicator_tcp.cpp b/src/ham/net/communicator_tcp.cpp new file mode 100644 index 0000000..e4e5dbd --- /dev/null +++ b/src/ham/net/communicator_tcp.cpp @@ -0,0 +1,9 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/net/communicator.hpp" + +ham::net::communicator* ham::net::communicator::instance_ = nullptr; + diff --git a/src/ham/offload/stream.cpp b/src/ham/offload/stream.cpp new file mode 100644 index 0000000..f33c7cf --- /dev/null +++ b/src/ham/offload/stream.cpp @@ -0,0 +1,6 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/offload/stream.hpp" diff --git a/src/inner_product.cpp b/src/inner_product.cpp index 3dc1c60..7ad0f18 100644 --- a/src/inner_product.cpp +++ b/src/inner_product.cpp @@ -17,6 +17,15 @@ double inner_product(offload::buffer_ptr x, offload::buffer_ptr return z; } +bool print_buffer_content(offload::buffer_ptr x, size_t n) +{ + std::cout << "printing data on node " << x.node() << std::endl; + for (size_t i = 0; i < n; ++i) + std::cout << x[i] << " "; + std::cout << std::endl; + return true; +} + int main(int argc, char* argv[]) { // buffer size @@ -40,20 +49,25 @@ int main(int argc, char* argv[]) // allocate device memory (returns a buffer_ptr) auto a_target = offload::allocate(target, n); + std::cout << "allocated remote buffer 1" << std::endl; auto b_target = offload::allocate(target, n); - + std::cout << "allocated remote buffer 2" << std::endl; + + // transfer data to the device (the target is implicitly specified by the destination buffer_ptr) auto future_a_put = offload::put(a.data(), a_target, n); // async - offload::put(b.data(), b_target, n); // sync (implicitly returned future performs synchronisation in dtor), alternative: put_sync() - - // synchronise - future_a_put.get(); - + future_a_put.get(); + offload::put(b.data(), b_target, n); // sync (implicitly returned future performs synchronisation in dtor), alternative: put_sync() + + // synchronise + + std::cout << "completed put" << std::endl; + // asynchronously offload the call to inner_product auto c_future = offload::async(target, f2f(&inner_product, a_target, b_target, n)); // synchronise on the result - double c = c_future.get(); + double c = c_future.get(); // we also could have used: // double c = offload::async(...).get(); @@ -63,7 +77,9 @@ int main(int argc, char* argv[]) // output the result std::cout << "Result: " << c << std::endl; - + + + return 0; } diff --git a/src/test_argument_transfer.cpp b/src/test_argument_transfer.cpp index 97a693e..7712459 100644 --- a/src/test_argument_transfer.cpp +++ b/src/test_argument_transfer.cpp @@ -23,7 +23,7 @@ bool test_type_invokation(offload::node_t target, T arg) { T result = offload::sync(target, f2f(&type_transfer_function, arg)); bool passed = result == arg; - std::cout << "Result for type \"" << typeid(T).name() << "\": " << (passed ? "pass" : "fail") << std::endl; + std::cout << "Result for type \"" << typeid(T).name() << "\": " << arg << (passed ? " -> pass" : " -> fail") << std::endl; return passed; } diff --git a/src/test_data_transfer.cpp b/src/test_data_transfer.cpp index d53eb3e..cb8c60d 100644 --- a/src/test_data_transfer.cpp +++ b/src/test_data_transfer.cpp @@ -27,6 +27,15 @@ bool compare(const std::vector& a, const std::vector& b) return std::equal(a.begin(), a.end(), b.begin()); } +double print_buffer_content(offload::buffer_ptr x, size_t n) +{ + std::cout << "printing data on node " << x.node() << std::endl; + for (size_t i = 0; i < n; ++i) + std::cout << x[i] << " "; + std::cout << std::endl; + return 50.0; +} + int main(int argc, char* argv[]) { std::cout << "Testing data transfer: host -> target_a -> target_b -> host." << std::endl; @@ -48,12 +57,40 @@ int main(int argc, char* argv[]) // allocate device memory (returns a buffer_ptr) auto target_buffer_a = offload::allocate(target_a, n); auto target_buffer_b = offload::allocate(target_b, n); + + offload::sync(target_a, f2f(&print_buffer_content, target_buffer_a, n)); + + std::cout << "a - get: " << target_buffer_a.get() << std::endl; + std::cout << "a - node: " << target_buffer_a.node() << std::endl; + +#ifdef HAM_COMM_MPI_RMA_DYNAMIC + std::cout << "a - mpi: " << target_buffer_a.get_mpi_address() << std::endl; +#endif + + std::cout << "b - get: " << target_buffer_b.get() << std::endl; + std::cout << "b - node: " << target_buffer_b.node() << std::endl; + +#ifdef HAM_COMM_MPI_RMA_DYNAMIC + std::cout << "b - mpi: " << target_buffer_b.get_mpi_address() << std::endl; +#endif // host -> target_a -> target_b -> host - offload::put(write_buffer.data(), target_buffer_a, n); - offload::copy_sync(target_buffer_a, target_buffer_b, n); + std::cout << "put to target_a: "; + auto put_future = offload::put(write_buffer.data(), target_buffer_a, n); + put_future.get(); + std::cout << "done" << std::endl; + + + offload::sync(target_a, f2f(&print_buffer_content, target_buffer_a, n)); + + std::cout << "copy from target_a to target_b: "; + offload::copy_sync(target_buffer_a, target_buffer_b, n); + std::cout << "done" << std::endl; + offload::async(target_b, f2f(&print_buffer_content, target_buffer_b, n)); + + std::cout << "get from target_b: "; offload::get(target_buffer_b, read_buffer.data(), n); - + std::cout << "done" << std::endl; // verify bool passed = compare(write_buffer, read_buffer); diff --git a/src/test_streams.cpp b/src/test_streams.cpp new file mode 100644 index 0000000..248e52a --- /dev/null +++ b/src/test_streams.cpp @@ -0,0 +1,125 @@ +// Copyright (c) 2013-2014 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "ham/offload.hpp" +#include "ham/offload/stream.hpp" + +#include "cereal/archives/binary.hpp" + +#include +#include + +struct MyData { + + char one[1024]; + char two[1024]; + + template + void serialize(Archive & archive) + { + archive( cereal::binary_data( one, sizeof(char)*1024), cereal::binary_data( two, sizeof(char)*1024)); + } +}; + +// alternative: nicer, with proxy +// target +ham::offload::stream::stream_proxy offloaded_fun(ham::offload::stream::stream_proxy osp) +{ + ham::offload::stream::istream his(osp); // NOTE: data is already on the target + + MyData m1, m2, m3; + { + cereal::BinaryInputArchive iarchive(his); // Create an input archive + + iarchive(m1, m2, m3); // Read the data from the archive + } + + printf("tin: 1.1 %.10s\n", m1.one); + printf("tin: 1.2 %.10s\n", m1.two); + printf("tin: 2.1 %.10s\n", m2.one); + printf("tin: 2.2 %.10s\n", m2.two); + printf("tin: 3.1 %.10s\n", m3.one); + printf("tin: 3.2 %.10s\n", m3.two); + + char* bla = "0123456789"; + strcpy(m1.one, bla); + strcpy(m1.two, bla); + char* blub = "ABCDEFGHI"; + strcpy(m2.one, blub); + strcpy(m2.two, blub); + strcpy(m3.one, bla); + strcpy(m3.two, blub); + + printf("tout: 1.1 %.10s\n", m1.one); + printf("tout: 1.2 %.10s\n", m1.two); + printf("tout: 2.1 %.10s\n", m2.one); + printf("tout: 2.2 %.10s\n", m2.two); + printf("tout: 3.1 %.10s\n", m3.one); + printf("tout: 3.2 %.10s\n", m3.two); + + ham::offload::stream::ostream hos(0); + + + { + cereal::BinaryOutputArchive oarchive(hos); + oarchive(m1, m2, m3); + } + + auto out_proxy = hos.sync(); + + return out_proxy; +} + +int main(int argc, char* argv[]) +{ + ham::offload::node_t target = 1; + + ham::offload::stream::ostream hos(target); + + + MyData m1, m2, m3; // could be out of scope, data to be transferred + + char* bla = "9876543210"; + strcpy(m1.one, bla); + strcpy(m1.two, bla); + char* blub = "IHGFEDCBA"; + strcpy(m2.one, blub); + strcpy(m2.two, blub); + strcpy(m3.one, bla); + strcpy(m3.two, blub); + + printf("hout: 1.1 %.10s\n", m1.one); + printf("hout: 1.2 %.10s\n", m1.two); + printf("hout: 2.1 %.10s\n", m2.one); + printf("hout: 2.2 %.10s\n", m2.two); + printf("hout: 3.1 %.10s\n", m3.one); + printf("hout: 3.2 %.10s\n", m3.two); + + { + cereal::BinaryOutputArchive oarchive(hos); // Create an output archive + oarchive(m1, m2, m3); // Write the data to the archive + } // archive goes out of scope, ensuring all contents are flushed + // after this scope, data from oarchive is flushed into the stream, stream can be used + + auto out_proxy = hos.sync(); // trigger transfer to target (write has other meaning with streams) + + auto in_proxy = ham::offload::sync(target, f2f(&offloaded_fun, out_proxy)); + + ham::offload::stream::istream his(in_proxy); + + + { + cereal::BinaryInputArchive iarchive(his); + iarchive(m1, m2, m3); + } + printf("hin: 1.1 %.10s\n", m1.one); + printf("hin: 1.2 %.10s\n", m1.two); + printf("hin: 2.1 %.10s\n", m2.one); + printf("hin: 2.2 %.10s\n", m2.two); + printf("hin: 3.1 %.10s\n", m3.one); + printf("hin: 3.2 %.10s\n", m3.two); + return 0; +} + diff --git a/thirdparty/bmt/AUTHORS.md b/thirdparty/bmt/AUTHORS.md new file mode 100644 index 0000000..96e8fa0 --- /dev/null +++ b/thirdparty/bmt/AUTHORS.md @@ -0,0 +1,4 @@ +# Original Author + +Matthias Noack + diff --git a/thirdparty/bmt/CMakeLists.txt b/thirdparty/bmt/CMakeLists.txt new file mode 100644 index 0000000..464c511 --- /dev/null +++ b/thirdparty/bmt/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2017 Matthias Noack +# +# See accompanying file LICENSE and README for further information. + +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) + +project(libnoma_bmt LANGUAGES CXX) + + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# header only library +add_library(noma_bmt INTERFACE) +# NOTE: we want to use '#include "noma/bmt/bmt.hpp"', not '#include "bmt.hpp"' +target_include_directories(noma_bmt INTERFACE include) +target_compile_features(noma_bmt INTERFACE ) + +#set_target_properties(noma_bmt PROPERTIES +# CXX_STANDARD 11 +# CXX_STANDARD_REQUIRED YES +# CXX_EXTENSIONS NO +#) + +add_subdirectory(src) diff --git a/thirdparty/bmt/LICENSE_1_0.txt b/thirdparty/bmt/LICENSE_1_0.txt new file mode 100644 index 0000000..36b7cd9 --- /dev/null +++ b/thirdparty/bmt/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +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, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN 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/thirdparty/bmt/README.md b/thirdparty/bmt/README.md new file mode 100644 index 0000000..1c53432 --- /dev/null +++ b/thirdparty/bmt/README.md @@ -0,0 +1,21 @@ +# Benchmark Timer Library + +A simple C++11 header-only library that provides a `timer` and a `statistics` class for benchmarking. + +See `src/example.cpp` for usage. + +## Building and Running the example + +Building: + +```bash +mkdir build +cd build +cmake -DNOMA_BMT_BUILD_EXAMPLES=TRUE .. +make +``` + +```bash +./example +``` + diff --git a/thirdparty/bmt/build/CMakeCache.txt b/thirdparty/bmt/build/CMakeCache.txt new file mode 100644 index 0000000..9b797af --- /dev/null +++ b/thirdparty/bmt/build/CMakeCache.txt @@ -0,0 +1,278 @@ +# This is the CMakeCache file. +# For build in directory: /home/bemdeppi/ham/thirdparty/bmt/build +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=libnoma_bmt + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//No help, variable specified on the command line. +NOMA_BMT_BUILD_EXAMPLES:UNINITIALIZED=TRUE + +//Value Computed by CMake +libnoma_bmt_BINARY_DIR:STATIC=/home/bemdeppi/ham/thirdparty/bmt/build + +//Value Computed by CMake +libnoma_bmt_SOURCE_DIR:STATIC=/home/bemdeppi/ham/thirdparty/bmt + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/bemdeppi/ham/thirdparty/bmt/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/bemdeppi/ham/thirdparty/bmt +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeCXXCompiler.cmake b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..eadb4d9 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeCXXCompiler.cmake @@ -0,0 +1,68 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "4.8.5") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib64/gcc/x86_64-suse-linux/4.8;/usr/lib64;/lib64;/usr/x86_64-suse-linux/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeDetermineCompilerABI_CXX.bin b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..246feb2 Binary files /dev/null and b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeSystem.cmake b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeSystem.cmake new file mode 100644 index 0000000..e822e95 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/3.5.2/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-4.4.73-5.1_4.0.141-cray_ari_s") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "4.4.73-5.1_4.0.141-cray_ari_s") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-4.4.73-5.1_4.0.141-cray_ari_s") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "4.4.73-5.1_4.0.141-cray_ari_s") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/CMakeCXXCompilerId.cpp b/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..e6d8536 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,533 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID "" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if __cplusplus >= 201402L + "14" +#elif __cplusplus >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/a.out b/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/a.out new file mode 100755 index 0000000..2ae39ad Binary files /dev/null and b/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/a.out differ diff --git a/thirdparty/bmt/build/CMakeFiles/CMakeDirectoryInformation.cmake b/thirdparty/bmt/build/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..c883c69 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/bemdeppi/ham/thirdparty/bmt") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/bemdeppi/ham/thirdparty/bmt/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/thirdparty/bmt/build/CMakeFiles/CMakeOutput.log b/thirdparty/bmt/build/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..1f2cb96 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/CMakeOutput.log @@ -0,0 +1,339 @@ +The system is: Linux - 4.4.73-5.1_4.0.141-cray_ari_s - x86_64 +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/3.5.2/CompilerIdCXX/a.out" + +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/gmake" "cmTC_671be/fast" +/usr/bin/gmake -f CMakeFiles/cmTC_671be.dir/build.make CMakeFiles/cmTC_671be.dir/build +gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_671be.dir/testCXXCompiler.cxx.o +/usr/bin/c++ -o CMakeFiles/cmTC_671be.dir/testCXXCompiler.cxx.o -c /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTC_671be +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_671be.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_671be.dir/testCXXCompiler.cxx.o -o cmTC_671be -rdynamic +gmake[1]: Leaving directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/gmake" "cmTC_d6736/fast" +/usr/bin/gmake -f CMakeFiles/cmTC_d6736.dir/build.make CMakeFiles/cmTC_d6736.dir/build +gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -o CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp +Linking CXX executable cmTC_d6736 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d6736.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_d6736 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper +Target: x86_64-suse-linux +Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux +Thread model: posix +gcc version 4.8.5 (SUSE Linux) +COMPILER_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ +LIBRARY_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d6736' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib64/gcc/x86_64-suse-linux/4.8/collect2 --build-id --eh-frame-hdr -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_d6736 /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbegin.o -L/usr/lib64/gcc/x86_64-suse-linux/4.8 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../.. CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/4.8/crtend.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crtn.o +gmake[1]: Leaving directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/gmake" "cmTC_d6736/fast"] + ignore line: [/usr/bin/gmake -f CMakeFiles/cmTC_d6736.dir/build.make CMakeFiles/cmTC_d6736.dir/build] + ignore line: [gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Linking CXX executable cmTC_d6736] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d6736.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_d6736 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper] + ignore line: [Target: x86_64-suse-linux] + ignore line: [Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux] + ignore line: [Thread model: posix] + ignore line: [gcc version 4.8.5 (SUSE Linux) ] + ignore line: [COMPILER_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/] + ignore line: [LIBRARY_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.8/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib/:/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d6736' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib64/gcc/x86_64-suse-linux/4.8/collect2 --build-id --eh-frame-hdr -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_d6736 /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbegin.o -L/usr/lib64/gcc/x86_64-suse-linux/4.8 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../.. CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/4.8/crtend.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crtn.o] + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/collect2] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-o] ==> ignore + arg [cmTC_d6736] ==> ignore + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o] ==> ignore + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crti.o] ==> ignore + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/crtbegin.o] ==> ignore + arg [-L/usr/lib64/gcc/x86_64-suse-linux/4.8] ==> dir [/usr/lib64/gcc/x86_64-suse-linux/4.8] + arg [-L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64] ==> dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64] + arg [-L/lib/../lib64] ==> dir [/lib/../lib64] + arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64] + arg [-L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib] ==> dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib] + arg [-L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../..] ==> dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../..] + arg [CMakeFiles/cmTC_d6736.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/crtend.o] ==> ignore + arg [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse library dir [/usr/lib64/gcc/x86_64-suse-linux/4.8] ==> [/usr/lib64/gcc/x86_64-suse-linux/4.8] + collapse library dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64] ==> [/usr/lib64] + collapse library dir [/lib/../lib64] ==> [/lib64] + collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64] + collapse library dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib] ==> [/usr/x86_64-suse-linux/lib] + collapse library dir [/usr/lib64/gcc/x86_64-suse-linux/4.8/../../..] ==> [/usr/lib64] + implicit libs: [stdc++;m;c] + implicit dirs: [/usr/lib64/gcc/x86_64-suse-linux/4.8;/usr/lib64;/lib64;/usr/x86_64-suse-linux/lib] + implicit fwks: [] + + + + +Detecting CXX [-std=c++1y] compiler features compiled with the following output: +Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/gmake" "cmTC_a580f/fast" +/usr/bin/gmake -f CMakeFiles/cmTC_a580f.dir/build.make CMakeFiles/cmTC_a580f.dir/build +gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_a580f.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++1y -o CMakeFiles/cmTC_a580f.dir/feature_tests.cxx.o -c /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_a580f +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a580f.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_a580f.dir/feature_tests.cxx.o -o cmTC_a580f -rdynamic +gmake[1]: Leaving directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++11] compiler features compiled with the following output: +Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/gmake" "cmTC_83717/fast" +/usr/bin/gmake -f CMakeFiles/cmTC_83717.dir/build.make CMakeFiles/cmTC_83717.dir/build +gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_83717.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++11 -o CMakeFiles/cmTC_83717.dir/feature_tests.cxx.o -c /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_83717 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_83717.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_83717.dir/feature_tests.cxx.o -o cmTC_83717 -rdynamic +gmake[1]: Leaving directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++98] compiler features compiled with the following output: +Change Dir: /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/gmake" "cmTC_1dbbe/fast" +/usr/bin/gmake -f CMakeFiles/cmTC_1dbbe.dir/build.make CMakeFiles/cmTC_1dbbe.dir/build +gmake[1]: Entering directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_1dbbe.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_1dbbe.dir/feature_tests.cxx.o -c /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_1dbbe +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1dbbe.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_1dbbe.dir/feature_tests.cxx.o -o cmTC_1dbbe -rdynamic +gmake[1]: Leaving directory '/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:0cxx_alias_templates + Feature record: CXX_FEATURE:0cxx_alignas + Feature record: CXX_FEATURE:0cxx_alignof + Feature record: CXX_FEATURE:0cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:0cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:0cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:0cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:0cxx_default_function_template_args + Feature record: CXX_FEATURE:0cxx_defaulted_functions + Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:0cxx_delegating_constructors + Feature record: CXX_FEATURE:0cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:0cxx_enum_forward_declarations + Feature record: CXX_FEATURE:0cxx_explicit_conversions + Feature record: CXX_FEATURE:0cxx_extended_friend_declarations + Feature record: CXX_FEATURE:0cxx_extern_templates + Feature record: CXX_FEATURE:0cxx_final + Feature record: CXX_FEATURE:0cxx_func_identifier + Feature record: CXX_FEATURE:0cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:0cxx_inheriting_constructors + Feature record: CXX_FEATURE:0cxx_inline_namespaces + Feature record: CXX_FEATURE:0cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:0cxx_local_type_template_args + Feature record: CXX_FEATURE:0cxx_long_long_type + Feature record: CXX_FEATURE:0cxx_noexcept + Feature record: CXX_FEATURE:0cxx_nonstatic_member_init + Feature record: CXX_FEATURE:0cxx_nullptr + Feature record: CXX_FEATURE:0cxx_override + Feature record: CXX_FEATURE:0cxx_range_for + Feature record: CXX_FEATURE:0cxx_raw_string_literals + Feature record: CXX_FEATURE:0cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:0cxx_right_angle_brackets + Feature record: CXX_FEATURE:0cxx_rvalue_references + Feature record: CXX_FEATURE:0cxx_sizeof_member + Feature record: CXX_FEATURE:0cxx_static_assert + Feature record: CXX_FEATURE:0cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:0cxx_thread_local + Feature record: CXX_FEATURE:0cxx_trailing_return_types + Feature record: CXX_FEATURE:0cxx_unicode_literals + Feature record: CXX_FEATURE:0cxx_uniform_initialization + Feature record: CXX_FEATURE:0cxx_unrestricted_unions + Feature record: CXX_FEATURE:0cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:0cxx_variadic_macros + Feature record: CXX_FEATURE:0cxx_variadic_templates diff --git a/thirdparty/bmt/build/CMakeFiles/Makefile.cmake b/thirdparty/bmt/build/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..dc1d5a8 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/Makefile.cmake @@ -0,0 +1,95 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "../CMakeLists.txt" + "CMakeFiles/3.5.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.5.2/CMakeSystem.cmake" + "CMakeFiles/feature_tests.cxx" + "../src/CMakeLists.txt" + "/usr/share/cmake/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/GNU-CXX-FeatureTests.cmake" + "/usr/share/cmake/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake/Modules/Compiler/GNU-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/GNU.cmake" + "/usr/share/cmake/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/usr/share/cmake/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/usr/share/cmake/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake/Modules/Platform/Linux-CXX.cmake" + "/usr/share/cmake/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake/Modules/Platform/Linux.cmake" + "/usr/share/cmake/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.5.2/CMakeSystem.cmake" + "CMakeFiles/3.5.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.5.2/CMakeCXXCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + "src/CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "src/CMakeFiles/example.dir/DependInfo.cmake" + ) diff --git a/thirdparty/bmt/build/CMakeFiles/Makefile2 b/thirdparty/bmt/build/CMakeFiles/Makefile2 new file mode 100644 index 0000000..5fb0193 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/Makefile2 @@ -0,0 +1,126 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/bemdeppi/ham/thirdparty/bmt + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/bemdeppi/ham/thirdparty/bmt/build + +#============================================================================= +# Directory level rules for directory src + +# Convenience name for "all" pass in the directory. +src/all: src/CMakeFiles/example.dir/all + +.PHONY : src/all + +# Convenience name for "clean" pass in the directory. +src/clean: src/CMakeFiles/example.dir/clean + +.PHONY : src/clean + +# Convenience name for "preinstall" pass in the directory. +src/preinstall: + +.PHONY : src/preinstall + +#============================================================================= +# Target rules for target src/CMakeFiles/example.dir + +# All Build rule for target. +src/CMakeFiles/example.dir/all: + $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/depend + $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles --progress-num=1,2 "Built target example" +.PHONY : src/CMakeFiles/example.dir/all + +# Include target in all. +all: src/CMakeFiles/example.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +src/CMakeFiles/example.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/example.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles 0 +.PHONY : src/CMakeFiles/example.dir/rule + +# Convenience name for target. +example: src/CMakeFiles/example.dir/rule + +.PHONY : example + +# clean rule for target. +src/CMakeFiles/example.dir/clean: + $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/clean +.PHONY : src/CMakeFiles/example.dir/clean + +# clean rule for target. +clean: src/CMakeFiles/example.dir/clean + +.PHONY : clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/thirdparty/bmt/build/CMakeFiles/TargetDirectories.txt b/thirdparty/bmt/build/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..ba137ee --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,5 @@ +/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/edit_cache.dir +/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/rebuild_cache.dir +/home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/edit_cache.dir +/home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/rebuild_cache.dir +/home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/example.dir diff --git a/thirdparty/bmt/build/CMakeFiles/cmake.check_cache b/thirdparty/bmt/build/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/thirdparty/bmt/build/CMakeFiles/feature_tests.bin b/thirdparty/bmt/build/CMakeFiles/feature_tests.bin new file mode 100755 index 0000000..a939005 Binary files /dev/null and b/thirdparty/bmt/build/CMakeFiles/feature_tests.bin differ diff --git a/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx b/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx new file mode 100644 index 0000000..b93418c --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/feature_tests.cxx @@ -0,0 +1,405 @@ + + const char features[] = {"\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_aggregate_default_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alias_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignof\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_attributes\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_attribute_deprecated\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_auto_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_binary_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_contextual_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_decltype\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_decltype_auto\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_decltype_incomplete_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_default_function_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_move_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_delegating_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_deleted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_digit_separators\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_enum_forward_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_explicit_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_extended_friend_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_extern_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_final\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_func_identifier\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_generalized_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_generic_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_inheriting_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_inline_namespaces\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_lambda_init_captures\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_local_type_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_long_long_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_noexcept\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_nonstatic_member_init\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_nullptr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_override\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_range_for\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_raw_string_literals\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_reference_qualified_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_relaxed_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_return_type_deduction\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_right_angle_brackets\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_rvalue_references\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_sizeof_member\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_static_assert\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_strong_enums\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus +"1" +#else +"0" +#endif +"cxx_template_template_parameters\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_thread_local\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_trailing_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unicode_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_uniform_initialization\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unrestricted_unions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_user_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_variable_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_macros\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_templates\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/thirdparty/bmt/build/CMakeFiles/progress.marks b/thirdparty/bmt/build/CMakeFiles/progress.marks new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/thirdparty/bmt/build/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/thirdparty/bmt/build/Makefile b/thirdparty/bmt/build/Makefile new file mode 100644 index 0000000..c178b32 --- /dev/null +++ b/thirdparty/bmt/build/Makefile @@ -0,0 +1,148 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/bemdeppi/ham/thirdparty/bmt + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/bemdeppi/ham/thirdparty/bmt/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named example + +# Build rule for target. +example: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 example +.PHONY : example + +# fast build rule for target. +example/fast: + $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/build +.PHONY : example/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... rebuild_cache" + @echo "... example" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/thirdparty/bmt/build/cmake_install.cmake b/thirdparty/bmt/build/cmake_install.cmake new file mode 100644 index 0000000..5bccbed --- /dev/null +++ b/thirdparty/bmt/build/cmake_install.cmake @@ -0,0 +1,50 @@ +# Install script for directory: /home/bemdeppi/ham/thirdparty/bmt + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "0") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/home/bemdeppi/ham/thirdparty/bmt/build/src/cmake_install.cmake") + +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/bemdeppi/ham/thirdparty/bmt/build/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/thirdparty/bmt/build/example b/thirdparty/bmt/build/example new file mode 100755 index 0000000..6575979 Binary files /dev/null and b/thirdparty/bmt/build/example differ diff --git a/thirdparty/bmt/build/src/CMakeFiles/CMakeDirectoryInformation.cmake b/thirdparty/bmt/build/src/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..c883c69 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/bemdeppi/ham/thirdparty/bmt") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/bemdeppi/ham/thirdparty/bmt/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/CXX.includecache b/thirdparty/bmt/build/src/CMakeFiles/example.dir/CXX.includecache new file mode 100644 index 0000000..065d1e7 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/CXX.includecache @@ -0,0 +1,36 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../include/noma/bmt/bmt.hpp +chrono +- +cmath +- +ratio +- +string +- +sstream +- +iomanip +- +fstream +- +type_traits +- +vector +- + +/home/bemdeppi/ham/thirdparty/bmt/src/example.cpp +noma/bmt/bmt.hpp +- +iostream +- +thread +- + diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/DependInfo.cmake b/thirdparty/bmt/build/src/CMakeFiles/example.dir/DependInfo.cmake new file mode 100644 index 0000000..2278187 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/DependInfo.cmake @@ -0,0 +1,21 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_CXX + "/home/bemdeppi/ham/thirdparty/bmt/src/example.cpp" "/home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/example.dir/example.cpp.o" + ) +set(CMAKE_CXX_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_CXX_TARGET_INCLUDE_PATH + "../include" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/build.make b/thirdparty/bmt/build/src/CMakeFiles/example.dir/build.make new file mode 100644 index 0000000..d8157ce --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/build.make @@ -0,0 +1,113 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/bemdeppi/ham/thirdparty/bmt + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/bemdeppi/ham/thirdparty/bmt/build + +# Include any dependencies generated for this target. +include src/CMakeFiles/example.dir/depend.make + +# Include the progress variables for this target. +include src/CMakeFiles/example.dir/progress.make + +# Include the compile flags for this target's objects. +include src/CMakeFiles/example.dir/flags.make + +src/CMakeFiles/example.dir/example.cpp.o: src/CMakeFiles/example.dir/flags.make +src/CMakeFiles/example.dir/example.cpp.o: ../src/example.cpp + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object src/CMakeFiles/example.dir/example.cpp.o" + cd /home/bemdeppi/ham/thirdparty/bmt/build/src && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/example.dir/example.cpp.o -c /home/bemdeppi/ham/thirdparty/bmt/src/example.cpp + +src/CMakeFiles/example.dir/example.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/example.dir/example.cpp.i" + cd /home/bemdeppi/ham/thirdparty/bmt/build/src && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/bemdeppi/ham/thirdparty/bmt/src/example.cpp > CMakeFiles/example.dir/example.cpp.i + +src/CMakeFiles/example.dir/example.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/example.dir/example.cpp.s" + cd /home/bemdeppi/ham/thirdparty/bmt/build/src && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/bemdeppi/ham/thirdparty/bmt/src/example.cpp -o CMakeFiles/example.dir/example.cpp.s + +src/CMakeFiles/example.dir/example.cpp.o.requires: + +.PHONY : src/CMakeFiles/example.dir/example.cpp.o.requires + +src/CMakeFiles/example.dir/example.cpp.o.provides: src/CMakeFiles/example.dir/example.cpp.o.requires + $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/example.cpp.o.provides.build +.PHONY : src/CMakeFiles/example.dir/example.cpp.o.provides + +src/CMakeFiles/example.dir/example.cpp.o.provides.build: src/CMakeFiles/example.dir/example.cpp.o + + +# Object files for target example +example_OBJECTS = \ +"CMakeFiles/example.dir/example.cpp.o" + +# External object files for target example +example_EXTERNAL_OBJECTS = + +example: src/CMakeFiles/example.dir/example.cpp.o +example: src/CMakeFiles/example.dir/build.make +example: src/CMakeFiles/example.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable ../example" + cd /home/bemdeppi/ham/thirdparty/bmt/build/src && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/example.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +src/CMakeFiles/example.dir/build: example + +.PHONY : src/CMakeFiles/example.dir/build + +src/CMakeFiles/example.dir/requires: src/CMakeFiles/example.dir/example.cpp.o.requires + +.PHONY : src/CMakeFiles/example.dir/requires + +src/CMakeFiles/example.dir/clean: + cd /home/bemdeppi/ham/thirdparty/bmt/build/src && $(CMAKE_COMMAND) -P CMakeFiles/example.dir/cmake_clean.cmake +.PHONY : src/CMakeFiles/example.dir/clean + +src/CMakeFiles/example.dir/depend: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/bemdeppi/ham/thirdparty/bmt /home/bemdeppi/ham/thirdparty/bmt/src /home/bemdeppi/ham/thirdparty/bmt/build /home/bemdeppi/ham/thirdparty/bmt/build/src /home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/example.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : src/CMakeFiles/example.dir/depend + diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/cmake_clean.cmake b/thirdparty/bmt/build/src/CMakeFiles/example.dir/cmake_clean.cmake new file mode 100644 index 0000000..953ec20 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +file(REMOVE_RECURSE + "CMakeFiles/example.dir/example.cpp.o" + "../example.pdb" + "../example" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/example.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.internal b/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.internal new file mode 100644 index 0000000..de03e59 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.internal @@ -0,0 +1,6 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +src/CMakeFiles/example.dir/example.cpp.o + ../include/noma/bmt/bmt.hpp + /home/bemdeppi/ham/thirdparty/bmt/src/example.cpp diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.make b/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.make new file mode 100644 index 0000000..ed8b29c --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/depend.make @@ -0,0 +1,6 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +src/CMakeFiles/example.dir/example.cpp.o: ../include/noma/bmt/bmt.hpp +src/CMakeFiles/example.dir/example.cpp.o: ../src/example.cpp + diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/example.cpp.o b/thirdparty/bmt/build/src/CMakeFiles/example.dir/example.cpp.o new file mode 100644 index 0000000..9c6fc5e Binary files /dev/null and b/thirdparty/bmt/build/src/CMakeFiles/example.dir/example.cpp.o differ diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/flags.make b/thirdparty/bmt/build/src/CMakeFiles/example.dir/flags.make new file mode 100644 index 0000000..efb7961 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -std=c++11 + +CXX_DEFINES = + +CXX_INCLUDES = -I/home/bemdeppi/ham/thirdparty/bmt/include + diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/link.txt b/thirdparty/bmt/build/src/CMakeFiles/example.dir/link.txt new file mode 100644 index 0000000..868b0e9 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/example.dir/example.cpp.o -o ../example -rdynamic diff --git a/thirdparty/bmt/build/src/CMakeFiles/example.dir/progress.make b/thirdparty/bmt/build/src/CMakeFiles/example.dir/progress.make new file mode 100644 index 0000000..abadeb0 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/example.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 + diff --git a/thirdparty/bmt/build/src/CMakeFiles/progress.marks b/thirdparty/bmt/build/src/CMakeFiles/progress.marks new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/thirdparty/bmt/build/src/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/thirdparty/bmt/build/src/Makefile b/thirdparty/bmt/build/src/Makefile new file mode 100644 index 0000000..8963c02 --- /dev/null +++ b/thirdparty/bmt/build/src/Makefile @@ -0,0 +1,180 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/bemdeppi/ham/thirdparty/bmt + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/bemdeppi/ham/thirdparty/bmt/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles /home/bemdeppi/ham/thirdparty/bmt/build/src/CMakeFiles/progress.marks + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f CMakeFiles/Makefile2 src/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/bemdeppi/ham/thirdparty/bmt/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f CMakeFiles/Makefile2 src/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +src/CMakeFiles/example.dir/rule: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/example.dir/rule +.PHONY : src/CMakeFiles/example.dir/rule + +# Convenience name for target. +example: src/CMakeFiles/example.dir/rule + +.PHONY : example + +# fast build rule for target. +example/fast: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/build +.PHONY : example/fast + +example.o: example.cpp.o + +.PHONY : example.o + +# target to build an object file +example.cpp.o: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/example.cpp.o +.PHONY : example.cpp.o + +example.i: example.cpp.i + +.PHONY : example.i + +# target to preprocess a source file +example.cpp.i: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/example.cpp.i +.PHONY : example.cpp.i + +example.s: example.cpp.s + +.PHONY : example.s + +# target to generate assembly for a file +example.cpp.s: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(MAKE) -f src/CMakeFiles/example.dir/build.make src/CMakeFiles/example.dir/example.cpp.s +.PHONY : example.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... rebuild_cache" + @echo "... example" + @echo "... example.o" + @echo "... example.i" + @echo "... example.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/bemdeppi/ham/thirdparty/bmt/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/thirdparty/bmt/build/src/cmake_install.cmake b/thirdparty/bmt/build/src/cmake_install.cmake new file mode 100644 index 0000000..8c26235 --- /dev/null +++ b/thirdparty/bmt/build/src/cmake_install.cmake @@ -0,0 +1,34 @@ +# Install script for directory: /home/bemdeppi/ham/thirdparty/bmt/src + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "0") +endif() + diff --git a/thirdparty/bmt/include/noma/bmt/bmt.hpp b/thirdparty/bmt/include/noma/bmt/bmt.hpp new file mode 100644 index 0000000..d41751d --- /dev/null +++ b/thirdparty/bmt/include/noma/bmt/bmt.hpp @@ -0,0 +1,257 @@ +// Copyright (c) 2013-2017 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef noma_bmt_bmt_hpp +#define noma_bmt_bmt_hpp + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace noma { +namespace bmt { + +using rep = double; +using period = std::nano; +using duration = std::chrono::duration; + +// make sure we have a steady clock, if possible one with a high resolution +using clock = std::conditional::type; +using time_point = clock::time_point; + +// convenience duration types +using nanoseconds = std::chrono::duration; +using microseconds = std::chrono::duration; +using milliseconds = std::chrono::duration; +using seconds = std::chrono::duration>; +using minutes = std::chrono::duration>; +using hours = std::chrono::duration>; + + +// NOTE: the code below assumes floating point arithmetic on rep (the type retuned by duration::count()) +static_assert(std::chrono::treat_as_floating_point::value, "rep is required to be a floating point type"); + +class timer +{ +public: + timer() : start(clock::now()) {} + + duration elapsed() const + { + // NOTE: conversion from clock's duration type to ours (see above) + return std::chrono::duration_cast(clock::now() - start); + } + +private: + time_point start; +}; + +class statistics +{ +public: + statistics() = default; + + /** + * Ctor with name and pre-allocation of internal vector of timings measured. + * If the name is used a first column is added for table output. + * If the number of measurements is known, it should be used to + * avoid re-allocating memory while benchmarking. + * Optionally, a number of ignored warm-up values can be specified. + */ + statistics(const std::string& name, size_t expected_count, size_t warmup_count = 0) : warmup_count_(warmup_count), name_(name) + { + times_.reserve(expected_count); + } + + /** + * Same as above with a name, that adds a leading column to the table output. + */ + statistics(size_t count, size_t warmup_count = 0) : statistics("", count, warmup_count) { } + + // add a timer + void add(const timer& t) { add(t.elapsed()); } + + // add a duration + void add(const duration& value) + { + // ignore warmup values + if (warmup_count_ > 0) // NOTE: decrement + { + --warmup_count_; + return; + } + + times_.push_back(value); + ++count_; + duration delta = value - average_; + average_ = average_ + duration(delta.count() / count_); + variance_ = variance_ + duration(delta.count() * delta.count()); + + if (count_ == 1) + { + min_ = value; + max_ = value; + } + else + { + min_ = std::min(min_, value); //;value < min_ ? value : min_; + max_ = std::max(max_, value); //value > max_ ? value : max_; + } + } + + size_t count() const { return count_; } + + duration average() const { return average_; } + + duration median() const + { + // NOTE: when comparing this with the mathematical definition, keep in mind our indices start with 0 + const size_t n = times_.size(); + if (n == 0) + { + return duration(0.0); + } + else if ((n % 2) == 0) // even number of vaules + { + // average the two median elements, round the result, and convert it back to a duration + return duration(0.5 * (times_[(n / 2) - 1].count() + times_[n / 2].count())); + } + else // uneven number of values + { + return times_[n / 2]; + } + } + + duration min() const { return min_; } + + duration max() const { return max_; } + + const std::string& name() const { return name_; } + + duration variance() const + { + return duration((count_ <= 1) ? 0.0 : variance_.count() / rep(count_ - 1)); + } + + // standard error + duration std_error() const + { + return duration(std::sqrt(variance_.count()) / count_); + } + + // relative error (to repeat measurements until small enough) + duration relative_std_error() const + { + return duration(std_error().count() / average().count()); + } + + // delta value for the 95% confidence interval + // (not student's t-test but normal distribution) + // [average - error, average + error] + duration conf95_error() const + { + return 1.96 * std_error(); + } + + // relative error (to repeat measurements until small enough) + duration relative_conf95_error() const + { + return duration(conf95_error().count() / average().count()); + } + + + // returns the header for the string() method + static std::string header_string(bool name_column) + { + std::stringstream ss; + + // add name column if name was set + if (name_column) + ss << "name" << "\t"; + + ss << "average" << "\t" + << "median" << "\t" + << "min" << "\t" + << "max" << "\t" + << "variance" << "\t" + << "std_error" << "\t" + << "relative_std_error" << "\t" + << "conf95_error" << "\t" + << "relative_conf95_error" << "\t" + << "count"; + return ss.str(); + } + + std::string header_string() const + { + return header_string(!name_.empty()); + } + + // returns all data in one line separated by tabs + std::string string() const + { + std::stringstream ss; + + // add name column if name was set + if (!name_.empty()) + ss << name_ << "\t"; + + ss << std::scientific // << std::fixed + << average().count() << "\t" + << median().count() << "\t" + << min().count() << "\t" + << max().count() << "\t" + << variance().count() << "\t" + << std_error().count() << "\t" + << relative_std_error().count() << "\t" + << conf95_error().count() << "\t" + << relative_conf95_error().count() << "\t" + << count(); + return ss.str(); + } + + // writes the raw data to a file (one duration per line) + void to_file(std::string filename) const + { + std::ofstream file(filename.c_str()); + file << std::scientific; + + for (size_t i = 0; i < times_.size(); ++i) + { + file << times_[i].count() << std::endl; + } + + file.close(); + } + + duration sum() const + { + duration result(0.0); + for (size_t i = 0; i < times_.size(); ++i) + result += times_[i]; + return result; + } + +private: + size_t count_ { 0 }; // event counter + size_t warmup_count_ { 0 }; // number of values to drop before taking data + duration average_ { 0.0 }; // average + duration variance_ { 0.0 }; // variance + duration min_ { 0.0 }; // global maximum + duration max_ { 0.0 }; // global minimum + std::vector times_; // all measured values + std::string name_; +}; + +} // namespace bmt +} // namespace noma + +#endif // noma_bmt_bmt.hpp diff --git a/thirdparty/bmt/src/CMakeLists.txt b/thirdparty/bmt/src/CMakeLists.txt new file mode 100644 index 0000000..bd679a6 --- /dev/null +++ b/thirdparty/bmt/src/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2017 Matthias Noack +# +# See accompanying file LICENSE and README for further information. + +# do not put executable into subdir +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + +if (NOMA_BMT_BUILD_EXAMPLES) + # simpel example application measuring overhead + add_executable(example example.cpp) + target_link_libraries(example noma_bmt) +endif () + diff --git a/thirdparty/bmt/src/example.cpp b/thirdparty/bmt/src/example.cpp new file mode 100644 index 0000000..7f2953f --- /dev/null +++ b/thirdparty/bmt/src/example.cpp @@ -0,0 +1,58 @@ +// Copyright (c) 2013-2017 Matthias Noack (ma.noack.pr@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + +#include +#include + +namespace bmt = ::noma::bmt; + +int main(int args, char* argv[]) +{ + size_t iterations = 100; // iterations to be measured + size_t warmup_iterations = 5; // iterations to be skipped before starting measuring + + // generate a table header with name column + std::cout << bmt::statistics::header_string(true) << std::endl; + + // benchmark the cost of timing + bmt::statistics timing_overhead_stats {"timing_overhead", iterations, warmup_iterations}; + + // do all iterations, inlcuding warmup_iterations which will be ignored by stats + for (size_t i = 0; i < (iterations + warmup_iterations); ++i) + { + bmt::timer timer; // creata a timer, starts measuring on construction + // nothing to do + timing_overhead_stats.add(timer); // add timer to statistics object (measuring is stopped) + } + + + // benchmark something that takes time + bmt::statistics sleep_for_stats {"sleep_for", iterations, warmup_iterations}; + + // do all iterations, inlcuding warmup_iterations which will be ignored by stats + for (size_t i = 0; i < (iterations + warmup_iterations); ++i) + { + bmt::timer timer; // creata a timer, starts measuring on construction + std::this_thread::sleep_for(bmt::milliseconds { 25 }), // spend some time + sleep_for_stats.add(timer); // add timer to statistics object (measuring is stopped) + } + + + // output table entries with complete data + std::cout << timing_overhead_stats.string() << std::endl; + std::cout << sleep_for_stats.string() << std::endl; + + // output just the averages in differend units + std::cout << timing_overhead_stats.name() << " average: " + << std::chrono::duration_cast(timing_overhead_stats.average()).count() << " ns" + << std::endl; + std::cout << sleep_for_stats.name() << " average: " + << std::chrono::duration_cast(sleep_for_stats.average()).count() << " ms" + << std::endl; + + return 0; +} diff --git a/tools/install_boost.sh b/tools/install_boost.sh index a803778..e422feb 100755 --- a/tools/install_boost.sh +++ b/tools/install_boost.sh @@ -33,14 +33,14 @@ # http://www.boost.org/more/getting_started/unix-variants.html#prepare-to-use-a-boost-library-binary # https://software.intel.com/en-us/articles/building-the-boost-library-to-run-natively-on-intelr-xeon-phitm-coprocessor -DOWNLOAD_PATH=$HOME/Downloads -INSTALL_PATH=$HOME/Software -NO_MIC=false # set to true, to disable building Boost for Xeon Phi -BASHRC_FILE=$HOME/.bashrc # set to /dev/null to disable, or to any other file to manually merge the needed changes into your .bashrc +DOWNLOAD_PATH=$HOME/boost/ +INSTALL_PATH=$HOME/software +NO_MIC=true # set to true, to disable building Boost for Xeon Phi +BASHRC_FILE=$HOME/dev/null # set to /dev/null to disable, or to any other file to manually merge the needed changes into your .bashrc BOOST_BUILD_OPTIONS="-j8" # concurrent build with up to 8 commands BOOST_NAME=boost -BOOST_VERSION=1_56_0 +BOOST_VERSION=1_66_0 BOOST_MIC_SUFFIX=mic BOOST_ARCHIVE=${BOOST_NAME}_${BOOST_VERSION} # NOTE: without tar.bz2 @@ -76,7 +76,7 @@ cd tools/build echo "Building Boost.Build ..." ./bootstrap.sh > $BUILD_LOG_BB 2>&1 echo "Installing Boost.Build ..." -./b2 install --prefix=$BOOST_INSTALL_PATH >> $BUILD_LOG_BB 2>&1 +./b2 install --prefix=${BOOST_INSTALL_PATH} >> $BUILD_LOG_BB 2>&1 PATH=$BOOST_INSTALL_PATH/bin:$PATH cd ../..