next up previous contents
Next: 4 Parallel Regions Up: ADAPTOR OpenMP Programmers Guide Previous: 2 OpenMP Parallel Execution   Contents

3 OpenMP Blocking Execution Model

ADAPTOR supports another execution model for OpenMP programs where the master thread only emulates all slave threads. The slave threads are not created as corresponding PThreads. This avoids all the overhead related to the thread management.

    adaptor -omp -cb <prog>.f

In this execution model, synchronization between threads is not supported. But it should be noted that race conditions might be solved due to the serial execution as the work assigned to one thread is executed one after the other.

At the first sight, there might be no benefit as no parallelism is exploited. But due to the blocking, it might be possible that cache utizilation becomes much better and that can imply a significant speed-up for the program.

The parallel and blocking execution model can be combined.

    adaptor -omp -cb <prog>.f

Number of real threads and number of emulated threads can be specified at runtime.

   <prog> -nt 4 -nb 100


next up previous contents
Next: 4 Parallel Regions Up: ADAPTOR OpenMP Programmers Guide Previous: 2 OpenMP Parallel Execution   Contents
Thomas Brandes 2004-03-18