From 85b19515bb15625f9629cdc7e40eaa01c4b5d25d Mon Sep 17 00:00:00 2001 From: Qianruipku Date: Sun, 5 Jan 2025 21:13:11 +0800 Subject: [PATCH] update GPU results --- source/module_esolver/esolver_ks_pw.cpp | 6 ++++++ tests/integrate/102_PW_BPCG_GPU/result.ref | 10 +++++----- tests/integrate/102_PW_CG_GPU/result.ref | 10 +++++----- tests/integrate/102_PW_DA_davidson_GPU/result.ref | 10 +++++----- tests/integrate/187_PW_MD_SDFT_ALL_GPU/result.ref | 8 ++++---- tests/integrate/187_PW_SDFT_ALL_GPU/result.ref | 4 ++-- tests/integrate/187_PW_SDFT_MALL_GPU/result.ref | 10 +++++----- 7 files changed, 32 insertions(+), 26 deletions(-) diff --git a/source/module_esolver/esolver_ks_pw.cpp b/source/module_esolver/esolver_ks_pw.cpp index 45e474b0be..f1692283ca 100644 --- a/source/module_esolver/esolver_ks_pw.cpp +++ b/source/module_esolver/esolver_ks_pw.cpp @@ -138,6 +138,12 @@ void ESolver_KS_PW::before_all_runners(UnitCell& ucell, const Input_p { // 1) call before_all_runners() of ESolver_KS ESolver_KS::before_all_runners(ucell, inp); +#if defined(__CUDA) || defined(__ROCM) + if (PARAM.inp.device == "gpu") + { + this->pw_wfc->get_ig2ixyz_k(); + } +#endif // 3) initialize ElecState, if (this->pelec == nullptr) diff --git a/tests/integrate/102_PW_BPCG_GPU/result.ref b/tests/integrate/102_PW_BPCG_GPU/result.ref index db3463bc99..41371e10fd 100644 --- a/tests/integrate/102_PW_BPCG_GPU/result.ref +++ b/tests/integrate/102_PW_BPCG_GPU/result.ref @@ -1,8 +1,8 @@ -etotref -4869.74705201 -etotperatomref -2434.87352600 -totalforceref 5.19483200 -totalstressref 37241.45338000 +etotref -4869.7470518350019120 +etotperatomref -2434.8735259175 +totalforceref 5.207670 +totalstressref 37241.465646 pointgroupref C_1 spacegroupref C_1 nksibzref 8 -totaltimeref +1.32321 +totaltimeref 4.25 diff --git a/tests/integrate/102_PW_CG_GPU/result.ref b/tests/integrate/102_PW_CG_GPU/result.ref index db3463bc99..a41d4958d6 100644 --- a/tests/integrate/102_PW_CG_GPU/result.ref +++ b/tests/integrate/102_PW_CG_GPU/result.ref @@ -1,8 +1,8 @@ -etotref -4869.74705201 -etotperatomref -2434.87352600 -totalforceref 5.19483200 -totalstressref 37241.45338000 +etotref -4869.7470519303351466 +etotperatomref -2434.8735259652 +totalforceref 5.195370 +totalstressref 37242.031490 pointgroupref C_1 spacegroupref C_1 nksibzref 8 -totaltimeref +1.32321 +totaltimeref 4.13 diff --git a/tests/integrate/102_PW_DA_davidson_GPU/result.ref b/tests/integrate/102_PW_DA_davidson_GPU/result.ref index db3463bc99..5c69f05f9a 100644 --- a/tests/integrate/102_PW_DA_davidson_GPU/result.ref +++ b/tests/integrate/102_PW_DA_davidson_GPU/result.ref @@ -1,8 +1,8 @@ -etotref -4869.74705201 -etotperatomref -2434.87352600 -totalforceref 5.19483200 -totalstressref 37241.45338000 +etotref -4869.7470518365098542 +etotperatomref -2434.8735259183 +totalforceref 5.200640 +totalstressref 37241.467259 pointgroupref C_1 spacegroupref C_1 nksibzref 8 -totaltimeref +1.32321 +totaltimeref 4.79 diff --git a/tests/integrate/187_PW_MD_SDFT_ALL_GPU/result.ref b/tests/integrate/187_PW_MD_SDFT_ALL_GPU/result.ref index ef2e7fcc80..392d98ea95 100644 --- a/tests/integrate/187_PW_MD_SDFT_ALL_GPU/result.ref +++ b/tests/integrate/187_PW_MD_SDFT_ALL_GPU/result.ref @@ -1,5 +1,5 @@ -etotref -228.9492279657028 -etotperatomref -114.4746139829 +etotref -228.9492273621296 +etotperatomref -114.4746136811 totalforceref 0.510260 -totalstressref 42801.474893 -totaltimeref 7.82 +totalstressref 42801.475682 +totaltimeref 5.50 diff --git a/tests/integrate/187_PW_SDFT_ALL_GPU/result.ref b/tests/integrate/187_PW_SDFT_ALL_GPU/result.ref index dd61868257..3e011155c8 100644 --- a/tests/integrate/187_PW_SDFT_ALL_GPU/result.ref +++ b/tests/integrate/187_PW_SDFT_ALL_GPU/result.ref @@ -1,5 +1,5 @@ -etotref -105.2612355454176907 +etotref -105.2612355454177191 etotperatomref -52.6306177727 totalforceref 197.906706 totalstressref 254537.682905 -totaltimeref 20.82 +totaltimeref 11.36 diff --git a/tests/integrate/187_PW_SDFT_MALL_GPU/result.ref b/tests/integrate/187_PW_SDFT_MALL_GPU/result.ref index dafd960f93..2137525518 100644 --- a/tests/integrate/187_PW_SDFT_MALL_GPU/result.ref +++ b/tests/integrate/187_PW_SDFT_MALL_GPU/result.ref @@ -1,5 +1,5 @@ -etotref -96.9361115889958853 -etotperatomref -48.4680557945 -totalforceref 248.975546 -totalstressref 230454.805813 -totaltimeref 5.17 +etotref -96.9361114247635811 +etotperatomref -48.4680557124 +totalforceref 248.974900 +totalstressref 230455.686659 +totaltimeref 3.58