oh-my-batch 0.4.5__tar.gz → 0.4.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/PKG-INFO +3 -5
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/README.md +1 -4
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/batch.py +0 -3
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/job.py +7 -1
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/pyproject.toml +1 -1
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/LICENSE +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/__init__.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/__main__.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/assets/__init__.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/assets/functions.sh +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/cli.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/combo.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/misc.py +0 -0
- {oh_my_batch-0.4.5 → oh_my_batch-0.4.7}/oh_my_batch/util.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: oh-my-batch
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.7
|
4
4
|
Summary:
|
5
5
|
License: GPL
|
6
6
|
Author: weihong.xu
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
16
17
|
Requires-Dist: fire (>=0.5.0,<0.6.0)
|
17
18
|
Description-Content-Type: text/markdown
|
18
19
|
|
@@ -120,15 +121,12 @@ EOF
|
|
120
121
|
omb batch \
|
121
122
|
add_work_dirs tmp/tasks/* - \
|
122
123
|
add_header_files tmp/lammps_header.sh - \
|
123
|
-
add_cmds "
|
124
|
+
add_cmds "./run.sh" - \
|
124
125
|
make tmp/lmp-{i}.slurm --concurrency 2
|
125
126
|
```
|
126
127
|
|
127
128
|
You will find batch scripts `tmp/lmp-0.slurm` and `tmp/lmp-1.slurm` in `tmp` directory.
|
128
129
|
|
129
|
-
`omb batch` will provide some useful functions in the batch script.
|
130
|
-
For example, `checkpoint` will check if the job is done and skip the job if it's done.
|
131
|
-
|
132
130
|
You can run the above script by `./examples/omb-batch.sh`,
|
133
131
|
|
134
132
|
### Track the state of job in job schedular
|
@@ -102,15 +102,12 @@ EOF
|
|
102
102
|
omb batch \
|
103
103
|
add_work_dirs tmp/tasks/* - \
|
104
104
|
add_header_files tmp/lammps_header.sh - \
|
105
|
-
add_cmds "
|
105
|
+
add_cmds "./run.sh" - \
|
106
106
|
make tmp/lmp-{i}.slurm --concurrency 2
|
107
107
|
```
|
108
108
|
|
109
109
|
You will find batch scripts `tmp/lmp-0.slurm` and `tmp/lmp-1.slurm` in `tmp` directory.
|
110
110
|
|
111
|
-
`omb batch` will provide some useful functions in the batch script.
|
112
|
-
For example, `checkpoint` will check if the job is done and skip the job if it's done.
|
113
|
-
|
114
111
|
You can run the above script by `./examples/omb-batch.sh`,
|
115
112
|
|
116
113
|
### Track the state of job in job schedular
|
@@ -86,9 +86,6 @@ class BatchMaker:
|
|
86
86
|
:param path: Path to save batch script files, use {i} to represent index
|
87
87
|
:param concurrency: Number of scripts to to make
|
88
88
|
"""
|
89
|
-
# inject pre-defined functions
|
90
|
-
self.add_header_files(get_asset('functions.sh'))
|
91
|
-
|
92
89
|
header = '\n'.join(self._script_header)
|
93
90
|
bottom = '\n'.join(self._script_bottom)
|
94
91
|
for i, work_dirs in enumerate(split_list(self._work_dirs, concurrency)):
|
@@ -87,7 +87,13 @@ class BaseJobManager:
|
|
87
87
|
break
|
88
88
|
|
89
89
|
time.sleep(interval)
|
90
|
-
|
90
|
+
for job in jobs:
|
91
|
+
error = False
|
92
|
+
if not JobState.is_success(job['state']):
|
93
|
+
logger.error('Job %s failed', job['script'])
|
94
|
+
error = True
|
95
|
+
if error:
|
96
|
+
raise RuntimeError('Some jobs failed')
|
91
97
|
|
92
98
|
def _update_jobs(self, jobs: List[dict], max_tries: int, submit_opts: str):
|
93
99
|
jobs = self._update_state(jobs)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|