Skip to content

Commit

Permalink
Merge pull request #1818 from STEllAR-GROUP/fixing_1748
Browse files Browse the repository at this point in the history
Fixing #1748
  • Loading branch information
sithhell committed Dec 1, 2015
2 parents 31c3bb3 + 4631e7d commit 1579364
Show file tree
Hide file tree
Showing 130 changed files with 680 additions and 325 deletions.
4 changes: 2 additions & 2 deletions circle.yml
Expand Up @@ -20,13 +20,13 @@ dependencies:
- docker pull ${IMAGE_NAME}
- mkdir build
override:
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} cmake .. -DCMAKE_BUILD_TYPE=Debug -DHPX_WITH_MALLOC=system -DHPX_WITH_GIT_COMMIT=${CIRCLE_SHA1} -DHPX_WITH_TOOLS=On -DCMAKE_CXX_FLAGS="-fcolor-diagnostics"
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} cmake .. -DCMAKE_BUILD_TYPE=Debug -DHPX_WITH_MALLOC=system -DHPX_WITH_GIT_COMMIT=${CIRCLE_SHA1} -DHPX_WITH_TOOLS=On -DCMAKE_CXX_FLAGS="-fcolor-diagnostics" -DHPX_WITH_TESTS_HEADERS=On
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 core
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k components
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k examples
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tests.unit
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tests.regressions
#- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tests.headers
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tests.headers
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tests.performance
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k tools.inspect
# TODO replace this line with "docker build" once docker managed to
Expand Down
5 changes: 5 additions & 0 deletions docs/CMakeLists.txt
Expand Up @@ -107,14 +107,19 @@ set(doxygen_dependencies
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/static_chunk_size.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/thread_pool_executors.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/timed_executor_traits.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/agas_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/applier_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/basename_registration.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/components_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/get_ptr.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/get_locality_name.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/get_locality_id.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/get_os_thread_count.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/get_worker_thread_num.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/find_here.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/launch_policy.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/naming_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/parcelset_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/runtime_mode.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/set_parcel_write_handler.hpp"
Expand Down
157 changes: 4 additions & 153 deletions hpx/hpx_fwd.hpp
Expand Up @@ -48,8 +48,11 @@
#include <hpx/util/unique_function.hpp>
#include <hpx/util/unused.hpp>
#include <hpx/runtime/agas_fwd.hpp>
#include <hpx/runtime/applier_fwd.hpp>
#include <hpx/runtime/components_fwd.hpp>
#include <hpx/runtime/find_here.hpp>
#include <hpx/runtime/launch_policy.hpp>
#include <hpx/runtime/naming_fwd.hpp>
#include <hpx/runtime/parcelset_fwd.hpp>
#include <hpx/runtime/runtime_mode.hpp>
#include <hpx/runtime/components/component_type.hpp>
Expand All @@ -69,153 +72,12 @@ namespace hpx

HPX_EXCEPTION_EXPORT extern error_code throws;

/// \namespace applier
///
/// The namespace \a applier contains all definitions needed for the
/// class \a hpx#applier#applier and its related functionality. This
/// namespace is part of the HPX core module.
namespace applier
{
class HPX_API_EXPORT applier;

/// The function \a get_applier returns a reference to the (thread
/// specific) applier instance.
HPX_API_EXPORT applier& get_applier();
HPX_API_EXPORT applier* get_applier_ptr();
}

/// \namespace naming
///
/// The namespace \a naming contains all definitions needed for the AGAS
/// (Active Global Address Space) service.
namespace naming
{
typedef agas::addressing_service resolver_client;

struct HPX_API_EXPORT gid_type;
// NOTE: We do not export the symbol here as id_type was already
// exported and generates a warning on gcc otherwise.
struct id_type;
struct HPX_API_EXPORT address;

HPX_API_EXPORT resolver_client& get_agas_client();

typedef boost::uint64_t address_type;
}

class HPX_API_EXPORT runtime;
class HPX_API_EXPORT thread;

///////////////////////////////////////////////////////////////////////////
template <typename SchedulingPolicy>
class HPX_API_EXPORT runtime_impl;

/// The function \a get_runtime returns a reference to the (thread
/// specific) runtime instance.
HPX_API_EXPORT runtime& get_runtime();
HPX_API_EXPORT runtime* get_runtime_ptr();

/// The function \a get_locality returns a reference to the locality prefix
HPX_API_EXPORT naming::gid_type const& get_locality();

/// The function \a get_runtime_instance_number returns a unique number
/// associated with the runtime instance the current thread is running in.
HPX_API_EXPORT std::size_t get_runtime_instance_number();

HPX_API_EXPORT void report_error(std::size_t num_thread
, boost::exception_ptr const& e);

HPX_API_EXPORT void report_error(boost::exception_ptr const& e);

/// Register a function to be called during system shutdown
HPX_API_EXPORT bool register_on_exit(util::function_nonser<void()> const&);

enum logging_destination
{
destination_hpx = 0,
destination_timing = 1,
destination_agas = 2,
destination_parcel = 3,
destination_app = 4,
destination_debuglog = 5
};

/// \namespace components
namespace components
{
/// \ cond NODETAIL
namespace detail
{
struct this_type {};
}
/// \ endcond

///////////////////////////////////////////////////////////////////////
template <typename Component = detail::this_type>
class fixed_component_base;

template <typename Component>
class fixed_component;

template <typename Component = detail::this_type>
class abstract_simple_component_base;

template <typename Component = detail::this_type>
class simple_component_base;

template <typename Component>
class simple_component;

template <typename Component, typename Derived = detail::this_type>
class abstract_managed_component_base;

template <typename Component, typename Wrapper = detail::this_type,
typename CtorPolicy = traits::construct_without_back_ptr,
typename DtorPolicy = traits::managed_object_controls_lifetime>
class managed_component_base;

template <typename Component, typename Derived = detail::this_type>
class managed_component;

struct HPX_API_EXPORT component_factory_base;

template <typename Component>
struct component_factory;

class runtime_support;
class memory;
class memory_block;

namespace stubs
{
struct runtime_support;
struct memory;
struct memory_block;
}

namespace server
{
class HPX_API_EXPORT runtime_support;
class HPX_API_EXPORT memory;
class HPX_API_EXPORT memory_block;
}

HPX_EXPORT void console_logging(logging_destination dest,
std::size_t level, std::string const& msg);
HPX_EXPORT void cleanup_logging();
HPX_EXPORT void activate_logging();
}

HPX_EXPORT components::server::runtime_support* get_runtime_support_ptr();

/// \namespace util
namespace util
{
struct binary_filter;

class HPX_EXPORT section;
class HPX_EXPORT runtime_configuration;
class HPX_EXPORT io_service_pool;

/// \brief Expand INI variables in a string
HPX_API_EXPORT std::string expand(std::string const& expand);
Expand All @@ -229,22 +91,11 @@ namespace hpx
struct counter_info;
}

///////////////////////////////////////////////////////////////////////////
HPX_API_EXPORT bool is_scheduler_numa_sensitive();

///////////////////////////////////////////////////////////////////////////
HPX_API_EXPORT util::runtime_configuration const& get_config();

///////////////////////////////////////////////////////////////////////////
HPX_API_EXPORT hpx::util::io_service_pool* get_thread_pool(
char const* name, char const* pool_name_suffix = "");
/// \endcond

///////////////////////////////////////////////////////////////////////////
// Pulling important types into the main namespace
using naming::id_type;
using naming::invalid_id;

/// \endcond
}

