0

我目前的模型在 4 个进程上运行离散网格投影。我通过以下方式创建网格:

    std::vector<int> processDimensions;
processDimensions.push_back(2);
processDimensions.push_back(2);

// The grid projection will contain agents of type VirusCellInteractionAgents, so that it can facilitate all agents types
// Then we can use the agent type identifier in each agent ID, to cast them to the correct type of agent.
discreteGridSpace = new repast::SharedDiscreteSpace<VirusCellInteractionAgents, repast::WrapAroundBorders, repast::SimpleAdder<VirusCellInteractionAgents>>("AgentsDeiscreteSpace", gridDimensions, processDimensions, 2, comm);

我想尝试在 8 或 16 个进程上运行模型,所以我想知道,在这种情况下 processDimensions 应该是什么。我尝试像最初一样在每个轴上保持 2,但是在第一次 grid balance() 调用之后导致以下错误

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 71163 RUNNING AT Aleksandars-MBP
=   EXIT CODE: 11
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault: 11 (signal 11)
4

1 回答 1

0

维度应乘以进程数。因此,8 的 4x2 或 16 的 4x4。

于 2022-03-03T18:20:03.013 回答