From 2cb6ce8c01fbff31262c21004d8d35b94322cd3e Mon Sep 17 00:00:00 2001 From: Clement Farabet Date: Mon, 23 Jan 2012 14:15:16 -0500 Subject: [PATCH] Fixed server install, as daemon --- CMakeLists.txt | 8 +++++++- cluster/Makefile | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abea69e6934..4238ac46f1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,13 @@ include_directories (${TORCH_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}) include_directories (${TORCH_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}) add_library (allreduce SHARED init.cpp allreduce.cc) link_directories (${TORCH_LIBRARY_DIR}) -target_link_libraries (allreduce ${TORCH_LIBRARIES} ) +target_link_libraries (allreduce ${TORCH_LIBRARIES}) + +add_executable(allserver cluster/spanning_tree.cc) install_files(${INSTALL_PREFIX} init.lua) install_targets(${CINSTALL_PREFIX} allreduce) + +install(TARGETS allserver + RUNTIME DESTINATION bin +) diff --git a/cluster/Makefile b/cluster/Makefile index d84ed2f7a57..e5c98f3db78 100644 --- a/cluster/Makefile +++ b/cluster/Makefile @@ -1,3 +1,16 @@ +COMPILER = g++ +LIBS = -l boost_program_options -l pthread -l z + +ARCH = $(shell test `g++ -v 2>&1 | tail -1 | cut -d ' ' -f 3 | cut -d '.' -f 1,2` \< 4.3 && echo -march=nocona || echo -march=native) + +BOOST_INCLUDE = /usr/include +BOOST_LIBRARY = /usr/local/lib + +OPTIM_FLAGS = -O3 -fomit-frame-pointer -ffast-math -fno-strict-aliasing +WARN_FLAGS = -Wall -pedantic #-Werror + +FLAGS = $(ARCH) $(WARN_FLAGS) $(OPTIM_FLAGS) -D_FILE_OFFSET_BITS=64 -I $(BOOST_INCLUDE) #-DVW_LDA_NO_SSE + all: spanning_tree %.o: %.cc %.h