forked from plauth/dopencl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original dopencl-0.4.0_r1819-asio code for archival purposes.
- Loading branch information
0 parents
commit 509db4e
Showing
273 changed files
with
45,363 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
|
||
project(dOpenCL) | ||
|
||
# The following code snippet for enabling C++11 support for GCC has been taken from: | ||
# http://stackoverflow.com/questions/12715005/add-c0x-support-in-cmake | ||
# For other compilers, C++11 support has to enabled manually | ||
# NOTE: Modification of CMAKE_CXX_FLAGS is not shown in ncurses UI | ||
if(CMAKE_COMPILER_IS_GNUCXX) | ||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GNUCXX_VERSION) | ||
if(GNUCXX_VERSION VERSION_EQUAL 4.6) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
elseif(GNUCXX_VERSION VERSION_GREATER 4.6) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
else() | ||
message(SEND_ERROR "Compiler does not support C++11") | ||
endif() | ||
endif(CMAKE_COMPILER_IS_GNUCXX) | ||
|
||
option(BUILD_UNIT_TESTS "Build dOpenCL unit tests (experimental)" OFF) | ||
|
||
# | ||
# dOpenCL version information | ||
# | ||
# Note that the version number refers to the dOpenCL ICD, daemon, and the | ||
# dOpenCL API. The dOpenCL library may have a different version number. | ||
# | ||
set(DCL_VERSION_MAJOR 0) | ||
set(DCL_VERSION_MINOR 4) | ||
set(DCL_VERSION_PATCH 0) | ||
set(DCL_VERSION ${DCL_VERSION_MAJOR}.${DCL_VERSION_MINOR}.${DCL_VERSION_PATCH}) | ||
|
||
add_subdirectory (dclasio) | ||
add_subdirectory (daemon) | ||
add_subdirectory (icdpp) | ||
|
||
if(BUILD_UNIT_TESTS) | ||
# enable_testing must be defined in the root CMakeLists.txt, otherwise | ||
# 'make test' will not work correctly | ||
enable_testing () | ||
add_subdirectory (test) | ||
endif(BUILD_UNIT_TESTS) | ||
|
||
# TODO Export targets from installation rather than build tree | ||
#export(TARGETS dcl dOpenCL dcld FILE dOpenCL.cmake) | ||
|
||
|
||
# | ||
# package configuration | ||
# | ||
# TODO Add 'README_...txt' and 'INSTALL_...txt' to package | ||
# TODO Add copyright and license header to all source files | ||
# TODO Add dOpenCL API headers to package | ||
# TODO Add dOpenCL API documentation to package | ||
|
||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "dOpenCL is a distributed implementation of the OpenCL API.") | ||
set(CPACK_PACKAGE_VENDOR "Group Parallel and Distributed Systems, Department of Computer Science, University of Muenster, Germany") | ||
set(CPACK_PACKAGE_COPYRIGHT_FILE "${PROJECT_SOURCE_DIR}/COPYING") | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${DCL_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${DCL_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${DCL_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "dOpenCL-${DCL_VERSION_MAJOR}.${DCL_VERSION_MINOR}") | ||
set(CPACK_PACKAGE_FILE_NAME "dOpenCL-${DCL_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_BUILD_TYPE}") | ||
|
||
# WARNING: | ||
# CPack TGZ generator will include *all* files from the source folder by default | ||
# Checkout a clean tree from the repository to create a source package. | ||
set(CPACK_SOURCE_IGNORE_FILES | ||
"/build;/.svn/;.*~$;${CPACK_SOURCE_IGNORE_FILES}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "dOpenCL-${DCL_VERSION}-src") | ||
set(CPACK_SOURCE_STRIP_FILES TRUE) | ||
|
||
if(UNIX) | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README_Linux.txt") | ||
set(CPACK_GENERATOR "TGZ") | ||
set(CPACK_SOURCE_GENERATOR "TGZ") | ||
endif(UNIX) | ||
if(WIN32) | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README_Win.txt") | ||
set(CPACK_GENERATOR "ZIP") | ||
set(CPACK_SOURCE_GENERATOR "ZIP") | ||
endif(WIN32) | ||
|
||
# CPack must be included *after* the CPack configuration | ||
include(CPack) | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
dOpenCL Academic License - Version 1.0 - June 30th, 2013 | ||
|
||
Developed by: Research Group Parallel and Distributed Systems | ||
Department of Mathematics and Computer Science | ||
University of Muenster, Germany | ||
http://dopencl.uni-muenster.de | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of this software and associated documentation files (the "Software"), | ||
to deal with the Software in an academic environment for research or | ||
teaching purposes without any monetary gain, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense | ||
and to permit persons to whom the Software is furnished to do so, subject | ||
to the following conditions: | ||
|
||
Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimers. | ||
|
||
Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimers in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
Neither the names of the above listed research groups, nor the names of | ||
its contributors may be used to endorse or promote products derived from | ||
this Software without specific prior written permission. | ||
|
||
This Software and its authors have to be cited in publications related to | ||
products using this Software or products derived from this Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS WITH THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
Installing dOpenCL | ||
================== | ||
|
||
(last update: 2014-12-22, Philipp Kegel) | ||
|
||
1. Requirements | ||
2. Building dOpenCL from source | ||
3. Installing dOpenCL | ||
4. Known issues | ||
|
||
|
||
------------ | ||
Requirements | ||
------------ | ||
|
||
* C++11-enabled compiler | ||
has been tested successfully with g++ 4.6 and g++ 4.7 | ||
* OpenCL 1.1+ | ||
only has to be installed on the dOpenCL compute nodes. | ||
The OpenCL headers and C++ binding have to be installed in the system's | ||
default include directories | ||
* Boost (>=1.41.0) | ||
required libraries: Boost.Asio, Boost.Program_options, Boost.Test (optional) | ||
http://www.boost.org | ||
* CMake (>=2.6) | ||
http://www.cmake.org | ||
|
||
|
||
---------------------------- | ||
Building dOpenCL from source | ||
---------------------------- | ||
|
||
1. Create dOpenCL home | ||
|
||
Create a directory and copy the dOpenCL sources into that directory. | ||
This directory will become the dOpenCL home. | ||
|
||
2. Build dOpenCL | ||
|
||
dOpenCL is build in two steps: after creating a Make file using CMake, the | ||
dOpenCL binaries and libraries are build using Make. | ||
|
||
a) Creating the make file using CMake | ||
The dOpenCL CMake configuration (CMakeLists.txt in dOpenCL home) allows | ||
for the following settings: | ||
|
||
FORCE_FLUSH=OFF flush command queues after enqueing a command | ||
This option can be set to increase concurrency of command execution | ||
in OpenCL implementations that do not execute command before a | ||
command queue is flushed (e.g., AMD APP SDK) | ||
BUILD_SHARED_LIBS=ON | ||
build dOpenCL communication library as shared object (recommended) | ||
Note that the dOpenCL installable client driver (libdOpenCL.so) is | ||
always built as a shared object. | ||
|
||
Besides, the CMake build type (CMAKE_BUILD_TYPE) has to be specified. | ||
We recommend using the ncurses CMake GUI 'ccmake'. | ||
|
||
We strongly recommend to perform an out-of-source build: create a | ||
directory for building dOpenCL and change into that directory. For | ||
example, create a subdirectory 'build' inside the dOpenCL home. | ||
|
||
b) Build dOpenCL binaries and libraries using Make | ||
After creating the make file with CMake, the dOpenCL binaries and | ||
libraries can be built by calling 'make' in the build directory. | ||
|
||
The corresponding commands for building dOpenCL are as follows: | ||
cd <dOpenCL home> | ||
mkdir build | ||
cd build | ||
cmake -D CMAKE_BUILD_TYPE=Release .. | ||
make | ||
|
||
|
||
------------------ | ||
Installing dOpenCL | ||
------------------ | ||
|
||
dOpenCL is most easily installed by calling 'make install' from within the build | ||
directory. This will install dOpenCL in your system's default directory. Note | ||
that the call requires root rights. | ||
|
||
If you do not want to install dOpenCL into your default system directory, or if | ||
you do not have appropriate rights to do so, you should export the DCL_HOME | ||
environment variable, such that its value is the path to the dOpenCL build | ||
directory. | ||
|
||
After installing dOpenCL, refer to README_Linux.txt for information on how to | ||
use dOpenCL. | ||
|
||
Installable Client Driver (ICD) | ||
------------------------------- | ||
|
||
dOpenCL currently does not support OpenCL's ICD loader mechanism. Hence, either | ||
the system's ICD loader (<system library directory>/libOpenCL.so) has to be | ||
replaced by dOpenCL's ICD (libdOpenCL.so), or the dOpenCL ICD has to be added to | ||
the list of preloaded libraries in the LD_PRELOAD environment variable. | ||
|
||
|
||
------------ | ||
Known issues | ||
------------ | ||
|
||
* GNU C++ linker: undefined reference to `pthread_*' | ||
|
||
Although dOpenCL does not use POSIX threads directly (but C++11 threads) | ||
compilers may use POSIX threads to implement C++11 threads. This is the case for | ||
the GNU C++ compiler, which requires the '-pthread' compiler option in order to | ||
compile dOpenCL. This option can be set using the CMAKE_CXXFLAGS setting in CMake. | ||
|
||
* CMake: Boost_DIR always is set to Boost_DIR-NOTFOUND | ||
|
||
This is a known bug of the FindBoost CMake module (see | ||
http://public.kitware.com/Bug/view.php?id=13453). The problem can be ignored as | ||
CMake stills correctly finds the Boost directory (if Boost is installed). | ||
|
Oops, something went wrong.