gpt4 book ai didi

c++ - 黑人 : processor grids that do not use all MPI cores

转载 作者:太空宇宙 更新时间:2023-11-04 04:21:53 24 4
gpt4 key购买 nike

当处理器网格未使用所有可用的 MPI 内核时,我在使用 Scalapack 时遇到问题。假设我知道要设置的网格 Pc*Pr<=NP

当我设置进程网格时

Cblacs_get(0, 0, &ctxt);
const char *order = ( column_major ? "Col" : "Row" );
Cblacs_gridinit(&ctxt, order, procrows, proccols);
Cblacs_gridinfo( ctxt, &procrows, &proccols, &myrow, &mycol );

Cblacs_gridinfo将输入网格大小从 2 更改为x 2-1 x -1 .在这种情况下,我正在测试 11 MPI 内核。

这本身不会引发任何错误,但是当我尝试设置描述符 vector 时

int irsrc = 0, icsrc = 0;
descinit_(descA, &M, &N, &Mb, &Nb,&irsrc,&icsrc,&ctxt, &lda, &info);

在 ID 为 4-10 的进程上我收到错误

{   -1,   -1}:  On entry to DESCINIT parameter number    6 had an illegal value

问题:

处理不在网格上的 MPI 内核的正确方法是什么?我应该跳过所有内核上的所有内容吗

Cblacs_gridinfo( ctxt, &procrows, &proccols, &myrow, &mycol );

已返回 myrow=mycol=-1 ?这是 API 的一部分吗?

最佳答案

除非有人有更好的来源,否则 http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=139 中的第二篇文章提供了一个 C 示例,它只为进程调用 ScaLAPACK 函数

 if ((myrow>-1)&(mycol>-1)&(myrow<nprow)&(mycol<npcol)) {
// do the job
Cblacs_gridexit( 0 );
}

关于c++ - 黑人 : processor grids that do not use all MPI cores,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46041592/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com