- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个很大的代码,它因以下错误而崩溃:
Fatal error in PMPI_Comm_split: Other MPI error, error stack:
PMPI_Comm_split(532)................: MPI_Comm_split(comm=0xc4027cf0, color=0, key=0, new_comm=0x7ffdb50f2bd0) failed
PMPI_Comm_split(508)................: fail failed
MPIR_Comm_split_impl(260)...........: fail failed
MPIR_Get_contextid_sparse_group(676): Too many communicators (0/16384 free on this process; ignore_id=0)
Fatal error in PMPI_Comm_split: Other MPI error, error stack:
PMPI_Comm_split(532)................: MPI_Comm_split(comm=0xc401bcf1, color=1, key=0, new_comm=0x7ffed5aa4fd0) failed
PMPI_Comm_split(508)................: fail failed
MPIR_Comm_split_impl(260)...........: fail failed
MPIR_Get_contextid_sparse_group(676): Too many communicators (0/16384 free on this process; ignore_id=0)
Fatal error in PMPI_Comm_split: Other MPI error, error stack:
PMPI_Comm_split(532)................: MPI_Comm_split(comm=0xc4027ce9, color=0, key=0, new_comm=0x7ffe37e477d0) failed
PMPI_Comm_split(508)................: fail failed
MPIR_Comm_split_impl(260)...........: fail failed
MPIR_Get_contextid_sparse_group(676): Too many communicators (0/16384 free on this process; ignore_id=0)
Fatal error in PMPI_Comm_split: Other MPI error, error stack:
PMPI_Comm_split(532)................: MPI_Comm_split(comm=0xc401bcf1, color=1, key=0, new_comm=0x7ffd511ac4d0) failed
PMPI_Comm_split(508)................: fail failed
MPIR_Comm_split_impl(260)...........: fail failed
MPIR_Get_contextid_sparse_group(676): Too many communicators (0/16384 free on this process; ignore_id=0)
Too many communicators (0/16384 free on this process; ignore_id=0)
最佳答案
您可以覆盖 MPI_Comm_split
的实现和 MPI_Comm_free
手动统计通信器的创建和销毁。
这是一个简单的例子
覆盖 MPI_Comm_split
和 MPI_Comm_free
#include "mpi.h"
#include "stdio.h"
static int comm_counter=0;
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm)
{
int world_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
comm_counter++;
printf("%s %i %s %i\n", "MPI_Comm_split ", comm_counter, " from ", world_rank);
return PMPI_Comm_split(comm, color, key, newcomm);
}
int MPI_Comm_free(MPI_Comm *comm)
{
int world_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
comm_counter--;
printf("%s %i %s %i\n", "PMPI_Comm_free ", comm_counter, " from ", world_rank);
return PMPI_Comm_free(comm);
}
mpicc -c comm_split.c -o comm_split.o
MPI_Comm_split
的主程序的简单示例和
MPI_Comm_free
#include "mpi.h"
int main()
{
MPI_Init(NULL, NULL);
// Get the rank and size in the original communicator
int world_rank, world_size;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
MPI_Comm_size(MPI_COMM_WORLD, &world_size);
int color = world_rank / 4; // Determine color based on row
// Split the communicator based on the color and use the
// original rank for ordering
MPI_Comm row_comm, row_comm2;
MPI_Comm_split(MPI_COMM_WORLD, color, world_rank, &row_comm);
MPI_Comm_split(MPI_COMM_WORLD, color, world_rank, &row_comm2);
int row_rank, row_size;
MPI_Comm_rank(row_comm, &row_rank);
MPI_Comm_size(row_comm, &row_size);
printf("WORLD RANK/SIZE: %d/%d \t ROW RANK/SIZE: %d/%d\n",
world_rank, world_size, row_rank, row_size);
MPI_Comm_free(&row_comm);
MPI_Finalize();
}
program test
include "mpif.h"
integer comm_world, group_world, new_comm, new_comm2, ierr
integer world_rank, world_size;
integer color
call MPI_INIT(ierr)
comm_world = MPI_COMM_WORLD
call MPI_Comm_rank(comm_world, world_rank, ierr);
color = world_rank / 4
call MPI_Comm_split(comm_world, color, world_rank, new_comm, ierr)
call MPI_Comm_split(comm_world, color, world_rank,
& new_comm2, ierr)
call MPI_Comm_free(new_comm, ierr)
call MPI_Finalize(ierr)
end program
MPI_Comm_split
和
MPI_Comm_free
mpif77 test.f comm_split.o
mpiCC test.cpp comm_split.o
MPI_Comm_split 1 from 3
MPI_Comm_split 1 from 0
MPI_Comm_split 1 from 1
MPI_Comm_split 1 from 2
MPI_Comm_split 2 from 0
PMPI_Comm_free 1 from 0
MPI_Comm_split 2 from 1
PMPI_Comm_free 1 from 1
MPI_Comm_split 2 from 2
PMPI_Comm_free 1 from 2
MPI_Comm_split 2 from 3
PMPI_Comm_free 1 from 3
关于fortran - 获取正在使用的 MPI Communicator 的数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53043835/
我有兴趣了解有关 Microsoft Office Communicator 的更多信息IM 客户端,以及它如何确定您的存在(即您是在计算机旁还是不在)。任何人都可以向我指出解释这一点的教程或 API
我正在使用 python。我正在尝试运行一个进程并使用 subprocess.popen 获取输出。阅读周围后,我看到人们使用 communicate()[0] 但那不在文档中,它用于示例。我想知道是
我正在使用 python。我正在尝试运行一个进程并使用 subprocess.popen 获取输出。阅读周围后,我看到人们使用 communicate()[0] 但那不在文档中,它用于示例。我想知道是
我有一些设置和拆卸脚本,它们使用 csrun.exe 为一些自动化测试准备本地计算模拟器。 C:\Program Files\Microsoft SDKs\Azure\Emulator\csrun.e
我想知道对这句名言最接地气的解释是什么: Don't communicate by sharing memory; share memory by communicating. (R. Pike) 在
(所以 this question has been asked before ,但在一般意义上,大多数响应都是在与多个服务器/客户端/等的一般网络通信的上下文中) 在简单的点对点通信协议(proto
我正在尽力将 C++ 模块链接到 python 绑定(bind)。我正在努力实现 boost mpi 通信。我正在将 boost.mpi.world 对象发送到 C++,它需要一个 boost::mp
情况是这样的: 我有一个正在运行的命令: import subprocess foo = subprocess.Popen('ls /', shell=True, stdout=subprocess.
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 7年前关闭。 Improve t
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 10年前关闭。 Improve this qu
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 2年前关闭。 Improve t
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 5 年前。 Improve
我曾与那些与同龄人在线聊天的人一起工作,他们不断地围绕想法进行讨论。我也曾与那些坚决拒绝并认为这是浪费时间的人一起工作。 在线实时聊天论坛对您特别有用吗?为什么或者为什么不? 在您的公司内部,还是在外
我在一个分为两组的 IT 部门工作。一组开发和管理应用程序,另一组管理公司的基础设施和服务器。我们面临的问题之一是沟通中断。我为应用程序组工作,我遇到的问题之一是当基础设施关闭服务器或刷新数据库时没有
我的团队与 IM 进行了很多交流。我们有时甚至会使用 IM 向在下一个立方体中的人提问。这样做的原因是我们都发现接听 IM 的干扰比说话要少得多。 尽管如此,我发现当我低头编码时,闪烁的消息窗口可能会
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 4年前关闭。 Improve thi
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 3年前关闭。 Improve t
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 10年前关闭。 Improve this qu
传输数据时,汉明码显然允许您重新创建已通过线路损坏的数据(纠错码)。 这是如何工作的,它的局限性是什么(如果有的话)? 有没有更好的纠错解决方案(相对于重传)?是否存在重传更好的情况? 最佳答案 让我
我是一名优秀的程序员,十分优秀!