|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53272 - in trunk/libs/graph_parallel: . example src test
From: ngedmond_at_[hidden]
Date: 2009-05-25 23:12:32
Author: ngedmond
Date: 2009-05-25 23:12:31 EDT (Mon, 25 May 2009)
New Revision: 53272
URL: http://svn.boost.org/trac/boost/changeset/53272
Log:
Updated CMake build system to match updated Boost.MPI build files. All tests now build and run, examples do not currently build though if the directory is added to the build a CMakeLists.txt file is present.
Text files modified:
trunk/libs/graph_parallel/CMakeLists.txt | 10 +
trunk/libs/graph_parallel/example/CMakeLists.txt | 4
trunk/libs/graph_parallel/src/CMakeLists.txt | 8 -
trunk/libs/graph_parallel/test/CMakeLists.txt | 193 ++++++++++++++++++++-------------------
4 files changed, 109 insertions(+), 106 deletions(-)
Modified: trunk/libs/graph_parallel/CMakeLists.txt
==============================================================================
--- trunk/libs/graph_parallel/CMakeLists.txt (original)
+++ trunk/libs/graph_parallel/CMakeLists.txt 2009-05-25 23:12:31 EDT (Mon, 25 May 2009)
@@ -4,12 +4,18 @@
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-# Add a library target to the build system
+FIND_PACKAGE(MPI)
+
+if (NOT MPI_FOUND)
+ message(STATUS "MPI Not Found")
+endif (NOT MPI_FOUND)
+
+
boost_library_project(
graph_parallel
SRCDIRS src
TESTDIRS test
-# HEADERS graph graph/parallel
+ # HEADERS graph graph/parallel
# DOCDIRS doc
DESCRIPTION "Parallel support using MPI for Boost.Graph."
AUTHORS "Douglas Gregor <doug.gregor -at- gmail.com>"
Modified: trunk/libs/graph_parallel/example/CMakeLists.txt
==============================================================================
--- trunk/libs/graph_parallel/example/CMakeLists.txt (original)
+++ trunk/libs/graph_parallel/example/CMakeLists.txt 2009-05-25 23:12:31 EDT (Mon, 25 May 2009)
@@ -16,7 +16,7 @@
if (BUILD_TESTING)
add_test(breadth_first_search
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS}
- "${EXECUTABLE_OUTPUT_PATH}/\${CTEST_CONFIGURATION_TYPE}/breadth_first_search"
+ "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tests/${PROJECT_NAME}/breadth_first_search"
${MPIEXEC_POSTFLAGS}
"${CMAKE_CURRENT_SOURCE_DIR}/weighted_graph.gr"
"${CMAKE_BINARY_DIR}/test/weighted_graph-bfs.gr")
@@ -34,7 +34,7 @@
if (BUILD_TESTING)
add_test(dijkstra_shortest_paths
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS}
- "${EXECUTABLE_OUTPUT_PATH}/\${CTEST_CONFIGURATION_TYPE}/dijkstra_shortest_paths"
+ "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tests/${PROJECT_NAME}/dijkstra_shortest_paths"
${MPIEXEC_POSTFLAGS}
"${CMAKE_CURRENT_SOURCE_DIR}/weighted_graph.gr"
"${CMAKE_BINARY_DIR}/test/weighted_graph-dijkstra.gr")
Modified: trunk/libs/graph_parallel/src/CMakeLists.txt
==============================================================================
--- trunk/libs/graph_parallel/src/CMakeLists.txt (original)
+++ trunk/libs/graph_parallel/src/CMakeLists.txt 2009-05-25 23:12:31 EDT (Mon, 25 May 2009)
@@ -11,9 +11,8 @@
add_definitions(-GR-)
endif (MSVC)
-FIND_PACKAGE(MPI)
if (MPI_FOUND)
- message(STATUS "MPI found")
+
# Add Boost.MPI link and add parallel source files
include_directories(${MPI_INCLUDE_PATH})
@@ -23,8 +22,5 @@
DEPENDS boost_mpi
SHARED_COMPILE_FLAGS "-DBOOST_GRAPH_DYN_LINK=1"
)
-endif (MPI_FOUND)
-if (NOT MPI_FOUND)
- message(STATUS "MPI Not Found")
-endif (NOT MPI_FOUND)
+endif (MPI_FOUND)
Modified: trunk/libs/graph_parallel/test/CMakeLists.txt
==============================================================================
--- trunk/libs/graph_parallel/test/CMakeLists.txt (original)
+++ trunk/libs/graph_parallel/test/CMakeLists.txt 2009-05-25 23:12:31 EDT (Mon, 25 May 2009)
@@ -4,116 +4,117 @@
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-FIND_PACKAGE(MPI)
if (MPI_FOUND)
-message(STATUS "MPI Found")
-boost_additional_test_dependencies(graph_parallel BOOST_DEPENDS test mpi filesystem system)
+ boost_additional_test_dependencies(graph_parallel BOOST_DEPENDS test mpi filesystem system)
-include_directories(${MPI_INCLUDE_PATH})
+ include_directories(${MPI_INCLUDE_PATH})
+
+ # Declare a test for the Boost.MPI library, which may involve both
+ # building the test and executing it with varying numbers of
+ # processes. Edited to become boost_graph_parallel_test, with a different
+ # default number of processors.
+ #
+ # boost_graph_parallel_test(testname
+ # [source1 source2 ...]
+ # [ARGS arg1 arg2 ...]
+ # [SCHEDULE procs1 procs2 ...]
+ #
+ # testname is the name of the test. source1, source2, etc. are the
+ # source files that will be built and linked into the test
+ # executable. If no source files are provided, the file "testname.cpp"
+ # will be used instead.
+ macro(boost_graph_parallel_test testname)
+ PARSE_ARGUMENTS(MPI_TEST "NUMPROCS;ARGS" "" ${ARGN})
+
+ # Determine the test sources
+ if (MPI_TEST_DEFAULT_ARGS)
+ set(MPI_TEST_SOURCES ${MPI_TEST_DEFAULT_ARGS})
+ else (MPI_TEST_DEFAULT_ARGS)
+ set(MPI_TEST_SOURCES "${testname}.cpp")
+ endif (MPI_TEST_DEFAULT_ARGS)
+
+ set(THIS_TEST_LOCATION tests/${PROJECT_NAME}/${testname})
+
+ # Build the test executable
+ boost_add_executable(${testname}
+ ${MPI_TEST_SOURCES}
+ OUTPUT_NAME ${THIS_TEST_LOCATION}
+ NO_INSTALL
+ DEPENDS boost_graph_parallel boost_system
+ COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
+ LINK_FLAGS "${MPI_LINK_FLAGS}"
+ LINK_LIBS ${MPI_LIBRARIES}
+ SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
-# Declare a test for the Boost.MPI library, which may involve both
-# building the test and executing it with varying numbers of
-# processes. Edited to become boost_graph_parallel_test, with a different
-# default number of processors.
-#
-# boost_graph_parallel_test(testname
-# [source1 source2 ...]
-# [ARGS arg1 arg2 ...]
-# [SCHEDULE procs1 procs2 ...]
-#
-# testname is the name of the test. source1, source2, etc. are the
-# source files that will be built and linked into the test
-# executable. If no source files are provided, the file "testname.cpp"
-# will be used instead.
-macro(boost_graph_parallel_test testname)
- PARSE_ARGUMENTS(MPI_TEST "NUMPROCS;ARGS" "" ${ARGN})
-
- # Determine the test sources
- if (MPI_TEST_DEFAULT_ARGS)
- set(MPI_TEST_SOURCES ${MPI_TEST_DEFAULT_ARGS})
- else (MPI_TEST_DEFAULT_ARGS)
- set(MPI_TEST_SOURCES "${testname}.cpp")
- endif (MPI_TEST_DEFAULT_ARGS)
-
- # Build the test executable
- boost_add_executable(${testname}
- ${MPI_TEST_SOURCES}
- OUTPUT_NAME tests/${PROJECT_NAME}/${testname}
- NO_INSTALL
- DEPENDS boost_graph_parallel boost_system
- COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
- LINK_FLAGS "${MPI_LINK_FLAGS}"
- LINK_LIBS ${MPI_LIBRARIES}
- SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
- # if (THIS_EXE_OKAY)
if (NOT MPI_TEST_NUMPROCS)
set(MPI_TEST_NUMPROCS ${MPIEXEC_MAX_NUMPROCS})
endif (NOT MPI_TEST_NUMPROCS)
foreach(PROCS ${MPI_TEST_NUMPROCS})
- add_test("${PROJECT_NAME}::${testname}-${PROCS}"
+ add_test("${PROJECT_NAME}-${testname}-${PROCS}"
${MPIEXEC}
-n ${PROCS}
- ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/tests/${PROJECT_NAME}/${testname}
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${THIS_TEST_LOCATION}
+ ${MPI_TEST_ARGS}
${BOOST_TEST_ARGS}
)
endforeach(PROCS)
- # endif (THIS_EXE_OKAY)
-endmacro(boost_graph_parallel_test)
-boost_graph_parallel_test(distributed_property_map_test)
-boost_graph_parallel_test(distributed_queue_test)
-boost_graph_parallel_test(process_group_serialization)
-boost_graph_parallel_test(adjlist_build_test)
-boost_graph_parallel_test(adjlist_redist_test)
-boost_graph_parallel_test(adjlist_remove_test NUMPROCS 2)
-boost_graph_parallel_test(distributed_adjacency_list_test)
-boost_graph_parallel_test(distributed_connected_components_test)
-boost_graph_parallel_test(distributed_page_rank_test)
-boost_graph_parallel_test(distributed_csr_test)
-boost_graph_parallel_test(distributed_dfs_test)
-boost_graph_parallel_test(distributed_graph_coloring_test)
-boost_graph_parallel_test(distributed_mst_test)
-boost_graph_parallel_test(distributed_strong_components_test)
-boost_graph_parallel_test(hohberg_biconnected_components_test)
-boost_graph_parallel_test(mesh_generator_test ARGS 1000 1000 1 0)
-boost_graph_parallel_test(named_vertices_seq NUMPROCS 1)
-boost_graph_parallel_test(distributed_shortest_paths_test)
-boost_graph_parallel_test(distributed_csr_algorithm_test NUMPROCS 1)
-boost_graph_parallel_test(distributed_betweenness_centrality_test)
-boost_graph_parallel_test(distributed_dimacs_reader)
-boost_graph_parallel_test(distributed_rmat_cc_ps)
-boost_graph_parallel_test(distributed_rmat_cc)
-boost_graph_parallel_test(distributed_rmat_pagerank)
-
-boost_add_executable(ssca
- ssca.cpp
- OUTPUT_NAME tests/${PROJECT_NAME}/ssca
- NO_INSTALL
- DEPENDS boost_graph_parallel boost_system
- COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
- LINK_FLAGS "${MPI_LINK_FLAGS}"
- LINK_LIBS ${MPI_LIBRARIES}
- SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
-
-boost_add_executable(algorithm_performance
- algorithm_performance.cpp
- OUTPUT_NAME tests/${PROJECT_NAME}/algorithm_performance
- NO_INSTALL
- DEPENDS boost_graph_parallel boost_system
- COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
- LINK_FLAGS "${MPI_LINK_FLAGS}"
- LINK_LIBS ${MPI_LIBRARIES}
- SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
-
-if(NOT MSVC)
- # Due to poor handling of partial ordering of class template partial
- # specializations, we disable these features and tests on Visual C++.
- # Tested with Visual C++ 9 (Microsoft Visual Studio 2008); earlier
- # versions are no better.
- boost_graph_parallel_test(named_vertices_test)
- boost_graph_parallel_test(named_vertices_hash_test)
-endif(NOT MSVC)
+ endmacro(boost_graph_parallel_test)
+
+ boost_graph_parallel_test(distributed_property_map_test)
+ boost_graph_parallel_test(distributed_queue_test)
+ boost_graph_parallel_test(process_group_serialization)
+ boost_graph_parallel_test(adjlist_build_test)
+ boost_graph_parallel_test(adjlist_redist_test)
+ boost_graph_parallel_test(adjlist_remove_test NUMPROCS 2)
+ boost_graph_parallel_test(distributed_adjacency_list_test)
+ boost_graph_parallel_test(distributed_connected_components_test)
+ boost_graph_parallel_test(distributed_page_rank_test)
+ boost_graph_parallel_test(distributed_csr_test)
+ boost_graph_parallel_test(distributed_dfs_test)
+ boost_graph_parallel_test(distributed_graph_coloring_test)
+ boost_graph_parallel_test(distributed_mst_test)
+ boost_graph_parallel_test(distributed_strong_components_test)
+ boost_graph_parallel_test(hohberg_biconnected_components_test)
+ boost_graph_parallel_test(mesh_generator_test ARGS 1000 1000 1 0)
+ boost_graph_parallel_test(named_vertices_seq NUMPROCS 1)
+ boost_graph_parallel_test(distributed_shortest_paths_test)
+ boost_graph_parallel_test(distributed_csr_algorithm_test NUMPROCS 1)
+ boost_graph_parallel_test(distributed_betweenness_centrality_test)
+ boost_graph_parallel_test(distributed_dimacs_reader)
+ boost_graph_parallel_test(distributed_rmat_cc_ps)
+ boost_graph_parallel_test(distributed_rmat_cc)
+ boost_graph_parallel_test(distributed_rmat_pagerank)
+
+ boost_add_executable(ssca
+ ssca.cpp
+ OUTPUT_NAME tests/${PROJECT_NAME}/ssca
+ NO_INSTALL
+ DEPENDS boost_graph_parallel boost_system
+ COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
+ LINK_FLAGS "${MPI_LINK_FLAGS}"
+ LINK_LIBS ${MPI_LIBRARIES}
+ SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
+
+ boost_add_executable(algorithm_performance
+ algorithm_performance.cpp
+ OUTPUT_NAME tests/${PROJECT_NAME}/algorithm_performance
+ NO_INSTALL
+ DEPENDS boost_graph_parallel boost_system
+ COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
+ LINK_FLAGS "${MPI_LINK_FLAGS}"
+ LINK_LIBS ${MPI_LIBRARIES}
+ SHARED_COMPILE_FLAGS "-DBOOST_MPI_DYN_LINK=1")
+
+ if(NOT MSVC)
+ # Due to poor handling of partial ordering of class template partial
+ # specializations, we disable these features and tests on Visual C++.
+ # Tested with Visual C++ 9 (Microsoft Visual Studio 2008); earlier
+ # versions are no better.
+ boost_graph_parallel_test(named_vertices_test)
+ boost_graph_parallel_test(named_vertices_hash_test)
+ endif(NOT MSVC)
endif(MPI_FOUND)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk