@@ -46,8 +46,9 @@ void lapackEigen(int &npw, std::vector<std::complex<double>> &hm, double *e, boo
4646 char tmp_c1 = ' V' , tmp_c2 = ' U' ;
4747 zheev_ (&tmp_c1, &tmp_c2, &npw, hm.data (), &npw, e, work2, &lwork, rwork, &info);
4848 end = clock ();
49- if (outtime)
49+ if (outtime) {
5050 std::cout << " Lapack Run time: " << (double )(end - start) / CLOCKS_PER_SEC << " S" << std::endl;
51+ }
5152 delete[] rwork;
5253 delete[] work2;
5354}
@@ -78,7 +79,8 @@ class DiagoBPCGPrepare
7879 // calculate eigenvalues by LAPACK;
7980 double *e_lapack = new double [npw];
8081 auto ev = DIAGOTEST::hmatrix;
81- if (mypnum == 0 ) lapackEigen (npw, ev, e_lapack, false );
82+ if (mypnum == 0 ) { lapackEigen (npw, ev, e_lapack, false );
83+ }
8284 // initial guess of psi by perturbing lapack psi
8385 ModuleBase::ComplexMatrix psiguess (nband, npw);
8486 std::default_random_engine p (1 );
@@ -287,7 +289,8 @@ int main(int argc, char **argv)
287289
288290 testing::InitGoogleTest (&argc, argv);
289291 ::testing::TestEventListeners &listeners = ::testing::UnitTest::GetInstance ()->listeners ();
290- if (myrank != 0 ) delete listeners.Release (listeners.default_result_printer ());
292+ if (myrank != 0 ) { delete listeners.Release (listeners.default_result_printer ());
293+ }
291294
292295 int result = RUN_ALL_TESTS ();
293296 if (myrank == 0 && result != 0 )
0 commit comments