Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed May 13, 2019
2 parents c91c752 + 21e1131 commit d2ce0fc
Show file tree
Hide file tree
Showing 22 changed files with 1,348 additions and 66 deletions.
38 changes: 37 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ jobs:
when: always
command: |
ulimit -c unlimited
ctest -T test --no-compress-output --output-on-failure -R tests.examples
# NOTE: transpose_block_numa is disabled because
# hwloc_get_area_membind_nodeset (which is used by the
# numa_allocator) fails with EPERM.
ctest -T test --no-compress-output --output-on-failure \
-R tests.examples \
-E tests.examples.transpose.transpose_block_numa
- run:
<<: *convert_xml
- run:
Expand Down Expand Up @@ -719,6 +724,34 @@ jobs:
- store_artifacts:
path: tests.unit.threads

tests.unit.topology:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests
command: |
ninja -j2 -k 0 tests.unit.topology
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest -T test --no-compress-output --output-on-failure \
-R tests.unit.topology \
-E tests.unit.topology.numa_allocator
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit.topology
- store_artifacts:
path: tests.unit.topology

tests.unit.traits:
<<: *defaults
steps:
Expand Down Expand Up @@ -1199,6 +1232,8 @@ workflows:
<<: *core_dependency
- tests.unit.threads:
<<: *core_dependency
- tests.unit.topology:
<<: *core_dependency
- tests.unit.traits:
<<: *core_dependency
- tests.unit.util:
Expand Down Expand Up @@ -1267,6 +1302,7 @@ workflows:
- tests.unit.resource
- tests.unit.serialization
- tests.unit.threads
- tests.unit.topology
- tests.unit.traits
- tests.unit.util
- tests.unit.libs
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ if(HPX_WITH_MAX_CPU_COUNT)
hpx_add_config_define(HPX_HAVE_MAX_CPU_COUNT ${HPX_WITH_MAX_CPU_COUNT})
endif()

set(HPX_MAX_NUMA_DOMAIN_COUNT_DEFAULT "4")
set(HPX_MAX_NUMA_DOMAIN_COUNT_DEFAULT "8")
hpx_option(HPX_WITH_MAX_NUMA_DOMAIN_COUNT STRING
"HPX applications will not run on machines with more NUMA domains (default: ${HPX_MAX_NUMA_DOMAIN_COUNT_DEFAULT})"
${HPX_MAX_NUMA_DOMAIN_COUNT_DEFAULT}
Expand Down Expand Up @@ -1700,7 +1700,7 @@ if(HPX_WITH_HPXMP)
if(HPX_WITH_HPXMP_NO_UPDATE)
set(_hpxmp_no_update NO_UPDATE)
endif()
set(_hpx_hpxmp_tag "v0.1.0")
set(_hpx_hpxmp_tag "v0.2.0")
if(HPX_WITH_HPXMP_TAG)
message("Overriding hpxMP git tag ${_hpx_hpxmp_tag} with ${HPX_WITH_HPXMP_TAG}")
set(_hpx_hpxmp_tag ${HPX_WITH_HPXMP_TAG})
Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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)
|circleci_status| |zenodo_doi|
|circleci_status| |zenodo_doi| |codacy|

Documentation: `latest
<https://stellar-group.github.io/hpx/docs/sphinx/latest/html/index.html>`_,
Expand Down Expand Up @@ -85,6 +85,8 @@ stable and usable, sometimes new bugs trick their way into the code base. The
service additionally tracks the current build status for the master branch:
|circleci_status|.

We use `Codacy <https://www.codacy.com/>`_ to assess the code quality of this project: |codacy|.

