diff --git a/.gitignore b/.gitignore index 51f72e78..2e0e3ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,10 @@ build_* test doc/webdocs/site install* -rapidjson *.swp regression* *.sh *DS_Store concurrentqueue +perfstubs +rapidjson diff --git a/CMakeLists.txt b/CMakeLists.txt index 91db5eb2..a8b9dfde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -654,7 +654,7 @@ include(GitExternal) git_external(concurrentqueue https://github.com/cameron314/concurrentqueue.git master - VERBOSE) + VERBOSE NO_UPDATE) find_file( CONCURRENTQUEUE_HEADER @@ -682,7 +682,7 @@ find_file( if(PERFSTUBS_HEADER) message(INFO " Found perfstubs at ${PROJECT_SOURCE_DIR}/perfstubs") - include_directories(${PROJECT_SOURCE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/perfstubs) else() message(FATAL_ERROR " perfstubs not found. This should have been checked out automatically. " "Try manually check out https://github.com/khuck/perfstubs.git to ${PROJECT_SOURCE_DIR}") diff --git a/cmake/Modules/GitExternal.cmake b/cmake/Modules/GitExternal.cmake index 9eb87d6f..862e779f 100644 --- a/cmake/Modules/GitExternal.cmake +++ b/cmake/Modules/GitExternal.cmake @@ -19,12 +19,12 @@ # # [optional] Flags which control behaviour # NO_UPDATE -# When set, GitExternal will not change a repo that has already been checked out. -# The purpose of this is to allow one to set a default branch to be checked out, -# but stop GitExternal from changing back to that branch if the user has checked +# When set, GitExternal will not change a repo that has already been checked out. +# The purpose of this is to allow one to set a default branch to be checked out, +# but stop GitExternal from changing back to that branch if the user has checked # out and is working on another. -# VERBOSE -# When set, displays information about git commands that are executed +# VERBOSE +# When set, displays information about git commands that are executed # find_package(Git) @@ -101,15 +101,15 @@ function(GIT_EXTERNAL DIR REPO TAG) endif() # update tag -# GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD") -# execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD -# RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT -# WORKING_DIRECTORY "${DIR}") -# if(RESULT) -# message(STATUS "git rebase failed, aborting ${DIR} merge") -# execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort -# WORKING_DIRECTORY "${DIR}") -# endif() + GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD") + execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD + RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT + WORKING_DIRECTORY "${DIR}") + if(RESULT) + message(STATUS "git rebase failed, aborting ${DIR} merge") + execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort + WORKING_DIRECTORY "${DIR}") + endif() endif() else() diff --git a/etc/buildbot.sh b/etc/buildbot.sh index 9bd45e08..ed80c9e8 100755 --- a/etc/buildbot.sh +++ b/etc/buildbot.sh @@ -1,6 +1,9 @@ #!/bin/bash #set -x # echo all commands +source /usr/local/spack/share/spack/setup-env.sh +spack load cmake + my_readlink() { TARGET=$1 @@ -39,7 +42,7 @@ yes_otf=" -DUSE_OTF2=TRUE -DOTF2_ROOT=/usr/local/otf2/2.1" yes_ompt=" -DUSE_OMPT=TRUE -DOMPT_ROOT=/usr/local/ompt/5.0" #yes_mpi=" -DUSE_MPI=TRUE -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx" yes_mpi=" -DUSE_MPI=TRUE" -yes_papi=" -DUSE_PAPI=TRUE -DPAPI_ROOT=/usr/local/papi/5.5.0" +yes_papi=" -DUSE_PAPI=TRUE -DPAPI_ROOT=/usr" yes_tau=" -DUSE_TAU=TRUE -DTAU_ROOT=/usr/local/tau/git -DTAU_ARCH=x86_64 -DTAU_OPTIONS=-pthread" # set defaults diff --git a/etc/buildbot_hpx.sh b/etc/buildbot_hpx.sh index 428761a8..bc758ed4 100755 --- a/etc/buildbot_hpx.sh +++ b/etc/buildbot_hpx.sh @@ -1,6 +1,9 @@ #!/bin/bash #set -x # echo all commands +source /usr/local/spack/share/spack/setup-env.sh +spack load cmake + my_readlink() { TARGET=$1 diff --git a/etc/maketag.sh b/etc/maketag.sh index 7b24b300..d0ecd65e 100755 --- a/etc/maketag.sh +++ b/etc/maketag.sh @@ -3,8 +3,18 @@ git checkout master git merge develop -if [ -z ${oldtag+x} ]; then echo "oldtag is unset"; else echo "oldtag is set to '$oldtag'"; fi -if [ -z ${tagname+x} ]; then echo "tagname is unset"; else echo "tagname is set to '$tagname'"; fi +if [ -z ${oldtag+x} ]; then + echo "oldtag is unset"; + kill -INT $$ +else + echo "oldtag is set to '$oldtag'"; +fi +if [ -z ${tagname+x} ]; then + echo "tagname is unset"; + kill -INT $$ +else + echo "tagname is set to '$tagname'"; +fi echo "Commit Log:" >> ${tagname}.txt diff --git a/src/apex/apex.cpp b/src/apex/apex.cpp index b61c2776..e7d725a7 100644 --- a/src/apex/apex.cpp +++ b/src/apex/apex.cpp @@ -1585,10 +1585,11 @@ int apex::setup_runtime_counter(const std::string & counter_name) { if(get_hpx_runtime_ptr() != nullptr) { using hpx::naming::id_type; using hpx::performance_counters::get_counter; - using hpx::performance_counters::stubs::performance_counter; + using hpx::performance_counters::performance_counter; using hpx::performance_counters::counter_value; try { - id_type id = get_counter(counter_name); + performance_counter counter(counter_name); + /* if (id == hpx::naming::invalid_id) { if (instance()->get_node_id() == 0 && !messaged) { std::cerr << "Error: invalid HPX counter: " << counter_name @@ -1596,9 +1597,9 @@ int apex::setup_runtime_counter(const std::string & counter_name) { messaged = true; } return APEX_ERROR; - } - performance_counter::start(hpx::launch::sync, id); - registered_counters.emplace(std::make_pair(counter_name, id)); + }*/ + counter.start(hpx::launch::sync); + registered_counters.emplace(std::make_pair(counter_name, counter)); //std::cout << "Started counter " << counter_name << std::endl; } catch(hpx::exception const & /*e*/) { if (instance()->get_node_id() == 0) { @@ -1615,14 +1616,13 @@ void apex::query_runtime_counters(void) { if (instance()->get_node_id() > 0) {return;} using hpx::naming::id_type; using hpx::performance_counters::get_counter; - using hpx::performance_counters::stubs::performance_counter; + using hpx::performance_counters::performance_counter; using hpx::performance_counters::counter_value; for (auto counter : registered_counters) { string name = counter.first; - id_type id = counter.second; - counter_value value1 = - performance_counter::get_value(hpx::launch::sync, id); - const int value = value1.get_value(); + performance_counter c = counter.second; + counter_value cv = c.get_counter_value(hpx::launch::sync); + const int value = cv.get_value(); sample_value(name, value); } } @@ -1635,20 +1635,21 @@ apex_policy_handle * sample_runtime_counter(unsigned long period, const if(get_hpx_runtime_ptr() != nullptr) { using hpx::naming::id_type; using hpx::performance_counters::get_counter; - using hpx::performance_counters::stubs::performance_counter; + using hpx::performance_counters::performance_counter; using hpx::performance_counters::counter_value; - id_type id = get_counter(counter_name); + performance_counter counter(counter_name); + /* if (id == hpx::naming::invalid_id) { std::cerr << "Error: invalid HPX counter: " << counter_name << std::endl; } - performance_counter::start(hpx::launch::sync, id); + */ + counter.start(hpx::launch::sync); handle = register_periodic_policy(period, [=](apex_context const& ctx) -> int { try { - counter_value value1 = - performance_counter::get_value(hpx::launch::sync, id); - const int value = value1.get_value(); + counter_value cv = counter.get_counter_value(hpx::launch::sync); + const int value = cv.get_value(); sample_value(counter_name, value); } catch(hpx::exception const & /*e*/) { std::cerr << "Error: unable to start HPX counter: " << diff --git a/src/apex/apex.hpp b/src/apex/apex.hpp index fc895028..758b40d4 100644 --- a/src/apex/apex.hpp +++ b/src/apex/apex.hpp @@ -124,7 +124,7 @@ class apex #ifdef APEX_HAVE_HPX void set_hpx_runtime(hpx::runtime * hpx_runtime); hpx::runtime * get_hpx_runtime(void); - std::unordered_map registered_counters; + std::unordered_map registered_counters; int setup_runtime_counter(const std::string & counter_name); void query_runtime_counters(void); #endif diff --git a/src/apex/perftool_implementation.cpp b/src/apex/perftool_implementation.cpp index 62292863..61513c8f 100644 --- a/src/apex/perftool_implementation.cpp +++ b/src/apex/perftool_implementation.cpp @@ -4,7 +4,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#include "perfstubs/perfstubs_api/tool.h" +#include "perfstubs_api/tool.h" #include #include "apex.h" #include "thread_instance.hpp"