mpirun 在 Intel Core 2 Duo 上有 2 个进程,但只显示 1 个进程

发布于 2025-01-07 06:28:23 字数 735 浏览 0 评论 0原文

我正在 mac os x 10.6.8 中运行测试 mpi 程序。处理器是英特尔酷睿2双核。该程序来自 boost mpi 文档

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>

int main(int argc, char * argv[]) {
    boost::mpi::environment env(argc, argv);
    boost::mpi::communicator w;
    std::cout << "process " << w.rank() << " of " << w.size() << std::endl;
    return 0;
}

我编译了它并运行它:

mpirun -np 2 a.out

但得到了以下结果:

process 0 of 1
process 0 of 1

我认为这意味着只有一个进程在运行。我做错了什么?我想我可以在 Intel Duo 上创建 2 个进程吗?

谢谢,

加里

I am running a test mpi program in mac os x 10.6.8. The processor is Intel Core 2 Duo. The program is from boost mpi documentation:

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>

int main(int argc, char * argv[]) {
    boost::mpi::environment env(argc, argv);
    boost::mpi::communicator w;
    std::cout << "process " << w.rank() << " of " << w.size() << std::endl;
    return 0;
}

I compiled it and ran it with:

mpirun -np 2 a.out

But got the following result:

process 0 of 1
process 0 of 1

which, I think, means there was only one process running. What did I do wrong? I think I can create 2 processes on a Intel Duo?

Thanks,

Gary

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文