Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CH4 & Al param.json for deepmd-kit-1.1.0 ;modify doc #190

Merged
merged 4 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,9 @@ The following table gives explicit descriptions on keys in param.json.
| # Followings are keys in resources
| numb_node | Integer | 1 | Node count required for the job
| task_per_node | Integer | 4 | Number of CPU cores required
| numb_gpu | Integer | 4 | Number of GPUs required
| numb_gpu | Integer | Integer | 4 | Number of GPUs required
| manual_cuda_devices | Interger | 1 | Used with key "manual_cuda_multiplicity" specify the gpu number
| manual_cuda_multiplicity |Interger | 5 | Used in 01.model_devi,used with key "manual_cuda_devices" specify the MD program number running on one GPU at the same time,dpgen will automatically allocate MD jobs on different GPU. This can improve GPU usage for GPU like V100.
| node_cpu | Integer | 4 | Only for LSF. The number of CPU cores on each node that should be allocated to the job.
| source_list | List of string | "....../vasp.env" | Environment needed for certain job. For example, if "env" is in the list, 'source env' will be written in the script.
| module_list | List of string | [ "Intel/2018", "Anaconda3"] | For example, If "Intel/2018" is in the list, "module load Intel/2018" will be written in the script.
Expand Down
18 changes: 9 additions & 9 deletions dpgen/dispatcher/Batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def sub_script(self,
# loop over commands
self.cmd_cnt = 0
try:
self.manual_gpu = res['manual_cuda_devices']
except:
self.manual_gpu = 0
self.manual_cuda_devices = res['manual_cuda_devices']
except KeyError:
self.manual_cuda_devices = 0
try:
self.manual_gpu_multiplicity = res['manual_cuda_multiplicity']
except:
self.manual_gpu_multiplicity = 1
self.manual_cuda_multiplicity = res['manual_cuda_multiplicity']
except KeyError:
self.manual_cuda_multiplicity = 1
for ii in range(len(cmd)):
# for one command
ret += self._sub_script_inner(job_dirs,
Expand Down Expand Up @@ -140,7 +140,7 @@ def _sub_script_inner(self,
for ii,jj in zip(job_dirs, args) :
ret += 'cd %s\n' % ii
ret += 'test $? -ne 0 && exit\n\n'
if self.manual_gpu <= 0:
if self.manual_cuda_devices <= 0:
ret += 'if [ ! -f tag_%d_finished ] ;then\n' % idx
ret += ' %s 1>> %s 2>> %s \n' % (self.sub_script_cmd(cmd, jj, res), outlog, errlog)
if res['allow_failure'] is False:
Expand All @@ -151,11 +151,11 @@ def _sub_script_inner(self,
else :
# do not support task-wise restart
tmp_cmd = ' %s 1>> %s 2>> %s ' % (self.sub_script_cmd(cmd, jj, res), outlog, errlog)
ret += 'CUDA_VISIBLE_DEVICES=%d %s &\n\n' % ((self.cmd_cnt % self.manual_gpu), tmp_cmd)
ret += 'CUDA_VISIBLE_DEVICES=%d %s &\n\n' % ((self.cmd_cnt % self.manual_cuda_devices), tmp_cmd)
self.cmd_cnt += 1
ret += 'cd %s\n' % self.context.remote_root
ret += 'test $? -ne 0 && exit\n'
if self.manual_gpu > 0 and self.cmd_cnt % (self.manual_gpu * self.manual_gpu_multiplicity) == 0:
if self.manual_cuda_devices > 0 and self.cmd_cnt % (self.manual_cuda_devices * self.manual_cuda_multiplicity) == 0:
ret += '\nwait\n\n'
ret += '\nwait\n\n'
return ret
Loading