Skip to content

Commit

Permalink
- Fixing FindHWLOC.cmake script for adding support for HWLOC versions
Browse files Browse the repository at this point in the history
greater than 1.4.0

- Fixing a bug in the thread placements for node threads.
  • Loading branch information
marwan-abdellah committed Mar 21, 2012
1 parent 40aa785 commit 08f4ae5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 22 deletions.
4 changes: 2 additions & 2 deletions CMake/Equalizer.spec
@@ -1,13 +1,13 @@
Name: Equalizer
Version:
Version: 1.3.1
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--build-fix.patch
Patch0: Equalizer-1.3.1-build-fix.patch
BuildRequires: cmake bison flex
BuildRequires: boost-devel glew-devel
BuildRequires: libX11-devel mesa-libGL-devel
Expand Down
31 changes: 17 additions & 14 deletions CMake/FindHWLOC.cmake
@@ -1,21 +1,24 @@
# Copyright (c) 2012 Marwan Abdellah <marwan.abdellah@epfl.ch>

find_path(HWLOC_INCLUDE_DIR "hwloc.h"
HINTS ${HWLOC_ROOT}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
message(STATUS "Found PKG_CONFIG")
else()
message(STATUS "Could NOT Find PKG_CONFIG")
endif()

find_library(HWLOC_LIBRARIES NAMES hwloc
HINTS ${HWLOC_ROOT}/lib
PATHS /usr/lib /usr/local/lib /opt/local/lib
)
# Search for package files
pkg_search_module(HWLOC hwloc>=1.4.0)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARIES
HWLOC_INCLUDE_DIR)
# Other places via "ccmake .."
if(NOT HWLOC_FOUND)
find_path(HWLOC_INCLUDE_DIR "hwloc.h")
find_library(HWLOC_LIBRARIES NAMES hwloc)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARIES HWLOC_INCLUDE_DIR)
endif()

if(HWLOC_FOUND)
message(STATUS "Found HWLOC in ${HWLOC_INCLUDE_DIR};${HWLOC_LIBRARIES}")
endif(HWLOC_FOUND)
endif(HWLOC_FOUND)
5 changes: 4 additions & 1 deletion commitMessage.txt
@@ -1,5 +1,8 @@
Fix Windows build
- Fixing FindHWLOC.cmake script for adding support for HWLOC versions
greater than 1.4.0

- Fixing a bug in the thread placements for node threads.

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
Expand Down
25 changes: 20 additions & 5 deletions libs/eq/client/node.cpp
Expand Up @@ -195,13 +195,28 @@ bool Node::configExit()
void Node::_setAffinity()
{
const int32_t affinity = getIAttribute( IATTR_HINT_AFFINITY );
switch( affinity )
{
case OFF:
break;

NodeAffinityPacket packet;
packet.affinity = affinity;
case AUTO:
// To be implemented later
/*
const int32_t cpu = getCPU();
Pipe::Thread::setAffinity( cpu );
*/
break;

co::LocalNodePtr node = getLocalNode();
send( node, packet );
node->setAffinity( affinity );
default:
NodeAffinityPacket packet;
packet.affinity = affinity;

co::LocalNodePtr node = getLocalNode();
send( node, packet );
node->setAffinity( affinity );
break;
}
}

void Node::waitFrameStarted( const uint32_t frameNumber ) const
Expand Down

0 comments on commit 08f4ae5

Please sign in to comment.