File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
source/source_pw/module_pwdft/operator_pw Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ void get_exx_potential(const K_Vectors* kv,
176176#ifdef __CUDA
177177 cudaError_t err = cudaHostRegister (pot_cpu, sizeof (Real) * npw, cudaHostRegisterPortable);
178178 if (err != cudaSuccess) {
179- printf ( " 临时锁定失败: %s \n " , cudaGetErrorString (err) );
179+ throw std::runtime_error ( " failed to register potential CPU memory operations " );
180180 }
181181#endif
182182 syncmem_real_c2d_op ()(pot, pot_cpu, rhopw_dev->npw );
@@ -353,7 +353,7 @@ void get_exx_stress_potential(const K_Vectors* kv,
353353#ifdef __CUDA
354354 cudaError_t err = cudaHostRegister (pot_cpu, sizeof (Real) * npw, cudaHostRegisterPortable);
355355 if (err != cudaSuccess) {
356- printf ( " 临时锁定失败: %s \n " , cudaGetErrorString (err) );
356+ throw std::runtime_error ( " failed to register potential CPU memory operations " );
357357 }
358358#endif
359359 syncmem_real_c2d_op ()(pot, pot_cpu, rhopw_dev->npw );
You can’t perform that action at this time.
0 commit comments