Skip to content

Commit c84876a

Browse files
committed
move tools. change some chain_complex internals..
1 parent db69d23 commit c84876a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+412
-183
lines changed

.gitignore

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
1+
**/test_multi
2+
deps
3+
distributed/distributed_persistence
4+
ctl/chain_complex/tm
5+
ctl/cube/test_cube
6+
ctl/distributed/distributed_persistence_serial
7+
tools/vr
8+
tools/ngraph
19
ctl/vr/incremental_test
210
ctl/vr/test
311
tools/convert_asc_format
412
tools/ctl2phat
513
doc/doxygen/*
6-
ctl/tools/convert_asc_format
7-
ctl/tools/ctl2phat
14+
tools/convert_asc_format
15+
tools/ctl2phat
816
doc/doxygen/*
917
ctl/distributed/distributed_persistence
1018
Doxyfile
11-
ctl/tools/distributed_persistence
19+
tools/distributed_persistence
1220
examples/
13-
ctl/tools/cover_homology
14-
ctl/tools/concurrent_homology
15-
ctl/tools/write_filtration
21+
tools/cover_homology
22+
tools/concurrent_homology
23+
tools/write_filtration
1624
cover_test
1725
bin/
1826
include/
1927
install_manifest.txt
20-
ctl/tools/gpcover
28+
tools/gpcover
2129
ctl/parallel/build_blowup_complex/blowup_test
2230
ctl/product_cell/test_product_cell
23-
ctl/tools/metowgh
24-
ctl/tools/oneskeleton
25-
ctl/tools/wghtomet
26-
ctl/tools/complex_size
27-
ctl/tools/persistence
31+
tools/metowgh
32+
tools/oneskeleton
33+
tools/wghtomet
34+
tools/complex_size
35+
tools/persistence
2836
build_clique
2937
duplicate
3038
euler

CMakeLists.txt

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,65 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
99
endif()
1010
endif()
1111

12-
set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
12+
set(CMAKE_BUILD_TYPE Release)
13+
add_definitions(" -fno-omit-frame-pointer -Wall -ansi -std=c++11")
1314

1415
set(CTL_INCLUDE_INSTALL_DIR ${CMAKE_SOURCE_DIR}/include)
1516
set(CTL_DOC_INSTALL_DIR ${CMAKE_SOURCE_DIR}/doc)
1617
set(CTL_BIN_INSTALL_DIR ${CMAKE_SOURCE_DIR}/bin)
1718
set(CTL_EXAMPLES_INSTALL_DIR ${CMAKE_SOURCE_DIR}/examples)
1819
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules")
20+
set(CMAKE_PREFIX_PATH /usr/lib64/openmpi)
21+
1922
if (NOT APPLE)
2023
set(DSO_FIXES rt)
2124
endif (NOT APPLE)
2225

23-
find_package( ANN REQUIRED)
24-
find_package(Boost COMPONENTS program_options serialization MPI REQUIRED)
25-
message( "Boost_LIBRARIES = " ${Boost_LIBRARIES})
26-
include_directories(/usr/local/inlcude ${ANN_INCLUDE_DIRS})
27-
link_directories(/usr/local/lib ${ANN_LIBRARY_DIR} ${Boost_LIBRARY_DIR})
28-
29-
set(Boost_USE_MULTITHREADED ON)
30-
add_definitions(" -fno-omit-frame-pointer -Wall -ansi -std=c++11")
31-
26+
find_package(Boost COMPONENTS program_options serialization mpi REQUIRED)
27+
find_package(MPI REQUIRED)
28+
find_package(ANN REQUIRED)
3229
find_package(TBB REQUIRED)
3330
find_package(METIS REQUIRED)
3431
find_package(Doxygen)
32+
33+
set(GTEST_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/gtest/include)
34+
message( ${GTEST_INCLUDE_DIR})
35+
set(GTEST_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/gtest)
36+
set(GTEST_LIBRARIES gtest gtest_main)
37+
3538
if(DOXYGEN_FOUND)
36-
configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY)
37-
add_custom_target(doc
38-
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
39+
configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
40+
${CMAKE_BINARY_DIR}/Doxyfile @ONLY)
41+
add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
3942
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
4043
COMMENT "Generating API documentation with Doxygen" VERBATIM
4144
)
4245
endif(DOXYGEN_FOUND)
4346

47+
add_custom_target(deps COMMAND cmake . COMMAND make
48+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps)
4449

4550
include_directories(${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIR})
51+
include_directories(/usr/local/include ${MPI_INCLUDE_DIR})
52+
include_directories(${ANN_INCLUDE_DIRS} ${GTEST_INCLUDE_DIR})
4653
include_directories(${METIS_INCLUDE_DIR} ${TBB_INCLUDE_DIR})
4754

55+
link_directories(/usr/local/lib ${ANN_LIBRARY_DIR} ${Boost_LIBRARY_DIR})
56+
link_directories( ${MPI_LIBRARY_DIR} ${GTEST_LIBRARY_DIR})
4857
link_directories(/usr/local/lib ${Boost_LIBRARY_DIR})
4958
link_directories(${METIS_LIBRARY_DIR} ${TBB_LIBRARY_DIR})
5059

5160
add_subdirectory( ctl)
61+
add_subdirectory( tools)
62+
#add_subdirectory( distributed)
5263

5364
install( DIRECTORY ${CMAKE_SOURCE_DIR}/ctl
5465
DESTINATION include
5566
FILES_MATCHING PATTERN "*.h"
5667
PATTERN "CMakeFiles" EXCLUDE)
5768

58-
install( DIRECTORY ${CMAKE_SOURCE_DIR}/ctl
59-
DESTINATION share/ctl/examples
69+
install( DIRECTORY ${CMAKE_SOURCE_DIR}/tools
70+
DESTINATION share/ctl/tools
6071
FILES_MATCHING PATTERN "*.cpp"
6172
PATTERN "CMakeLists.txt"
6273
PATTERN "CMakeFiles" EXCLUDE)

README

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ CTL is BSD See LICENSE for more info.
1313

1414
=== DEPENDENCIES ==
1515
C++11 compiler (clang or gcc)
16-
Boost
16+
Boost with MPI
1717
Intel's TBB
1818
METIS (graph partitioning)
19-
ANN (soon)
19+
ANN
20+
MPI
21+
Doxygen (Optional)
2022

2123
=== BUILDING ====
2224
To build the library type:

ctl/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ add_subdirectory( chain)
55
add_subdirectory( chain_complex)
66
add_subdirectory( finite_field)
77
add_subdirectory( filtration)
8-
add_subdirectory( tools)
98
add_subdirectory( product_cell)
109
add_subdirectory( parallel)
1110
add_subdirectory( vr)

ctl/chain_complex/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
#include_directories(${CMAKE_SOURCE_DIR})
2-
add_executable(tc test_chain_complex.cpp)
3-
add_executable(tm test_multi_array.cpp)
1+
add_subdirectory( tests)

ctl/chain_complex/chain_complex.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
#include <ctl/hash/hash.h>
5757
#include <ctl/chain_complex/detail/data_wrapper.h>
5858
#include <ctl/chain_complex/detail/default_complex_storage.h>
59-
#include <ctl/chain_complex/detail/cubical_complex.h>
60-
#include <ctl/chain_complex/detail/generic_complex.h>
59+
#include <ctl/chain_complex/cubical_complex.h>
60+
#include <ctl/chain_complex/simplicial_chain_complex.h>
6161

6262
namespace ctl {
6363

@@ -135,18 +135,17 @@ typename std::conditional<
135135
std::is_same< typename detail::recombine< Cell, detail::Dummy>::type,
136136
ctl::Cube< detail::Dummy> >::value,
137137
//then we create a Cubical_complex which optimizes storage.
138-
ctl::detail::Cubical_complex< Cell,
139-
Boundary,
140-
detail::Data_wrapper< Data>,
141-
Hash,
142-
Storage
143-
>,
138+
ctl::Cubical_complex< Cell,
139+
Boundary,
140+
Data,
141+
Hash,
142+
Storage>,
144143
//Otherwise all other cell types are stored generically
145-
ctl::detail::Generic_complex< Cell,
146-
Boundary,
147-
detail::Data_wrapper< Data>,
148-
Hash,
149-
Storage>
144+
ctl::Simplicial_chain_complex< Cell,
145+
Boundary,
146+
detail::Data_wrapper< Data>,
147+
Hash,
148+
Storage>
150149
>::type;
151150

152151
//! Utility to read a complex and any associated data

0 commit comments

Comments
 (0)