Skip to content

Commit bb685bf

Browse files
committed
fix: Access colvarproxy_lammps object from correct rank
1 parent d12d6b8 commit bb685bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lammps/src/COLVARS/fix_colvars.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,10 @@ void FixColvars::end_of_step()
846846
}
847847
}
848848

849+
if (proxy->total_forces_enabled()) {
850+
proxy->set_total_forces_valid();
851+
}
852+
849853
} else { // me != 0
850854
/* copy total force data into communication buffer */
851855
nme = 0;
@@ -864,10 +868,6 @@ void FixColvars::end_of_step()
864868
MPI_Rsend(comm_buf, nme*size_one, MPI_BYTE, 0, 0, world);
865869
}
866870

867-
if (proxy->total_forces_enabled()) {
868-
proxy->set_total_forces_valid();
869-
}
870-
871871
}
872872
}
873873

0 commit comments

Comments
 (0)