DepSpawn 1.2
 
Loading...
Searching...
No Matches
Installing DepSpawn

Requirements

DepSpawn requires:

  • A C++ compiler that supports C++11
  • CMake 2.8.7 or above (3.1.3 for Mac OS X)
  • Optional: Intel (R) Threading Building Blocks (TBB) v3.0 update 6 or above (v4.3 update 6 for Mac OS X). Please notice this is not the new oneTBB library.
  • Optional: Boost v1.48 or above (if not available DepSpawn will install the subset it uses)
  • Optional: Doxygen for building its documentation

Procedure

Follow these steps:

  1. If you wanto to use TBB, make sure it is automatically found by your compiler following the steps described in TBB configuration.
  2. Unpack the DepSpawn tarball (e.g. depspawn.tar.gz)
     tar -xzf depspawn.tar.gz
     cd depspawn
    
    or clone the project from its repository
     git clone git@github.com:fraguela/depspawn.git
    
  3. Create the temporary directory where the project will be built and enter it :
     mkdir build && cd build
    
  4. Generate the files for building DepSpawn in the format that you prefer (Visual Studio projects, nmake makefiles, UNIX makefiles, Mac Xcode projects, ... ) using cmake.

    In this process you can use a graphical user interface for cmake such as cmake-gui in Unix/Mac OS X or CMake-gui in Windows, or a command-line interface such as ccmake. The process is explained here assuming this last possibility, as graphical user interfaces are not always available.

    1. run ccmake ..

      This will generate the files for building DepSpawn with the tool that cmake choses by default for your platform. Flag -G can be used to specify the kind of tool that you want to use. For example if you want to use Unix makefiles but they are not the default in you system, run ccmake -G 'Unix Makefiles' ..

      Run ccmake --help for additional options and details.

    2. Press letter c to configure your build.

      Warning
      If CMake cannot find Boost it will warn that it will use and install the subset it requires. Just press e to exit the help.
    3. Provide the values you wish for the variables that appear in the screen. The most relevant ones are:

      • CMAKE_BUILD_TYPE : String that specifies the build type. Its possible values are empty, Debug, Release, RelWithDebInfo and MinSizeRel.
      • CMAKE_INSTALL_PREFIX : Directory where DepSpawn will be installed

      The variables that begin with DEPSPAWN change internal behaviors in the runtime of the library. Thus in principle they are of interest only to the developers of the library, although users can play with them to see how they impact in their applications. They are:

      • DEPSPAWN_BLITZ : String that specifies the Blitz library to use. Its values can be:
        • No : No preparation to use any version of Blitz or related tests.
        • Old: Use provided depspawn-blitz-0.10 library. DepSpawn will test its usage with this library, but the library itself will not be built. The user is responsible for that. This library is known to break for recent compilers.
        • New: Use provided depspawn-blitz-1.0.2. DepSpawn will build, install and test the library using the same CMAKE_INSTALL_PREFIX as DepSpawn for the installation.
      • DEPSPAWN_DUMMY_POOL : Boolean that if ON turns off the usage of pools by the library to manage the memory of its internal objects.
      • DEPSPAWN_FAST_START : If this boolean is ON, when a thread that is spawning tasks detects that there are too many ready pending tasks waiting to be executed, it stops and executes one of them before resuming its current task.
      • DEPSPAWN_PROFILE : When this boolean is ON the library gathers statistics about its internal operations.
      • DEPSPAWN_SCALABLE_POOL : This boolean controls whether the library managed its memory by means of the tbbmalloc library (if ON) or the standard C++ library (if OFF).
      • DEPSPAWN_USE_TBB : This boolean controls whether DepSpawn relies on Intel TBB, if ON, or on C++11 threads, if OFF.
    4. When you are done, press c to re-configure cmake with the new values. If Boost is missing you will get the same warning. Press e to exit the help.
    5. Press g to generate the files that will be used to build DepSpawn and exit cmake.
  5. The rest of this explanation assumes that UNIX makefiles were generated in the previous step.

    Run make in order to build the library and its tests. The degree of optimization, debugging information and assertions enabled depends on the value you chose for variable CMAKE_BUILD_TYPE.

    Note
    You can use the flag -j to speedup the building process. For example, make -j4 will use 4 parallel processes, while make -j will use one parallel process per available hardware thread.
  6. (Optionally) run make check in order to run the DepSpawn tests.
  7. Run make install

    This installs DepSpawn under the directory you specified for the CMAKE_INSTALL_PREFIX variable. If you left it empty, the default base directories will be /usr/local in Unix and c:/Program Files in Windows.

    The installation places

    • The depspawn library in the subdirectory lib
    • The header files in the subdirectory include/depspawn
    • If Boost is missing, the portion required by DepSpawn will be installed in include/boost
    • If Doxygen is present, a manual in share/depspawn
  8. (Optional but stronly advised) DepSpawn provides a slightly modified version of the Blitz++ library that allows to use Blitz++ arrays and subarrays as arguments of the spawned functions, thus providing a very nice notation for array-based computations. The installation of this library, located in the directory depspawn/depspawn-blitz-0.10, is based on the traditional configure and make mechanisms. The installation instructions and Blitz++ documentation are found in the library directory.
  9. You can remove the depspawn directory generated by the unpacking of the tarball or the cloning of the project repository.