From e3e5027c89db567bcdc2470c63f391a3cac2baac Mon Sep 17 00:00:00 2001 From: dzzz2001 Date: Thu, 22 Jan 2026 15:25:10 +0800 Subject: [PATCH] change col_major to row_major --- source/source_hsolver/kernels/cuda/diag_cusolvermp.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu index 032efd797b..003fa4f483 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu +++ b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu @@ -113,12 +113,13 @@ Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, // This is because the current implementation of the cusolvermp library is ONE process ONE GPU. // So, when we use cusolvermp, we must ensure that the number of processes is equal to the number of GPUs. // In a sense, the MPI usage strategy of ABACUS must be subject to the cusolvermp. + // Use ROW_MAJOR to match BLACS grid initialization (order='R' in parallel_2d.cpp) CUSOLVER_CHECK(cusolverMpCreateDeviceGrid(cusolverMpHandle, &this->grid, this->cusolverCalComm, this->nprows, this->npcols, - CUSOLVERMP_GRID_MAPPING_COL_MAJOR)); + CUSOLVERMP_GRID_MAPPING_ROW_MAJOR)); // 20240529 zhanghaochong // Actually, there should be three matrix descriptors, A matrix, B matrix, and output eigenvector matrix.