@@ -78,8 +78,6 @@ void MSST::first_half()
7878 const int sd = mdp.msst_direction ;
7979 const double dthalf = 0.5 * mdp.md_dt ;
8080 double vol;
81- if ( GlobalV::MY_RANK == 0 )
82- {
8381 energy_ = potential + kinetic;
8482
8583 // propagate the time derivative of volume 1/2 step
@@ -118,9 +116,9 @@ void MSST::first_half()
118116 {
119117 pos[i] += vel[i] * mdp.md_dt ;
120118 }
121- }
122119#ifdef __MPI
123120 MPI_Bcast (pos , ucell.nat *3 ,MPI_DOUBLE,0 ,MPI_COMM_WORLD);
121+ MPI_Bcast (vel , ucell.nat *3 ,MPI_DOUBLE,0 ,MPI_COMM_WORLD);
124122#endif
125123
126124 ucell.update_pos_tau (pos);
@@ -142,8 +140,6 @@ void MSST::second_half()
142140
143141 const int sd = mdp.msst_direction ;
144142 const double dthalf = 0.5 * mdp.md_dt ;
145- if ( GlobalV::MY_RANK == 0 )
146- {
147143 energy_ = potential + kinetic;
148144
149145 // propagate velocities 1/2 step
@@ -158,7 +154,6 @@ void MSST::second_half()
158154
159155 // calculate Lagrangian position
160156 lag_pos -= mdp.msst_vel * ucell.omega / v0 * mdp.md_dt ;
161- }
162157
163158 ModuleBase::timer::tick (" MSST" , " second_half" );
164159}
0 commit comments