有关mvapich下MPI+OpenMP运行的问题

peaokelvin 2011-03-31 07:05:10
求助一个疑问:
我现在运行一个MPI+OpenMP混合编程的程序,在OpenMPI下用icc编译。可以启动多线程,而用了mvapich这个MPI版本编译的程序后,怎么也启动不了多线程了。。无论线程数设为多少(核数足够)。。总是单线程的运行。。看了一下链接。。也有libpthread.so.0和libiomp5.so。。不知道是什么原因。。不知道是否有人知道。。谢谢
...全文
360 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
intel_iclifort 2011-04-01
  • 打赏
  • 举报
回复
编译MPICH时需要增加一个选项,才能支持share memory的线程化, 好像是 -enable-shm 之类,查查手册
peaokelvin 2011-04-01
  • 打赏
  • 举报
回复
MVAPICH2 uses CPU affinity to have better performance for single-threaded programs. For multi-threaded programs, however, it may schedule all the threads of a process to run on the same CPU. CPU affinity should be disabled in this case to solve the problem, i.e. set -env
MV2 ENABLE AFFINITY 0.
原来是默认绑定了。。我想当然了,没看手册。。谢谢楼上了

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