chapel - Chapel LinearAlgebra 在调用 eig(csrA, left = true, right = true); 时报告错误
问题描述
使用在线 IDE中的教堂 进行原型设计,文档中关于如何使用模块的example2.chpl无法对复杂值的 CSR 稀疏矩阵-instance 进行操作。code
LinearAlgebra
proc
eig(…)
csrMatrixA
use LinearAlgebra.Sparse, IO.FormattedIO;
config var N = 3; // May use on the CLI-cmdline or here, below in the launcher's Arguments.add: --N=<aNumber>
var csrDOMAIN = CSRDomain( N, N ); // Create an empty 3x3 CSR domain ---------> https://chapel-lang.org/docs/primers/sparse.html#primers-sparse
var csrMatrixA = CSRMatrix( csrDOMAIN, complex ); // Create a CSR matrix over this domain
// The above is equivalent to: var matA: [csrDOMAIN] <dtype>;
csrDOMAIN += (1,1); // Add as an exemaple these indices to the sparse domain for all the nonzero data-cells
csrDOMAIN += (1,2);
csrDOMAIN += (2,2);
csrDOMAIN += (2,1);
csrDOMAIN += (3,3);
csrMatrixA.re = 1.23; // Set as an example all nonzero elements, all sparsely distributed over a domain indirectly described by csrDOMAIN, to a value of 1.23
csrMatrixA.im = -4.56; // Set as an example all nonzero elements, all sparsely distributed over a domain indirectly described by csrDOMAIN, to a value of-4.56i
writef( "CSR-Sparse Matrix A::[%i x %i] has values of:\n",
N,
N
);
writeln( csrMatrixA ); // A is now a 3x3 sparse matrix
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CRASH-REPORT:
var ( eigenVALUEs,
rightEigenVECTORs ) = eig( csrMatrixA, right = true ); // ------------------------------> https://chapel-lang.org/docs/modules/packages/LinearAlgebra.html#LinearAlgebra.eig
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TiO.RUN::
// .code.tio.chpl:22: error: unresolved call 'eig([CSDom(2,int(64),domain(2,int(64),false),true,false,false)] complex(128), left=1, right=1)'
// $CHPL_HOME/modules/packages/LinearAlgebra.chpl:1404: note: this candidate did not match: eig(A: [] ?t, param left = false, param right = false)
// $CHPL_HOME/modules/packages/LinearAlgebra.chpl:1404: note: because where clause evaluated to false
// $CHPL_HOME/modules/packages/LinearAlgebra.chpl:1618: note: candidates are: eig(A: [] ?t, param left = false, param right = false)
//
writeln( eigenVALUEs );
*/
编译器设置: 运行时参数:(与atm无关)--fast
--N=3
您能否提出建议:
a)满足预期语法(调用签名)的正确方法是什么
,
b)您能否将修复的 MCVE 代码示例进一步扩展,以演示如何进行eig()
-processing在一个非常稀疏、非对称的情况下以并行分布的方式实际运行。N x N
用于N ~ 2E7
(拥有实际数据)的CSR 域~ 5 [GB]
,不是因为 RAM 大小而分布,而是为了在多个区域设置更快的处理,以便有效地利用所有可用的 CPU 资源
和
c)什么是网络教堂处理如果以托管的单一区域设置处理为基准,这种方法的加速?
追溯:
$CHPL_HOME/modules/packages/LinearAlgebra.chpl:1404: note:
this candidate did not match: eig(A: [] ?t, param left = false, param right = false)
$CHPL_HOME/modules/packages/LinearAlgebra.chpl:1404: note:
because where clause evaluated to false
$CHPL_HOME/modules/packages/LinearAlgebra.chpl:1618: note:
candidates are: eig(A: [] ?t, param left = false, param right = false)
最近的重新测试,在提交 Ben Albrecht 的[issue-14725]票后,确认两者(complex)
和(int)
eltType -s 以类似的方式崩溃,但(real)
CSRMatrix()
-instance 引发 LAPACK-code 错误:如更新代码中所述
$CHPL_HOME/modules/packages/LAPACK.chpl:19775: error:
c_ptrTo unsupported array type
解决方案
a)看起来这是线性代数库的一个未实现的功能。我在这里提出了一个问题:https ://github.com/chapel-lang/chapel/issues/14725
LinearAlgebra
b) Chapel 1.20 在模块中还没有分布式特征求解器。如果您觉得它有价值,我鼓励您在 github 存储库上打开一个请求此功能的问题。
c) 见 (b)
推荐阅读
- rest - 如何使用 REST API 更新 VSTS 测试运行的失败测试和通过率字段?
- python - 使用 Python 从数据框中删除仅具有单个单词的列值
- php - 使用 .htaccess 删除 .php 并重定向到其非 .php 版本
- python-3.x - 将值作为对象而不是字符串值的方法
- ruby-on-rails - Rails 构建belongs_to 关联“必须存在”错误
- angular - 如何跟踪数据是否以完全反应的方式加载?
- c++ - C++ 根据调用的构造函数强制编译时错误
- android - 使用 Android 导航架构组件重新创建 backstack
- ssh - 带有堡垒和自定义 SSH 端口 + 代理转发的 Kubespray
- spring-data-jpa - 使用两个参数列表在 Spring JPA 中查询