From 2da945a1f0967dd109c63eb540c90ff717945213 Mon Sep 17 00:00:00 2001 From: jinzx10 Date: Mon, 27 May 2024 19:13:34 +0800 Subject: [PATCH] follow advice from review --- source/module_basis/module_ao/parallel_2d.cpp | 3 +++ source/module_basis/module_ao/parallel_2d.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/module_basis/module_ao/parallel_2d.cpp b/source/module_basis/module_ao/parallel_2d.cpp index e793472f0c..4ac2bfefe5 100644 --- a/source/module_basis/module_ao/parallel_2d.cpp +++ b/source/module_basis/module_ao/parallel_2d.cpp @@ -1,6 +1,7 @@ #include "parallel_2d.h" #include +#include #include "module_base/blacs_connector.h" #include "module_base/scalapack_connector.h" @@ -107,6 +108,8 @@ int Parallel_2D::set( void Parallel_2D::set_serial(const int mg, const int ng) { + assert(mg > 0 && ng > 0); + nb = 1; dim0 = dim1 = 1; coord[0] = coord[1] = 0; diff --git a/source/module_basis/module_ao/parallel_2d.h b/source/module_basis/module_ao/parallel_2d.h index 9d829e8015..9905973698 100644 --- a/source/module_basis/module_ao/parallel_2d.h +++ b/source/module_basis/module_ao/parallel_2d.h @@ -114,7 +114,6 @@ class Parallel_2D /// map from local index to global index std::vector local2global_row_; std::vector local2global_col_; - // Peize Lin change int* to vector 2022.08.03 #ifdef __MPI void _init_proc_grid(const MPI_Comm comm, const bool mode);