If you can't find what you are looking for in the documentation or you suspect
you've found a bug in HPX we very much encourage and appreciate any issue
reports through the `issue tracker for this Github project
Expand Down Expand Up @@ -172,3 +174,7 @@ HPX is currently funded by

.. |zenodo_doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.598202.svg
:target: https://doi.org/10.5281/zenodo.598202

.. |codacy| image:: https://api.codacy.com/project/badge/Grade/fef52e7a84d04123921152e35fbb1594
:target: https://www.codacy.com/app/STEllAR-GROUP/hpx
:alt: HPX Code Quality Assessment
14 changes: 14 additions & 0 deletions cmake/HPX_AddCompileTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ function(add_hpx_lib_header_tests lib)
add_library(tests.headers.${lib}.${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${full_test_file})
target_link_libraries(tests.headers.${lib}.${test_name} hpx_${lib})
add_dependencies(tests.headers.${lib} tests.headers.${lib}.${test_name})

add_test(NAME "tests.headers.${lib}.${test_name}"
COMMAND ${CMAKE_COMMAND}
--build ${CMAKE_BINARY_DIR}
--target tests.headers.${lib}.${test_name}
--config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endif()
endforeach()

Expand All @@ -97,4 +104,11 @@ function(add_hpx_lib_header_tests lib)
add_library(tests.headers.${lib}.${test_name} "${CMAKE_CURRENT_BINARY_DIR}/${test_name}.cpp")
target_link_libraries(tests.headers.${lib}.${test_name} hpx_${lib})
add_dependencies(tests.headers.${lib} tests.headers.${lib}.${test_name})

add_test(NAME "tests.headers.${lib}.${test_name}"
COMMAND ${CMAKE_COMMAND}
--build ${CMAKE_BINARY_DIR}
--target tests.headers.${lib}.${test_name}
--config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endfunction()
2 changes: 1 addition & 1 deletion docs/sphinx/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ to find them by passing one or more of the following options to |cmake|_:

.. code-block:: sh
-DBOOST_DIR=/path/to/boost
-DBOOST_ROOT=/path/to/boost
-DHWLOC_ROOT=/path/to/hwloc
-DTCMALLOC_ROOT=/path/to/tcmalloc
-DJEMALLOC_ROOT=/path/to/jemalloc
Expand Down
9 changes: 5 additions & 4 deletions examples/transpose/transpose_block_numa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,16 @@ int main(int argc, char* argv[])
std::size_t numa_nodes = get_num_numa_nodes(topo, vm);
std::pair<std::size_t, std::size_t> pus =
get_num_numa_pus(topo, numa_nodes, vm);
std::size_t num_cores = topo.get_number_of_numa_node_cores(0);
//std::size_t num_cores = topo.get_number_of_numa_node_cores(0);

// Initialize and run HPX, this example requires to run hpx_main on all
// localities
std::vector<std::string> cfg = {
"hpx.run_hpx_main!=1",
"hpx.numa_sensitive=2", // no-cross NUMA stealing
// block all cores of requested number of NUMA-domains
hpx::util::format("hpx.cores={}", numa_nodes * num_cores),
hpx::util::format("hpx.os_threads={}", numa_nodes * pus.second)
// hpx::util::format("hpx.cores={}", numa_nodes * num_cores),
// hpx::util::format("hpx.os_threads={}", numa_nodes * pus.second)
};

std::string node_name("numanode");
Expand All @@ -605,8 +605,9 @@ int main(int argc, char* argv[])
pus.second-1 // core:0-%d
);
}
cfg.push_back(bind_desc);
// cfg.push_back(bind_desc);

// return hpx::init();
return hpx::init(desc_commandline, argc, argv, cfg);
}

Expand Down
7 changes: 3 additions & 4 deletions hpx/lcos/local/latch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace hpx { namespace lcos { namespace local
/// Postconditions: counter_ == count.
///
explicit latch(std::ptrdiff_t count)
: mtx_(), cond_(), notified_(count == 0), counter_(count)
: mtx_(), cond_(), counter_(count), notified_(count == 0)
{
}

Expand Down Expand Up @@ -184,12 +184,11 @@ namespace hpx { namespace lcos { namespace local
notified_ = false;
}

private:
protected:
mutable util::cache_line_data<mutex_type> mtx_;
mutable util::cache_line_data<local::detail::condition_variable> cond_;
bool notified_;
protected:
std::atomic<std::ptrdiff_t> counter_;
bool notified_;
};
}}}

Expand Down
Loading

0 comments on commit d2ce0fc

Please sign in to comment.