@@ -84,11 +84,6 @@ void sparse_format::cal_HSR(const UnitCell& ucell,
8484{
8585 ModuleBase::TITLE (" sparse_format" , " cal_HSR" );
8686
87- int my_rank = 0 ;
88- int nproc = 1 ;
89- MPI_Comm_rank (MPI_COMM_WORLD, &my_rank);
90- MPI_Comm_size (MPI_COMM_WORLD, &nproc);
91-
9287 // sparse_format::set_R_range(HS_Arrays.all_R_coor, grid);
9388
9489 const int nspin = PARAM.inp .nspin ;
@@ -101,25 +96,6 @@ void sparse_format::cal_HSR(const UnitCell& ucell,
10196
10297 HS_Arrays.all_R_coor = get_R_range (*(p_ham_lcao->getHR ()));
10398
104- #ifdef __MPI
105- // Fix: Sync all_R_coor across processes
106- sparse_format::sync_all_R_coor (HS_Arrays.all_R_coor , MPI_COMM_WORLD);
107-
108- // ===================== MPI debug =====================//
109- std::string debug_file = " debug_fix_rank_" + std::to_string (my_rank) + " .log" ;
110- std::ofstream fout (debug_file, std::ios::app);
111-
112- fout << " Process " << my_rank + 1 << " /" << nproc
113- << " : HS_Arrays.all_R_coor.size() = " << HS_Arrays.all_R_coor .size () << std::endl;
114- for (const auto & R: HS_Arrays.all_R_coor )
115- {
116- fout << " R = (" << R.x << " , " << R.y << " , " << R.z << " )" << std::endl;
117- }
118- fout.close ();
119- MPI_Barrier (MPI_COMM_WORLD);
120- // ===================== debug end =====================//
121- #endif
122-
12399 if (TD_Velocity::tddft_velocity)
124100 {
125101 sparse_format::cal_HContainer_td (pv,
@@ -147,11 +123,6 @@ void sparse_format::cal_HSR(const UnitCell& ucell,
147123
148124 HS_Arrays.all_R_coor = get_R_range (*(p_ham_lcao->getHR ()));
149125
150- #ifdef __MPI
151- // Fix: Sync all_R_coor across processes
152- sparse_format::sync_all_R_coor (HS_Arrays.all_R_coor , MPI_COMM_WORLD);
153- #endif
154-
155126 sparse_format::cal_HContainer_cd (pv, current_spin, sparse_thr, *(p_ham_lcao->getHR ()), HS_Arrays.HR_soc_sparse );
156127
157128 sparse_format::cal_HContainer_cd (pv, current_spin, sparse_thr, *(p_ham_lcao->getSR ()), HS_Arrays.SR_soc_sparse );
0 commit comments