Skip to content

Commit

Permalink
Merge branch 'develop' of git.nic.uoregon.edu:/gitroot/xpress-apex in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
khuck committed Mar 25, 2020
2 parents 69f1fa2 + 3b0ce62 commit fa02032
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 38 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ build_*
test
doc/webdocs/site
install*
rapidjson
*.swp
regression*
*.sh
*DS_Store
concurrentqueue
perfstubs
rapidjson
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ include(GitExternal)
git_external(concurrentqueue
https://github.com/cameron314/concurrentqueue.git
master
VERBOSE)
VERBOSE NO_UPDATE)

find_file(
CONCURRENTQUEUE_HEADER
Expand Down Expand Up @@ -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}")
Expand Down
28 changes: 14 additions & 14 deletions cmake/Modules/GitExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion etc/buildbot.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions etc/buildbot_hpx.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 12 additions & 2 deletions etc/maketag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
33 changes: 17 additions & 16 deletions src/apex/apex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1585,20 +1585,21 @@ 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
<< std::endl;
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) {
Expand All @@ -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<int>();
performance_counter c = counter.second;
counter_value cv = c.get_counter_value(hpx::launch::sync);
const int value = cv.get_value<int>();
sample_value(name, value);
}
}
Expand All @@ -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<int>();
counter_value cv = counter.get_counter_value(hpx::launch::sync);
const int value = cv.get_value<int>();
sample_value(counter_name, value);
} catch(hpx::exception const & /*e*/) {
std::cerr << "Error: unable to start HPX counter: " <<
Expand Down
2 changes: 1 addition & 1 deletion src/apex/apex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, hpx::naming::id_type> registered_counters;
std::unordered_map<std::string, hpx::performance_counters::performance_counter> registered_counters;
int setup_runtime_counter(const std::string & counter_name);
void query_runtime_counters(void);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/apex/perftool_implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdlib.h>
#include "apex.h"
#include "thread_instance.hpp"
Expand Down

0 comments on commit fa02032

Please sign in to comment.