Skip to content

Commit

Permalink
initial clustering support
Browse files Browse the repository at this point in the history
  • Loading branch information
David authored and ferrouswheel committed Nov 27, 2010
1 parent 9600025 commit dd23211
Show file tree
Hide file tree
Showing 14 changed files with 4,876 additions and 163 deletions.
42 changes: 2 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(lib/Summary.cmake)

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
IF (COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
Expand Down Expand Up @@ -101,12 +99,6 @@ ELSE(Boost_MATH_C99_FOUND)
MESSAGE(STATUS "Boost math missing: needed to run combo learning tests.")
ENDIF(Boost_MATH_C99_FOUND)

IF(Boost_FOUND)
SET(HAVE_UTIL 1)
SET(HAVE_COMBOREDUCT 1)
SET(HAVE_MOSES 1)
ENDIF(Boost_FOUND)

FIND_PACKAGE(OpenGL)

IF(OPENGL_FOUND)
Expand All @@ -131,9 +123,6 @@ ELSE(SDLGFX_FOUND)
MESSAGE(STATUS "SDL_gfx missing: needed for Spatial tools (MapExplorer, MapTools, etc.).")
ENDIF(SDLGFX_FOUND)

IF(OPENGL_FOUND AND SDL_FOUND AND SDLGFX_FOUND)
SET(HAVE_SPATIAL 1)
ENDIF(OPENGL_FOUND AND SDL_FOUND AND SDLGFX_FOUND)

# At this time, there is no reason to build with memcached for
# FIND_PACKAGE(LibMemCached)
Expand All @@ -154,7 +143,6 @@ ENDIF(OPENGL_FOUND AND SDL_FOUND AND SDLGFX_FOUND)
FIND_PACKAGE(UnixODBC QUIET)
IF (UnixODBC_FOUND)
ADD_DEFINITIONS(-DHAVE_SQL_STORAGE)
SET(HAVE_SQL_STORAGE 1)
SET(ODBC_FOUND 1)
SET(ODBC_INCLUDE_DIRS ${UnixODBC_INCLUDE_DIRS})
SET(ODBC_LIBRARIES ${UnixODBC_LIBRARIES})
Expand All @@ -172,7 +160,6 @@ MESSAGE(STATUS "${ODBC_DIR_MESSAGE}")
FIND_PACKAGE(Guile 1.8.6)
IF (GUILE_FOUND)
ADD_DEFINITIONS(-DHAVE_GUILE)
SET(HAVE_GUILE 1)
SET(GUILE_DIR_MESSAGE "Guile was found.")
ELSE (GUILE_FOUND)
SET(GUILE_DIR_MESSAGE "Guile was not found; the scheme shell will not be built.\nTo over-ride, make sure GUILE_LIBRARIES and GUILE_INCLUDE_DIRS are set.")
Expand All @@ -181,39 +168,19 @@ MESSAGE(STATUS "${GUILE_DIR_MESSAGE}")


# Gnu Scientific Library
FIND_PACKAGE(GSL)
FIND_PACKAGE(GSL REQUIRED)
IF (GSL_FOUND)
ADD_DEFINITIONS(-DHAVE_GSL)
SET(HAVE_GSL 1)
ENDIF (GSL_FOUND)

IF(GSL_FOUND)
SET(HAVE_ATOMSPACE 1)
SET(HAVE_ATTENTION 1)
SET(HAVE_PLN 1)
ENDIF(GSL_FOUND)

# XML parsing library
FIND_PACKAGE(EXPAT)
IF (EXPAT_FOUND)
ADD_DEFINITIONS(-DHAVE_EXPAT)
SET(HAVE_EXPAT 1)
ELSE (EXPAT_FOUND)
MESSAGE(STATUS "Expat XML parser missing: needed for hypertable support.")
ENDIF (EXPAT_FOUND)

IF(EXPAT_FOUND)
SET(HAVE_PERSIST 1)
ENDIF(EXPAT_FOUND)

IF(HAVE_PERSIST AND HAVE_ATOMSPACE)
SET(HAVE_SERVER 1)
ENDIF(HAVE_PERSIST AND HAVE_ATOMSPACE)

IF(HAVE_SERVER) # because web depends on server
SET(HAVE_WEB 1)
ENDIF(HAVE_SERVER)

# These are required for building the embodiment code
FIND_PACKAGE(XercesC)
IF (XERCESC_FOUND)
Expand All @@ -239,10 +206,6 @@ IF (NOT LUABIND_FOUND)
MESSAGE(WARNING "Luabind missing: needed for embodiment code.")
ENDIF (NOT LUABIND_FOUND)

IF(XERCESC_VERSION_OK AND LUABIND_FOUND AND EXPAT_FOUND)
SET(HAVE_EMBODIMENT 1)
ENDIF(XERCESC_VERSION_OK AND LUABIND_FOUND AND EXPAT_FOUND)

# Not used at this time, its incompatible with the current code.
#
# FIND_PACKAGE(LinkGrammar)
Expand All @@ -263,7 +226,6 @@ ENDIF (NOT CURL_FOUND)
IF (CURL_FOUND)
IF (XMLRPC_FOUND)
ADD_DEFINITIONS(-DHAVE_UBIGRAPH)
SET(HAVE_UBIGRAPH 1)
ENDIF (XMLRPC_FOUND)
ENDIF (CURL_FOUND)

Expand All @@ -277,7 +239,6 @@ ENDIF (CURL_FOUND)
FIND_PACKAGE(HyperTable)
IF (HYPERTABLE_FOUND)
ADD_DEFINITIONS(-DHAVE_HYPERTABLE)
SET(HAVE_HYPERTABLE 1)
MESSAGE(STATUS "Hypertable was found.")

# Don't bother looking for SIGAR unlesss hyperable was found.
Expand Down Expand Up @@ -524,3 +485,4 @@ SUMMARY_ADD("SchemeBinding" "Scheme bindings and shell" HAVE_GUILE)
SUMMARY_ADD("PythonBinding" "Python bindings" HAVE_PYTHON_BINDING)
SUMMARY_ADD("Doxygen" "Code documentation" DOXYGEN_FOUND)
SUMMARY_SHOW()

12 changes: 3 additions & 9 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
IF(HAVE_ATOMSPACE)
ADD_SUBDIRECTORY (atomtypes)
ENDIF(HAVE_ATOMSPACE)
IF(HAVE_ATTENTION)
ADD_SUBDIRECTORY (hopfield)
ENDIF(HAVE_ATTENTION)
ADD_SUBDIRECTORY (atomtypes)
ADD_SUBDIRECTORY (hopfield)
ADD_SUBDIRECTORY (modules)
IF(HAVE_SERVER)
ADD_SUBDIRECTORY (server)
ENDIF(HAVE_SERVER)
ADD_SUBDIRECTORY (server)
2 changes: 1 addition & 1 deletion lib/FindXercesC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ IF(NOT XERCESC_FIND_QUIETLY)
MESSAGE(STATUS " Version: ${XERCESC_VERSION}")
ENDIF(NOT XERCESC_FIND_QUIETLY)
ELSE(XERCESC_FOUND)
MESSAGE(WARNING "Could not find Xerces-C !")
MESSAGE(FATAL_ERROR "Could not find Xerces-C !")
ENDIF(XERCESC_FOUND)

MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES)
Expand Down
48 changes: 0 additions & 48 deletions lib/Summary.cmake

