Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Eyescale/Equalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
eile committed Mar 21, 2012
2 parents c65ee93 + b885716 commit 40aa785
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 68 deletions.
6 changes: 3 additions & 3 deletions AUTHORS
Expand Up @@ -3,13 +3,14 @@

------ Core Team ------

Maxim Makhinya
Daniel Nachbaur
Stefan Eilemann

-------- git master -------
------- git master -------

Ahmet Bilgili
Dardo D. Kleiner
Maxim Makhinya

-------- Version 1.2 --------

Expand All @@ -22,7 +23,6 @@ Matthew Dawson
-------- Version 1.0 --------

Cedric Stalder
Daniel Nachbaur

-------- Version 1.0-beta --------

Expand Down
4 changes: 0 additions & 4 deletions CMake/CPackConfig.cmake
Expand Up @@ -30,10 +30,6 @@ set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
set(CPACK_RESOURCE_FILE_LICENSE ${Equalizer_SOURCE_DIR}/LICENSE.txt)
set(CPACK_RESOURCE_FILE_README ${Equalizer_SOURCE_DIR}/RELNOTES.txt)

if(EQUALIZER_NIGHTLY)
set(CPACK_PACKAGE_VERSION_PATCH
${CPACK_PACKAGE_VERSION_PATCH}-${EQUALIZER_BUILD_ARCH})
endif()
if(EQUALIZER_PACKAGE_VERSION)
set(CPACK_PACKAGE_VERSION_PATCH
${CPACK_PACKAGE_VERSION_PATCH}-${EQUALIZER_PACKAGE_VERSION})
Expand Down
4 changes: 2 additions & 2 deletions CMake/Equalizer.in.spec
@@ -1,13 +1,13 @@
Name: Equalizer
Version: @SHORT_VERSION@
Version: @VERSION@
Release: 1%{?dist}
Summary: Middleware to create and deploy parallel OpenGL-based applications

Group: Development/Libraries
License: LGPLv2, examples are BSD licensed
URL: http://www.equalizergraphics.com/
Source0: http://www.equalizergraphics.com/downloads/%{name}-%{version}.tar.gz
Patch0: Equalizer-@SHORT_VERSION@-build-fix.patch
Patch0: Equalizer-@VERSION@-build-fix.patch
BuildRequires: cmake bison flex
BuildRequires: boost-devel glew-devel
BuildRequires: libX11-devel mesa-libGL-devel
Expand Down
51 changes: 20 additions & 31 deletions CMakeLists.txt
Expand Up @@ -8,19 +8,16 @@ project(Equalizer)
option(EQUALIZER_PREFER_AGL "Prefer AGL over GLX on Mac OS X" ON)
option(EQUALIZER_USE_BOOST "Test for Boost support" ON)
option(EQUALIZER_USE_OPENMP "Test for OpenMP support" ON)
option(EQUALIZER_FORCE_OPENMP "Force usage of buggy OpenMP implementation" OFF)
option(EQUALIZER_USE_GPUSD "Test for GPU-SD support" ON)
option(EQUALIZER_USE_HWLOC "Test for hwloc support" ON)
option(EQUALIZER_USE_MAGELLAN "Test for SpaceMouse support" ON)
option(EQUALIZER_FORCE_OPENMP "Force usage of buggy OpenMP implementation" OFF)
option(EQUALIZER_NIGHTLY "Package nightly builds" OFF)
option(EQUALIZER_USE_SOLUTION_FOLDERS "Enable project grouping in IDE" ON)
option(EQUALIZER_BUILD_EXAMPLES "Build Equalizer examples." ON)
option(EQUALIZER_INSTALL_SERVER_HEADERS "Install Equalizer server includes." OFF)
option(EQUALIZER_BUILD_2_0_API
"Enable for pure 2.0 API (breaks compatibility with 1.x API)" OFF)

mark_as_advanced(EQUALIZER_INSTALL_SERVER_HEADERS)
mark_as_advanced(EQUALIZER_USE_SOLUTION_FOLDERS)
mark_as_advanced(EQUALIZER_FORCE_OPENMP)
mark_as_advanced(EQUALIZER_PREFER_AGL)

Expand Down Expand Up @@ -70,12 +67,7 @@ endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Equalizer_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Equalizer_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Equalizer_BINARY_DIR}/lib)

if(EQUALIZER_USE_SOLUTION_FOLDERS)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
else()
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

if(EQUALIZER_USE_GPUSD)
include(GPUSD)
Expand Down Expand Up @@ -110,7 +102,11 @@ if(MSVC)
/wd4800 # forcing value to bool 'true' or 'false' (performance warning)
)
# http://www.ogre3d.org/forums/viewtopic.php?f=2&t=60015&start=0
set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm500 /EHsc /GR /WX")
if(EQUALIZER_RELEASE)
set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm500 /EHsc /GR")
else()
set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm500 /EHsc /GR /WX")
endif()
endif(MSVC)

