Skip to content

Commit

Permalink
Merge branch 'master' into fixing_1644
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jul 17, 2015
2 parents 69127fe + 9b300fa commit 4534ce8
Show file tree
Hide file tree
Showing 108 changed files with 953 additions and 293 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ endif()
# C++ overrides
################################################################################
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
"${CMAKE_SOURCE_DIR}/cmake/HPX_CXXOverrides.cmake")
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/HPX_CXXOverrides.cmake")

################################################################################
# Fortran overrides
################################################################################
set(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran
"${CMAKE_SOURCE_DIR}/cmake/HPX_FortranOverrides.cmake")
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/HPX_FortranOverrides.cmake")

################################################################################
# Build type (needs to be handled before project command below)
Expand Down Expand Up @@ -1355,7 +1355,7 @@ install( # Install HPX Python scripts
PATTERN ".git" EXCLUDE)

# if(UNIX)
# file(GLOB scripts "${CMAKE_SOURCE_DIR}/python/scripts/*.py")
# file(GLOB scripts "${PROJECT_SOURCE_DIR}/python/scripts/*.py")
# execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory
# "${CMAKE_BINARY_DIR}/python/scripts" )
# foreach(script ${scripts})
Expand Down Expand Up @@ -1384,7 +1384,7 @@ install( # Install HPX Python scripts
#
# execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_BINARY_DIR}/python" )
# #make symlink, so that we have intact hpx symlink in CMAKE_BINARY_DIR
# execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_SOURCE_DIR}/python/hpx"
# execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${PROJECT_SOURCE_DIR}/python/hpx"
# "hpx-${HPX_VERSION}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python")
# # create a symlink in share pointing to the latest HPX installation
# execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "hpx-${HPX_VERSION}" "hpx" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python")
Expand Down
10 changes: 5 additions & 5 deletions cmake/HPX_AddConfigTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro(add_hpx_config_test variable)
cmake_parse_arguments(${variable} "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

if(NOT DEFINED ${variable})
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests")
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests")

string(TOUPPER "${variable}" variable_lc)
if(${variable}_FILE)
Expand All @@ -24,11 +24,11 @@ macro(add_hpx_config_test variable)
endif()
else()
set(test_source
"${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests/${variable_lc}.cpp")
"${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests/${variable_lc}.cpp")
file(WRITE "${test_source}"
"${${variable}_SOURCE}\n")
endif()
set(test_binary ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests/${variable_lc})
set(test_binary ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests/${variable_lc})

get_directory_property(CONFIG_TEST_INCLUDE_DIRS INCLUDE_DIRECTORIES)
get_directory_property(CONFIG_TEST_LINK_DIRS LINK_DIRECTORIES)
Expand All @@ -48,7 +48,7 @@ macro(add_hpx_config_test variable)
if(${variable}_EXECUTE)
if(NOT CMAKE_CROSSCOMPILING)
try_run(${variable}_RUN_RESULT ${variable}_COMPILE_RESULT
${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests
${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests
${test_source}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${CONFIG_TEST_INCLUDE_DIRS}"
Expand All @@ -67,7 +67,7 @@ macro(add_hpx_config_test variable)
endif()
else()
try_compile(${variable}_RESULT
${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests
${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/config_tests
${test_source}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${CONFIG_TEST_INCLUDE_DIRS}"
Expand Down
20 changes: 20 additions & 0 deletions cmake/HPX_AddPseudoDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ macro(add_hpx_pseudo_dependencies)
hpx_debug("add_hpx_pseudo_dependencies" ${args})
endif()

if(HPX_WITH_PSEUDO_DEPENDENCIES)
set(shortened_args)
foreach(arg ${ARGV})
shorten_hpx_pseudo_target(${arg} shortened_arg)
set(shortened_args ${shortened_args} ${shortened_arg})
endforeach()
add_dependencies(${shortened_args})
endif()
endmacro()

macro(add_hpx_pseudo_dependencies_no_shortening)

if("${HPX_CMAKE_LOGLEVEL}" MATCHES "DEBUG|debug|Debug")
set(args)
foreach(arg ${ARGV})
set(args "${args} ${arg}")
endforeach()
hpx_debug("add_hpx_pseudo_dependencies" ${args})
endif()

if(HPX_WITH_PSEUDO_DEPENDENCIES)
add_dependencies(${ARGV})
endif()
Expand Down
8 changes: 7 additions & 1 deletion cmake/HPX_AddPseudoTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ set(HPX_ADDPSEUDOTARGET_LOADED TRUE)
macro(add_hpx_pseudo_target)
hpx_debug("add_hpx_pseudo_target" "adding pseudo target: ${ARGV}")
if(HPX_WITH_PSEUDO_DEPENDENCIES)
add_custom_target(${ARGV})
set(shortened_args)
foreach(arg ${ARGV})
shorten_hpx_pseudo_target(${arg} shortened_arg)
set(shortened_args ${shortened_args} ${shortened_arg})
endforeach()
hpx_debug("add_hpx_pseudo_target" "adding shortened pseudo target: ${shortened_args}")
add_custom_target(${shortened_args})
endif()
endmacro()

25 changes: 25 additions & 0 deletions cmake/HPX_ShortenPseudoTarget.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2015 Hartmut Kaiser
#
# 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)

set(HPX_SHORTENPSEUDOTARGET_LOADED TRUE)

macro(shorten_hpx_pseudo_target target shortened_target)
hpx_debug("shorten_hpx_pseudo_target" "shortening pseudo target: ${target}")
if(WIN32)
set(args)
foreach(arg ${target})
# convert to a list
string(REPLACE "." ";" elements ${arg})
# retrieve last element of target to be used as shortened target name
list(GET elements -1 arg)
set(args ${args} ${arg})
endforeach()
set(${shortened_target} ${args})
hpx_debug("shorten_hpx_pseudo_target" "shortened pseudo target: ${${shortened_target}}")
else()
set(${shortened_target} ${target})
endif()
endmacro()

1 change: 1 addition & 0 deletions cmake/HPX_Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ hpx_include(
AddTest
AddPseudoDependencies
AddPseudoTarget
ShortenPseudoTarget
AddLibrarySources
AddLibraryHeaders
AddSourceGroup
Expand Down
6 changes: 4 additions & 2 deletions cmake/templates/HPXConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# 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)

# include exported targets
include("${CMAKE_CURRENT_LIST_DIR}/HPXTargets.cmake")
# include exported targets if not already defined
if (NOT TARGET hpx)
include("${CMAKE_CURRENT_LIST_DIR}/HPXTargets.cmake")
endif()

# include HPX cmake utilities
include("${CMAKE_CURRENT_LIST_DIR}/HPXMacros.cmake")
Expand Down
1 change: 1 addition & 0 deletions docs/manual/commandline.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ described in the table below:
application startup (default: 1)]]
[[`--hpx:node arg`] [number of the node this locality is run on
(must be unique)]]
[[`--hpx:ignore-batch-env`] [ignore batch environment variables]]
[[`--hpx:pu-offset`] [the first processing unit this instance of __hpx__ should be
run on (default: 0), valid for
`--hpx:queuing=local`, `--hpx:queuing=abp-priority`,
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// do all the work on 'nx' data points for 'nt' time steps
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_1_omp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// do all the work on 'nx' data points for 'nt' time steps
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// do all the work on 'nx' data points for 'nt' time steps
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_3_omp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_4_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all elements
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all elements
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ struct stepper
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

//[stepper_7
Expand Down
2 changes: 1 addition & 1 deletion examples/1d_stencil/1d_stencil_8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ struct stepper_server : hpx::components::simple_component_base<stepper_server>
// Our operator
static double heat(double left, double middle, double right)
{
return middle + (k*dt/dx*dx) * (left - 2*middle + right);
return middle + (k*dt/(dx*dx)) * (left - 2*middle + right);
}

// The partitioned operator, it invokes the heat operator above on all
Expand Down
2 changes: 1 addition & 1 deletion examples/async_io/CMakeLists.txt
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)

set(example_programs
async_io
async_io_simple
async_io_action
async_io_external
async_io_low_level)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/cancelable_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_hpx_executable(cancelable_action_client
FOLDER "Examples/CancelableAction")

# add a custom target for this example
add_hpx_pseudo_target(examples.cancelable_action.cancelable_action)
#add_hpx_pseudo_target(examples.cancelable_action.cancelable_action)

# make pseudo-targets depend on master pseudo-target
add_hpx_pseudo_dependencies(examples examples.cancelable_action)
Expand Down
4 changes: 2 additions & 2 deletions examples/future_reduce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set(example_programs
if(Boost_RANDOM_FOUND AND HPX_WITH_CXX11_LAMBDAS)
set(example_programs
${example_programs}
future_reduce)
set(future_reduce_FLAGS DEPENDENCIES iostreams_component)
rnd_future_reduce)
set(rnd_future_reduce_FLAGS DEPENDENCIES iostreams_component)
endif()

foreach(example_program ${example_programs})
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions examples/jacobi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ if(HPX_WITH_CXX11_LAMBDAS)
FOLDER "Examples/Jacobi")

# add a custom target for this example
add_hpx_pseudo_target(examples.jacobi.jacobi)
add_hpx_pseudo_target(examples.jacobi.jacobi_simple)

# make pseudo-targets depend on master pseudo-target
add_hpx_pseudo_dependencies(examples.jacobi
examples.jacobi.jacobi)
examples.jacobi.jacobi_simple)

# add dependencies to pseudo-target
add_hpx_pseudo_dependencies(examples.jacobi.jacobi
add_hpx_pseudo_dependencies(examples.jacobi.jacobi_simple
jacobi_exe)

endif()
6 changes: 3 additions & 3 deletions examples/queue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ add_hpx_executable(queue_client
SOURCES queue_client.cpp
FOLDER "Examples/Quickstart/Queue")

add_hpx_pseudo_target(examples.queue.queue)
add_hpx_pseudo_dependencies(examples.queue examples.queue.queue)
add_hpx_pseudo_dependencies(examples.queue.queue queue_client_exe)
add_hpx_pseudo_target(examples.queue.queue_client)
add_hpx_pseudo_dependencies(examples.queue examples.queue.queue_client)
add_hpx_pseudo_dependencies(examples.queue.queue_client queue_client_exe)


6 changes: 3 additions & 3 deletions examples/random_mem_access/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ foreach(subdir ${subdirs})
FOLDER "Examples/RandomMemoryAccess/random_mem_access")

# add a custom target for this example
add_hpx_pseudo_target(examples.random_mem_access.${subdir})
add_hpx_pseudo_target(examples.random_mem_access.${subdir}_dir)

# make pseudo-targets depend on master pseudo-target
add_hpx_pseudo_dependencies(examples.random_mem_access
examples.random_mem_access.${subdir})
examples.random_mem_access.${subdir}_dir)

# add dependencies to pseudo-target
add_hpx_pseudo_dependencies(examples.random_mem_access.${subdir}
add_hpx_pseudo_dependencies(examples.random_mem_access.${subdir}_dir
${subdir}_client_exe)
endforeach()

2 changes: 1 addition & 1 deletion examples/spell_check/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

set(example_programs
spell_check
spell_check_simple
spell_check_file
)

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions examples/throttle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ foreach(subdir ${subdirs})
FOLDER "Examples/Throttle")

# add a custom target for this example
add_hpx_pseudo_target(examples.throttle.${subdir})
add_hpx_pseudo_target(examples.throttle.${subdir}_dir)

# make pseudo-targets depend on master pseudo-target
add_hpx_pseudo_dependencies(examples.throttle
examples.throttle.${subdir})
examples.throttle.${subdir}_dir)

# add dependencies to pseudo-target
add_hpx_pseudo_dependencies(examples.throttle.${subdir}
add_hpx_pseudo_dependencies(examples.throttle.${subdir}_dir
${subdir}_client_exe)
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion examples/transpose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(example_programs
transpose_serial_block
transpose_smp
transpose_smp_block
transpose
transpose_block
transpose_serial_vector
)

Expand Down
File renamed without changes.

0 comments on commit 4534ce8

Please sign in to comment.