Skip to content

Commit 4efb28f

Browse files
committed
Add standalone cluster-sdm application to installation targets.
1 parent 964b983 commit 4efb28f

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 2.8.8)
22
project (sparsehc-dm)
33

4-
if(NOT CMAKE_BUILD_TYPE)
4+
if(NOT CMAKE_BUILD_TYPE)
55
set(CMAKE_BUILD_TYPE Release)
66
endif(NOT CMAKE_BUILD_TYPE)
77

@@ -21,8 +21,8 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
2121

2222
include_directories(src)
2323
file(GLOB SOURCES "src/*.cpp")
24-
add_executable(sparsehc-dm ${SOURCES})
25-
target_link_libraries(sparsehc-dm ${LIBS})
24+
add_executable(cluster-sdm ${SOURCES})
25+
target_link_libraries(cluster-sdm ${LIBS})
2626
add_definitions(-std=c++11)
2727

2828
file(GLOB SHARED_SOURCES src/averagecluster.cpp src/cluster.cpp src/common.cpp src/completecluster.cpp src/dendrogram.cpp src/inmatrix.cpp src/matrix.cpp src/singlecluster.cpp)
@@ -32,4 +32,5 @@ add_dependencies(sparsehc_dm python_init)
3232
target_link_libraries(sparsehc_dm ${LIBS})
3333
set_target_properties(sparsehc_dm PROPERTIES PREFIX "" SUFFIX ".so")
3434

35-
install(CODE "execute_process(COMMAND python ../python/setup.py install --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
35+
install(CODE "execute_process(COMMAND python ../python/setup.py install --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
36+
install(TARGETS cluster-sdm RUNTIME DESTINATION bin)

src/main.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ Dendrogram linkage(InMatrix& mat, const std::string& method) {
3636
// Program main
3737
////////////////////////////////////////////////////////////////////////////////
3838
bool verbose = false;
39-
void test(const unsigned nPoints,const long maxRam=2L*1024*1024*1024)
39+
void test(const unsigned nPoints,const long maxRam=4L*1024*1024*1024)
4040
{
41+
std::cout<<"Clustering "<<nPoints<<" points."<<std::endl;
4142
InMatrix inMat(maxRam);
4243
using std::chrono::duration_cast;
4344
using std::chrono::milliseconds;
@@ -73,7 +74,8 @@ int main(int argc, char **argv) {
7374
if (!extractOptions("--linkage=%s", method, argc, argv))
7475
strcat(method,"complete");
7576

76-
InMatrix inMat(64*1024*1024);
77+
unsigned maxRam=2L*1024*1024*1024;
78+
InMatrix inMat(maxRam);
7779

7880
using std::chrono::duration_cast;
7981
using std::chrono::milliseconds;
@@ -99,7 +101,8 @@ int main(int argc, char **argv) {
99101
double clustering=duration_cast<milliseconds>(finishedClust-finishedSort).count()/1000.0;
100102
std::cout<<"Clustering took: "<<clustering<<" s"<<std::endl;
101103

102-
//test(40000);
104+
105+
//test(350000);
103106
return 0;
104107
}
105108

0 commit comments

Comments
 (0)