From 67ee5415e39b0ca3ac45c2cee103df1a9d39aba7 Mon Sep 17 00:00:00 2001 From: Denghui Lu Date: Thu, 13 May 2021 11:04:08 +0800 Subject: [PATCH 1/6] add Important hint for getting-started.md --- doc/getting-started.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/getting-started.md b/doc/getting-started.md index a1134b7fe6..8741b1af99 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -14,6 +14,7 @@ In this text, we will call the deep neural network that is used to represent the - [Run MD with LAMMPS](#run-md-with-lammps) - [Run path-integral MD with i-PI](#run-path-integral-md-with-i-pi) - [Use deep potential with ASE](#use-deep-potential-with-ase) +8. [Important Hint](#important-hint) ## Prepare data @@ -370,3 +371,10 @@ print(water.get_positions()) ``` [DP]:https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.143001 [DP-SE]:https://dl.acm.org/doi/10.5555/3327345.3327356 + +## Important hint +If you use deepmd-kit in a GPU environment, the acceptable value range of some variables are additionally restricted compared to the CPU environment due to the software's GPU implementations: +1. The number of atom type of training system must be less than 128. +2. The maximum distance between an atom and it's neighbor atoms must be less than 128. +3. The maximum number of atoms that can be accommodated within a single GPU is 10,000,000. +4. The total sel value of training parameter must be less than 4096. From 17aedce7bb6af8f010ec7cf222f0eb14ab125f59 Mon Sep 17 00:00:00 2001 From: denghuilu Date: Thu, 13 May 2021 11:45:43 +0800 Subject: [PATCH 2/6] add hint for some parameters --- deepmd/utils/argcheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index 51714ceaf1..87a0f6a57b 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -58,7 +58,7 @@ def descrpt_local_frame_args (): def descrpt_se_a_args(): - doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius.' + doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. It is noted that the total sel value must be less than 4096 in a GPU environment.' doc_rcut = 'The cut-off radius.' doc_rcut_smth = 'Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth`' doc_neuron = 'Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built.' @@ -348,7 +348,7 @@ def model_compression_type_args(): def model_args (): - doc_type_map = 'A list of strings. Give the name to each type of atoms.' + doc_type_map = 'A list of strings. Give the name to each type of atoms. It is noted that the number of atom type of training system must be less than 128 in a GPU environment.' doc_data_stat_nbatch = 'The model determines the normalization from the statistics of the data. This key specifies the number of `frames` in each `system` used for statistics.' doc_data_stat_protect = 'Protect parameter for atomic energy regression.' doc_type_embedding = "The type embedding." From 6b9a84d7bc6353c3e7417c285512854a00319e89 Mon Sep 17 00:00:00 2001 From: Denghui Lu Date: Thu, 13 May 2021 11:57:43 +0800 Subject: [PATCH 3/6] add Important hint for variables --- doc/getting-started.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/getting-started.md b/doc/getting-started.md index 8741b1af99..44757b7c33 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -374,7 +374,7 @@ print(water.get_positions()) ## Important hint If you use deepmd-kit in a GPU environment, the acceptable value range of some variables are additionally restricted compared to the CPU environment due to the software's GPU implementations: -1. The number of atom type of training system must be less than 128. -2. The maximum distance between an atom and it's neighbor atoms must be less than 128. -3. The maximum number of atoms that can be accommodated within a single GPU is 10,000,000. -4. The total sel value of training parameter must be less than 4096. +1. The number of atom type of a given system must be less than 128. +2. The maximum distance between an atom and it's neighbors must be less than 128. It can be controlled by setting the rcut value of training parameters. +3. Theoretically, the maximum number of atoms that a single GPU can accept is about 10,000,000. However, this value is actually limited by the GPU memory size currently, usually within 1000,000 atoms even at the model compression mode. +4. The total sel value of training parameters(set in the descriptor model/descriptor section) must be less than 4096. From 1934c77fd359fe27200134c854abacc3b4267328 Mon Sep 17 00:00:00 2001 From: denghuilu Date: Thu, 13 May 2021 16:04:06 +0800 Subject: [PATCH 4/6] Update argcheck.py --- deepmd/utils/argcheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index 87a0f6a57b..684b0eacbc 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -90,7 +90,7 @@ def descrpt_se_a_args(): def descrpt_se_t_args(): - doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius.' + doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. It is noted that the total sel value must be less than 4096 in a GPU environment.' doc_rcut = 'The cut-off radius.' doc_rcut_smth = 'Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth`' doc_neuron = 'Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built.' @@ -129,7 +129,7 @@ def descrpt_se_a_tpe_args(): def descrpt_se_r_args(): - doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius.' + doc_sel = 'A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. It is noted that the total sel value must be less than 4096 in a GPU environment.' doc_rcut = 'The cut-off radius.' doc_rcut_smth = 'Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth`' doc_neuron = 'Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built.' From c9737d748e7b1b163933ae4dfb64b0dfa4aedbb1 Mon Sep 17 00:00:00 2001 From: Denghui Lu Date: Thu, 13 May 2021 16:09:40 +0800 Subject: [PATCH 5/6] Update getting-started.md --- doc/getting-started.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/getting-started.md b/doc/getting-started.md index 44757b7c33..fb6dedacd9 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -14,7 +14,7 @@ In this text, we will call the deep neural network that is used to represent the - [Run MD with LAMMPS](#run-md-with-lammps) - [Run path-integral MD with i-PI](#run-path-integral-md-with-i-pi) - [Use deep potential with ASE](#use-deep-potential-with-ase) -8. [Important Hint](#important-hint) +8. [Known limitations](#known-limitations) ## Prepare data @@ -369,12 +369,13 @@ dyn = BFGS(water) dyn.run(fmax=1e-6) print(water.get_positions()) ``` -[DP]:https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.143001 -[DP-SE]:https://dl.acm.org/doi/10.5555/3327345.3327356 -## Important hint +## Known limitations If you use deepmd-kit in a GPU environment, the acceptable value range of some variables are additionally restricted compared to the CPU environment due to the software's GPU implementations: 1. The number of atom type of a given system must be less than 128. 2. The maximum distance between an atom and it's neighbors must be less than 128. It can be controlled by setting the rcut value of training parameters. 3. Theoretically, the maximum number of atoms that a single GPU can accept is about 10,000,000. However, this value is actually limited by the GPU memory size currently, usually within 1000,000 atoms even at the model compression mode. -4. The total sel value of training parameters(set in the descriptor model/descriptor section) must be less than 4096. +4. The total sel value of training parameters(in model/descriptor section) must be less than 4096. + +[DP]:https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.143001 +[DP-SE]:https://dl.acm.org/doi/10.5555/3327345.3327356 From 5a4e8ecb3159f3c949a77674dfad30f06eabf718 Mon Sep 17 00:00:00 2001 From: denghuilu Date: Mon, 31 May 2021 17:23:25 +0800 Subject: [PATCH 6/6] fix bug of issue 668 --- source/lib/src/prod_env_mat.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/src/prod_env_mat.cc b/source/lib/src/prod_env_mat.cc index c5e3223e9e..c9287fb53e 100644 --- a/source/lib/src/prod_env_mat.cc +++ b/source/lib/src/prod_env_mat.cc @@ -271,7 +271,7 @@ void deepmd::env_mat_nbor_update( memcpy(&inlist.numneigh, 8 + mesh_host, sizeof(int *)); memcpy(&inlist.firstneigh, 12 + mesh_host, sizeof(int **)); const int ago = mesh_host[0]; - if (ago == 0) { + if (ago == 0 || gpu_inlist.inum < inlist.inum) { const int inum = inlist.inum; if (gpu_inlist.inum < inum) { delete_device_memory(gpu_inlist.ilist);