namespace hpx
Expand Down
7 changes: 6 additions & 1 deletion hpx/lcos/detail/async_implementations_fwd.hpp
Expand Up @@ -7,8 +7,13 @@
#define HPX_LCOS_ASYNC_IMPLEMENTATIONS_FWD_APR_13_2015_0829AM

#include <hpx/config.hpp>
#include <hpx/traits/promise_local_result.hpp>
#include <hpx/lcos/async_fwd.hpp>
#include <hpx/lcos/future.hpp>
#include <hpx/traits/promise_local_result.hpp>
#include <hpx/runtime/launch_policy.hpp>
#include <hpx/runtime/naming_fwd.hpp>

#include <boost/detail/scoped_enum_emulation.hpp>

namespace hpx { namespace detail
{
Expand Down
4 changes: 4 additions & 0 deletions hpx/lcos/local/conditional_trigger.hpp
Expand Up @@ -7,8 +7,12 @@
#define HPX_LCOS_LOCAL_CONDITIONAL_TRIGGER_SEP_09_2012_1256PM

#include <hpx/hpx_fwd.hpp>
#include <hpx/exception.hpp>
#include <hpx/lcos/future.hpp>
#include <hpx/lcos/local/promise.hpp>
#include <hpx/util/assert.hpp>
#include <hpx/util/function.hpp>
#include <hpx/util/move.hpp>

#include <utility>

Expand Down
1 change: 1 addition & 0 deletions hpx/lcos/local/trigger.hpp
Expand Up @@ -10,6 +10,7 @@
#include <hpx/lcos/local/spinlock.hpp>
#include <hpx/lcos/local/conditional_trigger.hpp>
#include <hpx/lcos/local/no_mutex.hpp>
#include <hpx/lcos/local/promise.hpp>
#include <hpx/util/assert.hpp>
#include <hpx/util/assert_owns_lock.hpp>

Expand Down
1 change: 1 addition & 0 deletions hpx/lcos/server/barrier.hpp
Expand Up @@ -13,6 +13,7 @@
#include <hpx/runtime/threads/thread_helpers.hpp>
#include <hpx/runtime/components/component_type.hpp>
#include <hpx/runtime/components/server/managed_component_base.hpp>
#include <hpx/runtime/components/server/runtime_support.hpp>

#include <boost/thread/locks.hpp>

Expand Down
1 change: 1 addition & 0 deletions hpx/lcos/server/latch.hpp
Expand Up @@ -12,6 +12,7 @@
#include <hpx/runtime/threads/thread_helpers.hpp>
#include <hpx/runtime/components/component_type.hpp>
#include <hpx/runtime/components/server/managed_component_base.hpp>
#include <hpx/runtime/components/server/runtime_support.hpp>

///////////////////////////////////////////////////////////////////////////////
namespace hpx { namespace lcos { namespace server
Expand Down
1 change: 1 addition & 0 deletions hpx/lcos/stubs/barrier.hpp
Expand Up @@ -7,6 +7,7 @@
#define HPX_LCOS_STUBS_BARRIER_MAR_10_2010_0306PM

#include <hpx/runtime/components/stubs/stub_base.hpp>
#include <hpx/async.hpp>
#include <hpx/lcos/base_lco.hpp>
#include <hpx/lcos/server/barrier.hpp>

Expand Down
2 changes: 1 addition & 1 deletion hpx/lcos/stubs/object_semaphore.hpp
Expand Up @@ -105,7 +105,7 @@ struct object_semaphore : components::stub_base<

static void wait(naming::id_type const& gid)
{
wait(gid).get();
wait_sync(gid);
}
};

Expand Down
3 changes: 2 additions & 1 deletion hpx/parallel/task_block.hpp
Expand Up @@ -15,6 +15,7 @@
#include <hpx/lcos/local/spinlock.hpp>
#include <hpx/lcos/future.hpp>
#include <hpx/lcos/when_all.hpp>
#include <hpx/traits/is_future.hpp>
#include <hpx/util/unlock_guard.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/async.hpp>
Expand Down Expand Up @@ -139,7 +140,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
typedef typename util::detail::algorithm_result<ExPolicy>::type
result_type;
typedef std::integral_constant<
bool, traits::is_future<result_type>::value
bool, hpx::traits::is_future<result_type>::value
> is_fut;
wait_for_completion(is_fut());
}
Expand Down
4 changes: 3 additions & 1 deletion hpx/parallel/traits/projected.hpp
Expand Up @@ -7,10 +7,12 @@
#define HPX_PARALLEL_TRAITS_PROJECTED_JUL_18_2015_1001PM

#include <hpx/config.hpp>
#include <hpx/traits/is_callable.hpp>
#include <hpx/traits/segmented_iterator_traits.hpp>
#include <hpx/util/result_of.hpp>
#include <hpx/util/always_void.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/util/detail/pack.hpp>
#include <hpx/util/result_of.hpp>

#include <type_traits>
#include <iterator>
Expand Down
5 changes: 3 additions & 2 deletions hpx/performance_counters/counters.hpp
Expand Up @@ -6,17 +6,18 @@
#if !defined(HPX_PERFORMANCE_COUNTERS_MAR_01_2009_0134PM)
#define HPX_PERFORMANCE_COUNTERS_MAR_01_2009_0134PM

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>
#include <hpx/exception.hpp>
#include <hpx/runtime/naming/name.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/runtime/serialization/base_object.hpp>
#include <hpx/lcos/base_lco_with_value.hpp>
#include <hpx/lcos/future.hpp>
#include <hpx/util/function.hpp>

#include <boost/cstdint.hpp>

#include <string>

///////////////////////////////////////////////////////////////////////////////
namespace hpx { namespace performance_counters
{
Expand Down
2 changes: 1 addition & 1 deletion hpx/plugins/parcel/coalescing_message_handler.hpp
Expand Up @@ -7,7 +7,7 @@
!defined(HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_HANDLER_FEB_24_2013_0302PM)
#define HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_HANDLER_FEB_24_2013_0302PM

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_PARCEL_COALESCING)

Expand Down
13 changes: 7 additions & 6 deletions hpx/plugins/parcel/message_buffer.hpp
Expand Up @@ -6,14 +6,15 @@
#if !defined(HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_BUFFER_MAR_07_2013_1250PM)
#define HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_BUFFER_MAR_07_2013_1250PM

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>
#include <hpx/util/assert.hpp>
#include <hpx/runtime/parcelset_fwd.hpp>
#include <hpx/runtime/parcelset/locality.hpp>
#include <hpx/runtime/parcelset/parcel.hpp>
#include <hpx/runtime/parcelset/parcelport.hpp>
#include <hpx/util/move.hpp>

#include <vector>

#include <boost/noncopyable.hpp>

namespace hpx { namespace plugins { namespace parcel { namespace detail
{
class message_buffer
Expand Down Expand Up @@ -61,7 +62,7 @@ namespace hpx { namespace plugins { namespace parcel { namespace detail

message_buffer_append_state append(parcelset::locality const & dest,
parcelset::parcel p,
parcelset::parcelport::write_handler_type f)
parcelset::write_handler_type f)
{
HPX_ASSERT(messages_.size() == handlers_.size());
HPX_ASSERT(dests_.size() == handlers_.size());
Expand Down Expand Up @@ -119,7 +120,7 @@ namespace hpx { namespace plugins { namespace parcel { namespace detail
private:
std::vector<parcelset::locality> dests_;
std::vector<parcelset::parcel> messages_;
std::vector<parcelset::parcelport::write_handler_type> handlers_;
std::vector<parcelset::write_handler_type> handlers_;
std::size_t max_messages_;
};
}}}}
Expand Down

0 comments on commit 1579364

Please sign in to comment.