scalapack

Inconsistent rows allocation in scalapack

半城伤御伤魂 提交于 2020-05-17 07:07:21
问题 Consider the following simple fortran program program test_vec_allocation use mpi implicit none integer(kind=8) :: N ! =========================BLACS and MPI======================= integer :: ierr, size, rank,dims(2) ! ------------------------------------------------------------- integer, parameter :: block_size = 100 integer :: context, nprow, npcol, local_nprow, local_npcol integer :: numroc, indxl2g, descmat(9),descvec(9) integer :: mloc_mat ,nloc_mat ,mloc_vec ,nloc_vec call blacs_pinfo

Efficient way to find norm of distributed vector in SCALAPACK

本秂侑毒 提交于 2020-05-17 06:12:05
问题 consider the following piece of code using scalapack: ! if (norm2(h-x0) < tol) then tmp_vec = h - x0 call pdnrm2(N,norm,tmp_vec,1,1,descvec,1) if (norm < tol) then x=h converged = .true. exit endif s = r0 - alpha*v call pdgemv('N', N, N, 1.0, A, 1, 1, descmat, s, 1, 1, descvec, 1, 0.0,t, 1, 1, descvec, 1) its part of an iterative solver that i was trying, problem is that if my processor grid is two dimensional, my vectors do not have any elements on those procs, hence dnrm2 yields zero or the

Fix arithmetic error in distributed version

五迷三道 提交于 2020-01-11 10:47:27
问题 I am inverting a matrix via a Cholesky factorization, in a distributed environment, as it was discussed here. My code works fine, but in order to test that my distributed project produces correct results, I had to compare it with the serial version. The results are not exactly the same! For example, the last five cells of the result matrix are: serial gives: -250207683.634793 -1353198687.861288 2816966067.598196 -144344843844.616425 323890119928.788757 distributed gives: -250207683.634692

cholesky decomposition ScaLapack error

一个人想着一个人 提交于 2019-12-30 00:59:08
问题 I'm getting the following error and i'm not sure why. { 1, 1}: On entry to PDPOTRF parameter number 2 had an illegal value { 1, 0}: On entry to PDPOTRF parameter number 2 had an illegal value { 0, 1}: On entry to PDPOTRF parameter number 2 had an illegal value { 0, 0}: On entry to PDPOTRF parameter number 2 had an illegal value info < 0: If the i-th argument is an array and the j-entry had an illegal value, then INFO = -(i*100+j), if the i-th argument is a scalar and had an illegal value,

How to initialize two distinct blacs contexts?

♀尐吖头ヾ 提交于 2019-12-22 10:01:37
问题 I have a computer with nproc processors and I'd like to initialize two blacs grids, one of the dimension p x q = nprocs and one of the dimension 1 x 1 . Assume MPI allready initialized and a routine finding good block sizes, the first grid is initialized via call blacs_get( -1, 0, self%context ) call blacs_gridinit( self%context, 'R', self%nprows, self%npcols ) call blacs_gridinfo( self%context, self%nprows, self%npcols, self%myrow, self%mycol ) But how do I set up the second? Do I have to

Cholesky with ScaLAPACK

烈酒焚心 提交于 2019-12-11 03:17:44
问题 I am trying to do a Cholesky decomposition via pdpotrf() of MKL-Intel's library, which uses ScaLAPACK. I am reading the whole matrix in the master node and then distribute it like in this example. Everything works fine when the dimension of the SPD matrix is even. However, when it's odd, pdpotrf() thinks that the matrix is not positive definite. Could it be because the submatrices are not SPD? I am working with this matrix: and the submatrices are (with 4 processes and blocks of size 2x2): A

Fix arithmetic error in distributed version

懵懂的女人 提交于 2019-12-02 02:21:06
I am inverting a matrix via a Cholesky factorization, in a distributed environment, as it was discussed here . My code works fine, but in order to test that my distributed project produces correct results, I had to compare it with the serial version. The results are not exactly the same! For example, the last five cells of the result matrix are: serial gives: -250207683.634793 -1353198687.861288 2816966067.598196 -144344843844.616425 323890119928.788757 distributed gives: -250207683.634692 -1353198687.861386 2816966067.598891 -144344843844.617096 323890119928.788757 I had post in the Intel

cholesky decomposition ScaLapack error

强颜欢笑 提交于 2019-11-30 05:07:50
I'm getting the following error and i'm not sure why. { 1, 1}: On entry to PDPOTRF parameter number 2 had an illegal value { 1, 0}: On entry to PDPOTRF parameter number 2 had an illegal value { 0, 1}: On entry to PDPOTRF parameter number 2 had an illegal value { 0, 0}: On entry to PDPOTRF parameter number 2 had an illegal value info < 0: If the i-th argument is an array and the j-entry had an illegal value, then INFO = -(i*100+j), if the i-th argument is a scalar and had an illegal value, then INFO = -i. I Know what the error messages means but I followed the dated documentation available on

Confused with pdpotrf arguments

南笙酒味 提交于 2019-11-29 16:01:53
I want to do a Cholesky factorization in a distributed environment. For that purpose, I use pdpotrf() . However, I am struggling understanding the parameters needed by the function and they provide no C example on how to use it (and an example would be really great to have). Assume I have a NxX matrix I want to factorize. Then, what values should the parameters have? uplo , a and info are well defined in my mind. How about the rest? n should be equal to N I would say. However, desca , ia and ja are the ones that confuse me. Moreover, desca is global and local, something that I can't understand

Confused with pdpotrf arguments

给你一囗甜甜゛ 提交于 2019-11-28 09:23:46
问题 I want to do a Cholesky factorization in a distributed environment. For that purpose, I use pdpotrf(). However, I am struggling understanding the parameters needed by the function and they provide no C example on how to use it (and an example would be really great to have). Assume I have a NxX matrix I want to factorize. Then, what values should the parameters have? uplo , a and info are well defined in my mind. How about the rest? n should be equal to N I would say. However, desca , ia and