Skip to content

Commit aa1bb69

Browse files
authored
Merge pull request #881 from hongriTianqi/develop
test(LCAO): UT of functions in gint_gamma_rho.cpp
2 parents 2486f99 + 6987b30 commit aa1bb69

File tree

13 files changed

+9074
-3
lines changed

13 files changed

+9074
-3
lines changed

source/module_base/global_variable.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ std::string global_wannier_card;
122122
std::string global_pseudo_dir = "";
123123
std::string global_orbital_dir = ""; // liuyu add 2021-08-14
124124

125-
std::string global_pseudo_type
126-
= "upf"; // mohan add 2013-05-20, default is UPF, we can also use VWR (xiaohui add 2013-06-23)
125+
std::string global_pseudo_type = "auto";
127126
std::string global_epm_pseudo_card;
128127
std::string global_out_dir;
129128
std::string global_readin_dir; // zhengdy modified

source/src_io/wf_local.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,13 @@ void WF_Local::distri_lowf_new(double** ctot, const int& is,
481481

482482
delete[] work;
483483
#else
484-
ModuleBase::WARNING_QUIT("WF_Local::distri_lowf_new","check the code without MPI.");
484+
for (int i=0; i<GlobalV::NBANDS; i++)
485+
{
486+
for (int j=0; j<GlobalV::NLOCAL; j++)
487+
{
488+
lowf.wfc_gamma[is](i,j) = ctot[i][j];
489+
}
490+
}
485491
#endif
486492
return;
487493
}

source/src_lcao/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ add_library(
6666
OBJECT
6767
${objects}
6868
)
69+
70+
IF (BUILD_TESTING)
71+
add_subdirectory(test)
72+
endif()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
remove_definitions(-D__MPI)
2+
remove_definitions(-D__CUDA)
3+
remove_definitions(-D__ROCM)
4+
remove_definitions(-D__EXX)
5+
AddTest(
6+
TARGET hsolver_gamma_rho
7+
LIBS ${math_libs} base neighbor
8+
SOURCES gamma_rho_test.cpp ../../src_parallel/parallel_reduce.cpp ../../src_parallel/ft.cpp ../../src_pw/pw_basis.cpp ../../src_pw/pw_complement.cpp ../../src_pw/klist.cpp ../../src_parallel/parallel_kpoints.cpp ../gint_gamma.cpp ../gint_gamma_rho.cpp ../gint_tools.cpp ../grid_technique.cpp ../grid_base_beta.cpp ../grid_meshk.cpp ../grid_meshcell.cpp ../grid_bigcell.cpp ../grid_meshball.cpp ../../module_orbital/ORB_atomic.cpp ../../module_orbital/ORB_atomic_lm.cpp ../../module_orbital/ORB_gaunt_table.cpp ../../module_orbital/ORB_table_phi.cpp ../../module_orbital/ORB_table_beta.cpp ../../module_orbital/ORB_table_alpha.cpp ../../module_orbital/ORB_nonlocal_lm.cpp ../../module_orbital/ORB_nonlocal.cpp ../../module_cell/atom_spec.cpp ../../module_cell/atom_pseudo.cpp ../../module_cell/pseudo_nc.cpp ../../src_io/output.cpp
9+
)
10+
11+
install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

0 commit comments

Comments
 (0)