From aa9cca4498776b8f320b35f71adfccf8f9f4fa6a Mon Sep 17 00:00:00 2001 From: Zheyong Fan Date: Tue, 20 Sep 2022 04:09:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20a=20bug=20about=20sdc=20when=20num?= =?UTF-8?q?=E2=80=94=5Fatom*run=5Fsteps=20is=20too=20large?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/measure/sdc.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/measure/sdc.cu b/src/measure/sdc.cu index 890bcbd3f..71b839bda 100644 --- a/src/measure/sdc.cu +++ b/src/measure/sdc.cu @@ -194,7 +194,7 @@ void SDC::postprocess(const char* input_dir) CHECK(cudaDeviceSynchronize()); // needed for pre-Pascal GPU // normalize by the number of atoms and number of time origins - const double vac_scaler = 1.0 / (num_atoms_ * num_time_origins_); + const double vac_scaler = 1.0 / ((double)num_atoms_ * (double)num_time_origins_); for (int nc = 0; nc < num_correlation_steps_; nc++) { vacx_[nc] *= vac_scaler; vacy_[nc] *= vac_scaler;