OpenMP
OpenMP
Environment variables
export OMP_NUM_THREADS=4
Debugging
Download the debug symbols of libgomp
apt-get install libgomp1-dpkg
Set the environment variable GOMP_DEBUG.
export GOMP_DEBUG=1
FAQ
- What is the difference between
criticalandatomic
Atomic is used for a single assignment, where as critical is used for a section.
Atomic can only be used for ++x;, --x;, x++;, x--;, x binop= expr;, x = x binop expr or x = expr binop x.