Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用 OpenMP 来并行化一个循环(在 Ubuntu 上使用Thrust和GOMP),并惊讶地发现我的进程列表中弹出了多个进程。我曾认为 OpenMP 会启动多个线程,但不会启动多个进程。
OpenMP 在什么情况下会产生多个进程?
有趣的是,我的断点fork并posix_spawn没有被击中。是在htop骗我吗?(每个条目显示一个唯一的 PID。)
fork
posix_spawn
htop
你被误导了。Libgomp 不创建进程。