Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions source/source_hsolver/test/diago_lcao_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ TEST_P(DiagoGammaOnlyTest, LCAO)
std::stringstream out_info;
DiagoPrepare<double> dp = GetParam();
ASSERT_TRUE(dp.produce_HS());

// Skip lapack tests in multi-process environment
// LAPACK is a serial solver and cannot work with distributed matrices
if (dp.ks_solver == "lapack" && dp.dsize > 1)
{
GTEST_SKIP() << "Skipping lapack test with " << dp.dsize
<< " MPI processes (lapack only supports single process)";
}

dp.diago();

if (dp.myrank == 0)
Expand Down Expand Up @@ -336,6 +345,15 @@ TEST_P(DiagoKPointsTest, LCAO)
std::stringstream out_info;
DiagoPrepare<std::complex<double>> dp = GetParam();
ASSERT_TRUE(dp.produce_HS());

// Skip lapack tests in multi-process environment
// LAPACK is a serial solver and cannot work with distributed matrices
if (dp.ks_solver == "lapack" && dp.dsize > 1)
{
GTEST_SKIP() << "Skipping lapack test with " << dp.dsize
<< " MPI processes (lapack only supports single process)";
}

dp.diago();

if (dp.myrank == 0)
Expand Down Expand Up @@ -378,9 +396,6 @@ int main(int argc, char** argv)
std::cout << "ERROR:some tests are not passed" << std::endl;
return result;
}
else
{
MPI_Finalize();
return 0;
}
MPI_Finalize();
return 0;
}
Loading