This file was deleted.

33 changes: 15 additions & 18 deletions opencog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,30 @@ ENDIF (GUILE_FOUND)

# Python bindings currently don't compile because of clash with
# Node class in python lib.
IF (HAVE_PYTHON_BINDING)
IF (NOT APPLE AND Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND)
ADD_SUBDIRECTORY (python)
ENDIF (HAVE_PYTHON_BINDING)

IF(HAVE_PERSIST)
ADD_SUBDIRECTORY (persist)
ENDIF(HAVE_PERSIST)
ENDIF (NOT APPLE AND Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND)

ADD_SUBDIRECTORY (persist)
ADD_SUBDIRECTORY (adaptors)
ADD_SUBDIRECTORY (query)
ADD_SUBDIRECTORY (nlp)
ADD_SUBDIRECTORY (reasoning)
ADD_SUBDIRECTORY (comboreduct)
IF(HAVE_SPATIAL)
ADD_SUBDIRECTORY (spatial)
ENDIF(HAVE_SPATIAL)
IF(HAVE_WEB)
ADD_SUBDIRECTORY (web)
ENDIF(HAVE_WEB)
ADD_SUBDIRECTORY (learning)

IF (HAVE_EMBODIMENT)
ADD_SUBDIRECTORY (spatial)
ADD_SUBDIRECTORY (web)

IF (EXPAT_FOUND)
ADD_SUBDIRECTORY (learning)
ENDIF (EXPAT_FOUND)

IF (XERCESC_VERSION_OK AND LUABIND_FOUND AND EXPAT_FOUND)
ADD_SUBDIRECTORY (embodiment)
ENDIF (HAVE_EMBODIMENT)
ENDIF (XERCESC_VERSION_OK AND LUABIND_FOUND AND EXPAT_FOUND)

# Graphics and visualization subsystems
ADD_SUBDIRECTORY (dotty)
IF (HAVE_UBIGRAPH)
IF (CURL_FOUND AND XMLRPC_FOUND)
ADD_SUBDIRECTORY (ubigraph)
ENDIF (HAVE_UBIGRAPH)
ENDIF (CURL_FOUND AND XMLRPC_FOUND)

11 changes: 0 additions & 11 deletions opencog/comboreduct/combo/procedure_repository.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,10 @@
#include "procedure_repository.h"
#include "type_tree.h"

#include <boost/version.hpp>

#if BOOST_VERSION >= 104000
#define IGNORE_BOOST_GRAPH
#endif

#ifndef IGNORE_BOOST_GRAPH
#include <boost/graph/strong_components.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/graph/topological_sort.hpp>
#endif

#include <cstdio>

namespace combo {
Expand Down Expand Up @@ -116,7 +107,6 @@ namespace combo {
}

void procedure_repository::generate_and_order_strongly_connected_components() {
#ifndef IGNORE_BOOST_GRAPH
//pc_vec is a vector containing all procedure calls of the repository
//pv_index_map map all procedure calls to that vector indices
std::vector<procedure_call> pc_vec;
Expand Down Expand Up @@ -239,7 +229,6 @@ namespace combo {
//std::cout << std::endl;
//}
//~debug print
#endif
}

bool procedure_repository::infer_types_repo() {
Expand Down
4 changes: 4 additions & 0 deletions opencog/learning/dimensionalembedding/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ INCLUDE_DIRECTORIES (
INSTALL (TARGETS dimensionalembedding
LIBRARY DESTINATION "lib${LIB_DIR_SUFFIX}/opencog"
)

TARGET_LINK_LIBRARIES (dimensionalembedding
util
)
Loading

0 comments on commit dd23211

Please sign in to comment.