Skip to content

Commit cd0830b

Browse files
committed
Delete useless myid
1 parent d1c958c commit cd0830b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

source/source_lcao/module_rt/evolve_elec.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void Evolve_elec<Device>::solve_psi(const int& istep,
118118
#ifdef __MPI
119119
// Access the rank of the calling process in the communicator
120120
int myid = 0;
121-
int root_proc = 0;
121+
const int root_proc = 0;
122122
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
123123

124124
// Gather psi to the root process
@@ -204,10 +204,7 @@ void Evolve_elec<Device>::solve_psi(const int& istep,
204204
syncmem_double_d2h_op()(&(ekb(ik, 0)), ekb_tensor.data<double>(), nband);
205205

206206
#ifdef __MPI
207-
int myid = 0;
208-
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
209-
int root_proc = 0;
210-
207+
const int root_proc = 0;
211208
if (use_lapack)
212209
{
213210
// Synchronize ekb to all MPI processes

0 commit comments

Comments
 (0)