Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/STEllAR-GROUP/master' into 80_l…
Browse files Browse the repository at this point in the history
…ine_limit
  • Loading branch information
Bcorde5 committed Aug 17, 2015
2 parents 5f33af7 + 0dee1c0 commit ad92958
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 30 deletions.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Expand Up @@ -191,8 +191,21 @@ hpx_option(HPX_WITH_COMPILE_ONLY_TESTS BOOL
"Create build system support for compile time only HPX tests (default ON)"
ON CATEGORY "Build Targets")

# Enable IO-counters on linux systems only
set(HPX_WITH_IO_COUNTERS_DEFAULT OFF)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(HPX_WITH_IO_COUNTERS_DEFAULT ON)
endif()

hpx_option(HPX_WITH_IO_COUNTERS BOOL
"Build HPX runtime (default: ${HPX_WITH_IO_COUNTERS_DEFAULT})"
${HPX_WITH_IO_COUNTERS_DEFAULT} ADVANCED CATEGORY "Build Targets")
if(HPX_WITH_IO_COUNTERS)
hpx_add_config_define(HPX_HAVE_IO_COUNTERS)
endif()

set(HPX_FULL_RPATH_DEFAULT ON)
if(APPLE)
if(APPLE OR MSVC)
set(HPX_FULL_RPATH_DEFAULT OFF)
endif()
hpx_option(HPX_WITH_FULL_RPATH BOOL
Expand Down
4 changes: 4 additions & 0 deletions docs/manual/build_system/cmake_variables.qbk
Expand Up @@ -35,6 +35,7 @@ The options are split into these categories:
* [link build_system.cmake_variables.HPX_WITH_COMPRESSION_BZIP2 HPX_WITH_COMPRESSION_BZIP2]
* [link build_system.cmake_variables.HPX_WITH_COMPRESSION_SNAPPY HPX_WITH_COMPRESSION_SNAPPY]
* [link build_system.cmake_variables.HPX_WITH_COMPRESSION_ZLIB HPX_WITH_COMPRESSION_ZLIB]
* [link build_system.cmake_variables.HPX_WITH_FPGA_QUEUES HPX_WITH_FPGA_QUEUES]
* [link build_system.cmake_variables.HPX_WITH_FULL_RPATH HPX_WITH_FULL_RPATH]
* [link build_system.cmake_variables.HPX_WITH_GCC_VERSION_CHECK HPX_WITH_GCC_VERSION_CHECK]
* [link build_system.cmake_variables.HPX_WITH_GENERIC_CONTEXT_COROUTINES HPX_WITH_GENERIC_CONTEXT_COROUTINES]
Expand All @@ -57,6 +58,7 @@ The options are split into these categories:
[[[#build_system.cmake_variables.HPX_WITH_COMPRESSION_BZIP2] `HPX_WITH_COMPRESSION_BZIP2:BOOL`][Enable bzip2 compression for parcel data (default: OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_COMPRESSION_SNAPPY] `HPX_WITH_COMPRESSION_SNAPPY:BOOL`][Enable snappy compression for parcel data (default: OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_COMPRESSION_ZLIB] `HPX_WITH_COMPRESSION_ZLIB:BOOL`][Enable zlib compression for parcel data (default: OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_FPGA_QUEUES] `HPX_WITH_FPGA_QUEUES:BOOL`][Enable special FPGA based queues and schedulers (default: OFF)]]
[[[#build_system.cmake_variables.HPX_WITH_FULL_RPATH] `HPX_WITH_FULL_RPATH:BOOL`][Build and link HPX libraries and executables with full RPATHs (default: ON)]]
[[[#build_system.cmake_variables.HPX_WITH_GCC_VERSION_CHECK] `HPX_WITH_GCC_VERSION_CHECK:BOOL`][Don't ignore version reported by gcc (default: ON)]]
[[[#build_system.cmake_variables.HPX_WITH_GENERIC_CONTEXT_COROUTINES] `HPX_WITH_GENERIC_CONTEXT_COROUTINES:BOOL`][Use Boost.Context as the underlying coroutines context switch implementation.]]
Expand All @@ -76,6 +78,7 @@ The options are split into these categories:
* [link build_system.cmake_variables.HPX_WITH_DOCUMENTATION HPX_WITH_DOCUMENTATION]
* [link build_system.cmake_variables.HPX_WITH_DOCUMENTATION_SINGLEPAGE HPX_WITH_DOCUMENTATION_SINGLEPAGE]
* [link build_system.cmake_variables.HPX_WITH_EXAMPLES HPX_WITH_EXAMPLES]
* [link build_system.cmake_variables.HPX_WITH_IO_COUNTERS HPX_WITH_IO_COUNTERS]
* [link build_system.cmake_variables.HPX_WITH_PSEUDO_DEPENDENCIES HPX_WITH_PSEUDO_DEPENDENCIES]
* [link build_system.cmake_variables.HPX_WITH_RUNTIME HPX_WITH_RUNTIME]
* [link build_system.cmake_variables.HPX_WITH_TESTS HPX_WITH_TESTS]
Expand All @@ -92,6 +95,7 @@ The options are split into these categories:
[[[#build_system.cmake_variables.HPX_WITH_DOCUMENTATION] `HPX_WITH_DOCUMENTATION:BOOL`][Build the HPX documentation (default OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_DOCUMENTATION_SINGLEPAGE] `HPX_WITH_DOCUMENTATION_SINGLEPAGE:BOOL`][The HPX documentation should be build as a single page HTML (default OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_EXAMPLES] `HPX_WITH_EXAMPLES:BOOL`][Build the HPX examples (default ON)]]
[[[#build_system.cmake_variables.HPX_WITH_IO_COUNTERS] `HPX_WITH_IO_COUNTERS:BOOL`][Build HPX runtime (default: OFF)]]
[[[#build_system.cmake_variables.HPX_WITH_PSEUDO_DEPENDENCIES] `HPX_WITH_PSEUDO_DEPENDENCIES:BOOL`][Force creating pseudo targets and pseudo dependencies (default OFF).]]
[[[#build_system.cmake_variables.HPX_WITH_RUNTIME] `HPX_WITH_RUNTIME:BOOL`][Build HPX runtime (default: ON)]]
[[[#build_system.cmake_variables.HPX_WITH_TESTS] `HPX_WITH_TESTS:BOOL`][Build the HPX tests (default ON)]]
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/executors/parallel_executor.hpp
Expand Up @@ -66,7 +66,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v3)
template <typename Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & static_cast<boost::uint32_t>(l_);
ar & l_;
}
/// \endcond

Expand Down
7 changes: 6 additions & 1 deletion src/components/CMakeLists.txt
Expand Up @@ -8,13 +8,18 @@
set(subdirs
component_storage
containers
io_counters
iostreams
memory
papi_counters
security
)

if(HPX_WITH_IO_COUNTERS)
set(subdirs ${subdirs}
io_counters
)
endif()

add_hpx_pseudo_target(components)

foreach(subdir ${subdirs})
Expand Down
2 changes: 1 addition & 1 deletion src/components/io_counters/CMakeLists.txt
Expand Up @@ -8,7 +8,7 @@ set(root "${PROJECT_SOURCE_DIR}/hpx/components/io_counters")

if(HPX_WITH_DEFAULT_TARGETS)
add_hpx_component(io_counters
FOLDER "Core/Components"
FOLDER "Core/Components/Counters"
HEADER_ROOT ${root}
AUTOGLOB
PLUGIN)
Expand Down
14 changes: 7 additions & 7 deletions src/components/io_counters/io_counters.cpp
Expand Up @@ -96,49 +96,49 @@ namespace hpx { namespace performance_counters { namespace io
boost::str(boost::format("failed to parse " PROC_IO_PATH) % pid));
}

uint64_t get_pio_riss(bool)
boost::uint64_t get_pio_riss(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.riss;
}

uint64_t get_pio_wiss(bool)
boost::uint64_t get_pio_wiss(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.wiss;
}

uint64_t get_pio_rsysc(bool)
boost::uint64_t get_pio_rsysc(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.rsysc;
}

uint64_t get_pio_wsysc(bool)
boost::uint64_t get_pio_wsysc(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.wsysc;
}

uint64_t get_pio_rstor(bool)
boost::uint64_t get_pio_rstor(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.rstor;
}

uint64_t get_pio_wstor(bool)
boost::uint64_t get_pio_wstor(bool)
{
proc_io pio;
parse_proc_io(pio);
return pio.wstor;
}

uint64_t get_pio_wcanc(bool)
boost::uint64_t get_pio_wcanc(bool)
{
proc_io pio;
parse_proc_io(pio);
Expand Down
8 changes: 3 additions & 5 deletions src/components/memory/CMakeLists.txt
Expand Up @@ -8,14 +8,12 @@ set(root "${PROJECT_SOURCE_DIR}/hpx/components/memory")

if(HPX_WITH_DEFAULT_TARGETS)
add_hpx_component(memory
FOLDER "Core/Components"
FOLDER "Core/Components/Counters"
HEADER_ROOT ${root}
AUTOGLOB
PLUGIN)
endif()

add_hpx_pseudo_dependencies(components.memory
memory_component)
add_hpx_pseudo_dependencies(core
components.memory)
add_hpx_pseudo_dependencies(components.memory memory_component)
add_hpx_pseudo_dependencies(core components.memory)

42 changes: 28 additions & 14 deletions tests/unit/serialization/serialization_list.cpp
Expand Up @@ -169,23 +169,37 @@ void test_fp(T min, T max)
int main()
{
test_bool();
test<char>((std::numeric_limits<char>::min)(), (std::numeric_limits<char>::max)());
test<int>((std::numeric_limits<int>::min)(), (std::numeric_limits<int>::min)() + 100);
test<int>((std::numeric_limits<int>::max)() - 100, (std::numeric_limits<int>::max)());
test<char>((std::numeric_limits<char>::min)(),
(std::numeric_limits<char>::max)());
test<int>((std::numeric_limits<int>::min)(),
(std::numeric_limits<int>::min)() + 100);
test<int>((std::numeric_limits<int>::max)() - 100,
(std::numeric_limits<int>::max)());
test<int>(-100, 100);
test<unsigned>((std::numeric_limits<unsigned>::min)(), (std::numeric_limits<unsigned>::min)() + 100);
test<unsigned>((std::numeric_limits<unsigned>::max)() - 100, (std::numeric_limits<unsigned>::max)());
test<long>((std::numeric_limits<long>::min)(), (std::numeric_limits<long>::min)() + 100);
test<long>((std::numeric_limits<long>::max)() - 100, (std::numeric_limits<long>::max)());
test<unsigned>((std::numeric_limits<unsigned>::min)(),
(std::numeric_limits<unsigned>::min)() + 100);
test<unsigned>((std::numeric_limits<unsigned>::max)() - 100,
(std::numeric_limits<unsigned>::max)());
test<long>((std::numeric_limits<long>::min)(),
(std::numeric_limits<long>::min)() + 100);
test<long>((std::numeric_limits<long>::max)() - 100,
(std::numeric_limits<long>::max)());
test<long>(-100, 100);
test<unsigned long>((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::min)() + 100);
test<unsigned long>((std::numeric_limits<unsigned long>::max)() - 100, (std::numeric_limits<unsigned long>::max)());
test_fp<float>((std::numeric_limits<float>::min)(), (std::numeric_limits<float>::min)() + 100);
test_fp<float>((std::numeric_limits<float>::max)() - 100, (std::numeric_limits<float>::max)()); //it's incorrect
// because floatmax() - 100 causes cancellations error, digits are not affected
test<unsigned long>((std::numeric_limits<unsigned long>::min)(),
(std::numeric_limits<unsigned long>::min)() + 100);
test<unsigned long>((std::numeric_limits<unsigned long>::max)() - 100,
(std::numeric_limits<unsigned long>::max)());
test_fp<float>((std::numeric_limits<float>::min)(),
(std::numeric_limits<float>::min)() + 100);
test_fp<float>((std::numeric_limits<float>::max)() - 100,
(std::numeric_limits<float>::max)()); //it's incorrect
// because floatmax() - 100 causes cancellations error,
// digits are not affected
test_fp<float>(-100, 100);
test<double>((std::numeric_limits<double>::min)(), (std::numeric_limits<double>::min)() + 100);
test<double>((std::numeric_limits<double>::max)() - 100, (std::numeric_limits<double>::max)()); //it's the same
test<double>((std::numeric_limits<double>::min)(),
(std::numeric_limits<double>::min)() + 100);
test<double>((std::numeric_limits<double>::max)() - 100,
(std::numeric_limits<double>::max)()); //it's the same
test<double>(-100, 100);

return hpx::util::report_errors();
Expand Down

0 comments on commit ad92958

Please sign in to comment.