From 0aac194eb28c005e15fc3417ea9d6a04b0ee0e1c Mon Sep 17 00:00:00 2001 From: Erjie Wu <110683255+ErjieWu@users.noreply.github.com> Date: Sat, 4 Jan 2025 21:33:04 +0800 Subject: [PATCH] Update cal_gvx.cpp --- source/module_hamilt_lcao/module_deepks/cal_gvx.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/module_hamilt_lcao/module_deepks/cal_gvx.cpp b/source/module_hamilt_lcao/module_deepks/cal_gvx.cpp index 0a301459cf..acd4044510 100644 --- a/source/module_hamilt_lcao/module_deepks/cal_gvx.cpp +++ b/source/module_hamilt_lcao/module_deepks/cal_gvx.cpp @@ -98,6 +98,11 @@ void LCAO_Deepks::check_gvx(const int nat, const torch::Tensor& gvx) std::ofstream ofs_x; std::ofstream ofs_y; std::ofstream ofs_z; + + if (GlobalV::MY_RANK != 0) + { + return; + } ofs_x << std::setprecision(12); ofs_y << std::setprecision(12);