3.3.5. Dependence managers

Nanos++ provides several plugins to handle task dependencies, with different performance and features. Usage

Description: Changes the dependency plugin to use.
Type: string value
Environment variable: NX_DEPS=<string>
Command line flag: --deps[ |=]<string> List of dependence plugins Plain


This is the default dependence plugin

  • Configuration string: NX_DEPS=plain or NX_ARGS="--deps=plain"
  • Description: This plugin uses single memory addresses to compute dependences. In most of the cases the programmer can use a single memory point as a sentinel for a whole region. Regions

  • Configuration string: NX_DEPS=regions or NX_ARGS="--deps=regions"
  • Description: This plugin does not partition regions. It is more suitable for task with halos. Perfect-regions

  • Configuration string: NX_DEPS=perfect-regions or NX_ARSG="--deps=perfect-regions"
  • Description: Partitions regions into perfect regions. It is recommended for applications like multisort. Contiguous regions


This is a test and functional plugin, so it’s performance may not be the best

  • Configuration string: NX_DEPS=cregions or NX_ARSG="--deps=cregions"
  • Description: Detects dependencies between regions defined by start address and end address. Contiguous regions nocache


This is a test and functional plugin, so it’s performance may not be the best

  • Configuration string: NX_DEPS=cregions_nocache or NX_ARSG="--deps=cregions_nocache"
  • Description: Similar to Contiguous regions but small regions go to a dedicated structure (performance may be better in some applications). Dependence management examples

The default plugin is called plain, and it can only handle simple dependencies that do not overlap. The following is allowed:

#pragma omp task inout( [NB]block )

#pragma omp task inout( [NB]block )

#pragma omp task inout( block[0;NB] )

The following requires regions support, as provided by the regions and perfect-regions plugins:

#pragma omp task inout( block[0;3] )

#pragma omp task inout( block[1;3] )

Here task 5 will not depend on task 4 when using the plain plugin.

Regions are also required when you have non-contiguous memory, such as matrices. Although regions are much more powerful, there is a drawback with the current regions plugins: alignment. Keep in mind that if your data is not properly aligned, there will be a potential task serialisation and therefore a huge performance toll.