Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
12281014
Commit
12281014
authored
3 years ago
by
Xingran Wang
Browse files
Options
Downloads
Patches
Plain Diff
reduce number of submit jobs
parent
36a26385
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/template_file.sh.jinja
+11
-5
11 additions, 5 deletions
tests/template_file.sh.jinja
tests/template_generate_submit.py
+29
-31
29 additions, 31 deletions
tests/template_generate_submit.py
with
40 additions
and
36 deletions
tests/template_file.sh.jinja
+
11
−
5
View file @
12281014
#! /bin/bash
#SBATCH --job-name {{ name_job }}
#SBATCH -t 0
0:1
0:00
#SBATCH -t 0
1:3
0:00
#SBATCH --nodes {{ num_node }}
#SBATCH --tasks-per-node 48
#SBATCH --partition {{ partition }}
...
...
@@ -45,8 +45,14 @@ export SCT_CALLSTATS=1
# ./pio_write_deco2d.parallel "-qprefix=$qprefix" -qpio-role-scheme={{ pio_role_scheme }} \
# -c -m 384 -n 192 -z 95 -t 20 -y 60 -s 7 \
# -f grb2 -p PIO_MPI_FW_AT_ALL -w 16
time
../libtool
--mode
=
execute srun
\
./pio_write.parallel
"-qprefix=
$qprefix
"
-qpio-role-scheme
={{
pio_role_scheme
}}
\
-c
-m
768
-n
384
-z
95
-t
10
-y
120
-s
7
\
-f
{{
format
}}
-p
PIO_MPI_FW_AT_ALL
-w
{{
num_io_task
}}
{
%
for
num_io_task
in
num_io_tasks %
}
for
((
i
=
0
;
i<3
;
++i
))
;
do
time
../libtool
--mode
=
execute srun
\
./pio_write_deco2d.parallel
"-qprefix=
$qprefix
"
-qpio-role-scheme
={{
pio_role_scheme
}}
\
-c
-m
768
-n
384
-z
95
-t
10
-y
120
-s
7
\
-f
{{
format
}}
-p
PIO_MPI_FW_AT_ALL
-w
{{
num_io_task
}}
echo
"ABOVE: number of I/O servers -- {{ num_io_task }}"
done
{
% endfor %
}
set
+x
This diff is collapsed.
Click to expand it.
tests/template_generate_submit.py
+
29
−
31
View file @
12281014
...
...
@@ -25,37 +25,35 @@ template = env.get_template("template_file.sh.jinja")
num_nodes
=
list
(
range
(
5
,
11
))
num_io_tasks
=
list
(
range
(
8
,
56
,
8
))
config
[
'
num_io_tasks
'
]
=
num_io_tasks
for
num_node
in
num_nodes
:
for
num_io_task
in
num_io_tasks
:
config
[
'
name_job
'
]
=
(
f
"
pio_benchmark.
{
partition
}
.
{
compiler
}
"
f
"
.
{
branch_short
}
.num_node-
{
num_node
}
"
f
"
.num_io_task-
{
num_io_task
}
"
f
"
.
{
pio_role_scheme
}
"
f
"
.
{
output_format
}
"
)
config
[
'
num_node
'
]
=
num_node
config
[
'
num_io_task
'
]
=
num_io_task
config
[
'
name_job
'
]
=
(
f
"
pio_benchmark.
{
partition
}
.
{
compiler
}
"
f
"
.
{
branch_short
}
.num_node-
{
num_node
}
"
f
"
.
{
pio_role_scheme
}
"
f
"
.
{
output_format
}
"
)
config
[
'
num_node
'
]
=
num_node
# print(template.render(**config))
run_script
=
(
f
"
pio_benchmark.num_node-
{
num_node
}
"
f
"
.num_io_task-
{
num_io_task
}
"
f
"
.
{
pio_role_scheme
}
.run
"
f
"
.
{
output_format
}
"
)
with
open
(
run_script
,
mode
=
"
w
"
)
as
f
:
f
.
write
(
template
.
render
(
**
config
))
f
.
flush
()
for
_
in
range
(
3
):
if
job_id
==
0
:
# first submit
shell_process
=
run
([
'
sbatch
'
,
run_script
],
stdout
=
PIPE
)
else
:
# job has been submitted
shell_process
=
run
([
'
sbatch
'
,
dependency
+
str
(
job_id
),
run_script
],
stdout
=
PIPE
)
run_script
=
(
f
"
pio_benchmark.num_node-
{
num_node
}
"
f
"
.
{
pio_role_scheme
}
.run
"
f
"
.
{
output_format
}
"
)
with
open
(
run_script
,
mode
=
"
w
"
)
as
f
:
f
.
write
(
template
.
render
(
**
config
))
f
.
flush
()
if
shell_process
.
returncode
==
0
:
# job submit successful
job_id
=
shell_process
.
stdout
.
decode
(
'
UTF-8
'
).
rstrip
()
print
(
f
"
{
run_script
}
submitted with ID
{
job_id
}
.
"
)
else
:
print
(
f
"
failed to submit
{
run_script
}
"
)
if
job_id
==
0
:
# first submit
shell_process
=
run
([
'
sbatch
'
,
run_script
],
stdout
=
PIPE
)
else
:
# job has been submitted
shell_process
=
run
([
'
sbatch
'
,
dependency
+
str
(
job_id
),
run_script
],
stdout
=
PIPE
)
if
shell_process
.
returncode
==
0
:
# job submit successful
job_id
=
shell_process
.
stdout
.
decode
(
'
UTF-8
'
).
rstrip
()
print
(
f
"
{
run_script
}
submitted with ID
{
job_id
}
.
"
)
else
:
print
(
f
"
failed to submit
{
run_script
}
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment