@@ -1366,6 +1366,30 @@ void NEP::compute_small_box(
1366
1366
r12.data () + size_x12 * 5 );
1367
1367
GPU_CHECK_KERNEL
1368
1368
1369
+ static int num_calls = 0 ;
1370
+ if (num_calls++ % 1000 == 0 ) {
1371
+ std::vector<int > cpu_NN_radial (type.size ());
1372
+ std::vector<int > cpu_NN_angular (type.size ());
1373
+ NN_radial.copy_to_host (cpu_NN_radial.data ());
1374
+ NN_angular.copy_to_host (cpu_NN_angular.data ());
1375
+ int radial_actual = 0 ;
1376
+ int angular_actual = 0 ;
1377
+ for (int n = 0 ; n < N; ++n) {
1378
+ if (radial_actual < cpu_NN_radial[n]) {
1379
+ radial_actual = cpu_NN_radial[n];
1380
+ }
1381
+ if (angular_actual < cpu_NN_angular[n]) {
1382
+ angular_actual = cpu_NN_angular[n];
1383
+ }
1384
+ }
1385
+ std::ofstream output_file (" neighbor.out" , std::ios_base::app);
1386
+ output_file << " Neighbor info at step " << num_calls - 1 << " : "
1387
+ << " radial(max=" << paramb.MN_radial << " ,actual=" << radial_actual
1388
+ << " ), angular(max=" << paramb.MN_angular << " ,actual=" << angular_actual << " )."
1389
+ << std::endl;
1390
+ output_file.close ();
1391
+ }
1392
+
1369
1393
const bool is_polarizability = paramb.model_type == 2 ;
1370
1394
find_descriptor_small_box<<<grid_size, BLOCK_SIZE>>> (
1371
1395
paramb,
@@ -1939,6 +1963,30 @@ void NEP::compute_small_box(
1939
1963
r12.data () + size_x12 * 5 );
1940
1964
GPU_CHECK_KERNEL
1941
1965
1966
+ static int num_calls = 0 ;
1967
+ if (num_calls++ % 1000 == 0 ) {
1968
+ std::vector<int > cpu_NN_radial (type.size ());
1969
+ std::vector<int > cpu_NN_angular (type.size ());
1970
+ NN_radial.copy_to_host (cpu_NN_radial.data ());
1971
+ NN_angular.copy_to_host (cpu_NN_angular.data ());
1972
+ int radial_actual = 0 ;
1973
+ int angular_actual = 0 ;
1974
+ for (int n = 0 ; n < N; ++n) {
1975
+ if (radial_actual < cpu_NN_radial[n]) {
1976
+ radial_actual = cpu_NN_radial[n];
1977
+ }
1978
+ if (angular_actual < cpu_NN_angular[n]) {
1979
+ angular_actual = cpu_NN_angular[n];
1980
+ }
1981
+ }
1982
+ std::ofstream output_file (" neighbor.out" , std::ios_base::app);
1983
+ output_file << " Neighbor info at step " << num_calls - 1 << " : "
1984
+ << " radial(max=" << paramb.MN_radial << " ,actual=" << radial_actual
1985
+ << " ), angular(max=" << paramb.MN_angular << " ,actual=" << angular_actual << " )."
1986
+ << std::endl;
1987
+ output_file.close ();
1988
+ }
1989
+
1942
1990
find_descriptor_small_box<<<grid_size, BLOCK_SIZE>>> (
1943
1991
temperature,
1944
1992
paramb,
0 commit comments