Search code examples
openmpthrustlibgomp

Multiple processes created by OpenMP


I tried out using OpenMP to parallelize a loop (using Thrust and GOMP on Ubuntu) and was surprised to see multiple processes pop up in my process list. I had thought that OpenMP would spin up multiple threads, but not multiple processes.

Under what conditions does OpenMP spawn multiple processes?

Interestingly, my breakpoints on fork and posix_spawn were not hit. Is htop lying to me? (Each entry showed a unique PID.)


Solution

  • You are being misled. Libgomp does not create processes.