if(CMAKE_COMPILER_IS_GNUCXX)
Expand All @@ -119,14 +115,22 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(GCC_COMPILER_VERSION VERSION_LESS 4.1)
message(ERROR "GCC 4.1 or later required, found ${GCC_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wnon-virtual-dtor -Wsign-promo -Wshadow -Winit-self -Wno-unknown-pragmas -Wno-unused-parameter -Wno-write-strings")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wuninitialized")
if(NOT WIN32 AND NOT XCODE_VERSION AND NOT EQUALIZER_RELEASE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()
endif(CMAKE_COMPILER_IS_GNUCXX)

if(EQUALIZER_USE_BOOST)
if(WIN32)
option(Boost_USE_STATIC_LIBS "Use boost static libs" ON)
endif()
set(Boost_USE_MULTITHREADED ON)
#set(Boost_DEBUG ON)
if(BOOST_ROOT)
set(Boost_NO_SYSTEM_PATHS TRUE)
endif()

find_package(Boost 1.36 COMPONENTS system regex date_time serialization)
if(Boost_FOUND)
if(Boost_VERSION GREATER 103999)
Expand Down Expand Up @@ -178,13 +182,6 @@ if(APPLE)
# WAR otherwise MacPorts X11 (/opt/local) is preferred
LIST(REMOVE_ITEM CMAKE_SYSTEM_LIBRARY_PATH /opt/local/lib)
LIST(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /opt/local)
else()
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(EQUALIZER_BUILD_ARCH "64" CACHE STRING "Build Architecture")
else()
set(EQUALIZER_BUILD_ARCH "32" CACHE STRING "Build Architecture")
endif()
mark_as_advanced(EQUALIZER_BUILD_ARCH)
endif()

find_package(X11)
Expand Down Expand Up @@ -225,14 +222,6 @@ if(GPUSD_FOUND)
set(EQ_FEATURES "${EQ_FEATURES} GPUSD")
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wnon-virtual-dtor -Wsign-promo -Wshadow -Winit-self -Wno-unknown-pragmas -Wno-unused-parameter -Wno-write-strings")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wuninitialized")
if(NOT WIN32 AND NOT XCODE_VERSION AND NOT EQUALIZER_RELEASE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()
endif(CMAKE_COMPILER_IS_GNUCXX)

IF(REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
SET(LIB_SUFFIX 64 CACHE STRING "Library directory suffix")
ENDIF()
Expand Down Expand Up @@ -306,10 +295,10 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/auxiliary" AND
endif()
add_subdirectory(doc) # must be after all targets

install(FILES CMake/FindCollage.cmake DESTINATION share/Equalizer/CMake
COMPONENT codev)
install(FILES CMake/FindEqualizer.cmake DESTINATION share/Equalizer/CMake
COMPONENT eqdev)
install(FILES CMake/FindCollage.cmake CMake/FindHWLOC.cmake CMake/FindUDT.cmake
CMake/FindOFED.cmake DESTINATION share/Equalizer/CMake COMPONENT codev)
install(FILES CMake/FindEqualizer.cmake CMake/FindGLEW_MX.cmake
CMake/FindMAGELLAN.cmake DESTINATION share/Equalizer/CMake COMPONENT eqdev)

if(CUDA_FOUND)
set(EQ_FEATURES "${EQ_FEATURES} CUDA")
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile.co
Expand Up @@ -581,7 +581,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = @CMAKE_BINARY_DIR@/install/include/co
INPUT = @CMAKE_INSTALL_PREFIX@/include/co

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down
8 changes: 4 additions & 4 deletions doc/Doxyfile.ext
Expand Up @@ -581,7 +581,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = @CMAKE_BINARY_DIR@/install
INPUT = @CMAKE_INSTALL_PREFIX@

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down Expand Up @@ -610,9 +610,9 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.

EXCLUDE = @CMAKE_BINARY_DIR@/install/share/Equalizer/examples/include/tclap \
@CMAKE_BINARY_DIR@/install/include/eq/admin \
@CMAKE_BINARY_DIR@/install/include/GL
EXCLUDE = @CMAKE_INSTALL_PREFIX@/share/Equalizer/examples/include/tclap \
@CMAKE_INSTALL_PREFIX@/include/eq/admin \
@CMAKE_INSTALL_PREFIX@/include/GL

# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
Expand Down
4 changes: 2 additions & 2 deletions doc/Doxyfile.seq
Expand Up @@ -581,8 +581,8 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = @CMAKE_BINARY_DIR@/install/include/seq \
@CMAKE_BINARY_DIR@/install/share/Equalizer/examples/seqPly
INPUT = @CMAKE_INSTALL_PREFIX@/include/seq \
@CMAKE_INSTALL_PREFIX@/share/Equalizer/examples/seqPly

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down
8 changes: 3 additions & 5 deletions libs/co/configure.cmake
Expand Up @@ -67,24 +67,22 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")

set(DEFINES_FILE ${OUTPUT_INCLUDE_DIR}/co/base/defines${ARCH}.h)
set(DEFINES_FILE_IN ${CMAKE_CURRENT_BINARY_DIR}/defines.h.in)

file(WRITE ${DEFINES_FILE_IN}
file(WRITE ${DEFINES_FILE}
"#ifndef COBASE_DEFINES_${ARCH}_H\n"
"#define COBASE_DEFINES_${ARCH}_H\n\n"
)

foreach(DEF ${COLLAGE_DEFINES})
file(APPEND ${DEFINES_FILE_IN}
file(APPEND ${DEFINES_FILE}
"#ifndef ${DEF}\n"
"# define ${DEF}\n"
"#endif\n"
)
endforeach(DEF ${COLLAGE_DEFINES})

file(APPEND ${DEFINES_FILE_IN}
file(APPEND ${DEFINES_FILE}
"\n#endif /* COBASE_DEFINES_${ARCH}_H */\n"
)

configure_file(${DEFINES_FILE_IN} ${DEFINES_FILE} COPYONLY)
install(FILES ${DEFINES_FILE} DESTINATION include/co/base/ COMPONENT codev)
21 changes: 8 additions & 13 deletions libs/co/rspConnection.cpp
Expand Up @@ -428,7 +428,6 @@ void RSPConnection::_handleAcceptIDTimeout( )
else
{
EQLOG( LOG_RSP ) << "Confirm " << _id << std::endl;
EQINFO << "opened RSP connection " << _id << std::endl;
_sendSimpleDatagram( ID_CONFIRM, _id );
_addConnection( _id );
_idAccepted = true;
Expand All @@ -449,14 +448,14 @@ void RSPConnection::_handleInitTimeout( )
else
{
_state = STATE_LISTENING;
EQINFO << "RSP connection " << _id << " listening" << std::endl;
_timeouts = 0;
if( _children.empty() )
_ioService.stop();
_ioService.stop(); // thread initialized, run restarts
}
_setTimeout( 10 );
}

void RSPConnection::_handleConnectedTimeout( )
void RSPConnection::_handleConnectedTimeout()
{
if( _state != STATE_LISTENING )
{
Expand Down Expand Up @@ -486,7 +485,7 @@ bool RSPConnection::_initThread()
EQLOG( LOG_RSP ) << "Started RSP protocol thread" << std::endl;
_timeouts = 0;

// send a first datagram for announce me and discover other connection
// send a first datagram to announce me and discover other connections
EQLOG( LOG_RSP ) << "Announce " << _id << std::endl;
_sendSimpleDatagram( ID_HELLO, _id );
_setTimeout( 10 );
Expand Down Expand Up @@ -865,8 +864,7 @@ void RSPConnection::_handleInitData( const void* data)
return;

case COUNTNODE:
if( _handleCountNode( ))
_state = STATE_LISTENING;
_handleCountNode();
break;

case ID_EXIT:
Expand Down Expand Up @@ -1358,19 +1356,15 @@ bool RSPConnection::_handleAckRequest( const DatagramAckRequest* ackRequest )
return true;
}

bool RSPConnection::_handleCountNode()
void RSPConnection::_handleCountNode()
{
const DatagramCount* countConn =
reinterpret_cast< const DatagramCount* >( _recvBuffer.getData( ));

EQLOG( LOG_RSP ) << "Got " << countConn->numConnections << " nodes from "
<< countConn->clientID << std::endl;

if( _addConnection( countConn->clientID ))
return false;

// we know all connections ?
return ( _children.size() == countConn->numConnections ) ;
_addConnection( countConn->clientID );
}

void RSPConnection::_checkNewID( uint16_t id )
Expand All @@ -1396,6 +1390,7 @@ bool RSPConnection::_addConnection( const uint16_t id )
if( _findConnection( id ))
return false;

EQINFO << "add connection " << id << std::endl;
RSPConnectionPtr connection = new RSPConnection();
connection->_id = id;
connection->_parent = this;
Expand Down
4 changes: 1 addition & 3 deletions libs/co/rspConnection.h
Expand Up @@ -256,9 +256,7 @@ namespace co
bool _handleAck( const DatagramAck* ack );
bool _handleNack( const DatagramNack* nack );
bool _handleAckRequest( const DatagramAckRequest* ackRequest );

/** @return true if we knew the correct number of connections. */
bool _handleCountNode();
void _handleCountNode();

Buffer* _newDataBuffer( Buffer& inBuffer );
void _pushDataBuffer( Buffer* buffer );
Expand Down

0 comments on commit 40aa785

Please sign in to comment.