-
Notifications
You must be signed in to change notification settings - Fork 134
Brown Oscar Python module and mako file update #1352
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
base: master
Are you sure you want to change the base?
Changes from all commits
e72f2cd
8df72f8
0056072
4d5b58b
19156ec
93bc50a
55d57fb
c579caa
85c5b1b
517dbc1
49fb9db
0a27a21
5b58358
0a71bc3
7e3ad87
8953c2f
46719ad
51e1a9c
7f5a037
94cd299
1052bd2
e1ad0ac
9a99858
18f4dd9
4b07b68
376fd81
3e5a88d
3d5252a
294d749
7484d57
dc1678d
d3940db
d933d7e
c6b1b74
8108486
fb9f2cd
2f5bf9b
c208547
b6650d9
a533da6
3287ce9
58a88d4
93279c4
f5d4e05
ac28e64
efbaaad
9e67b91
23e88bb
152405b
689d632
698f2c1
d55fef6
5019fbe
2e2ddb6
c35ea81
8f38bf4
f679f6b
eb3dd4d
d0a1693
bce528d
37ddf02
b12086b
ae2f3bb
140dbb7
00617ed
ac240ed
1036caf
b3c3679
9bd4fcb
61302ac
9ce66ec
7eaf0a0
12a830f
da17a24
66cb389
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||
|
|
||||||||||||||
| <%namespace name="helpers" file="helpers.mako"/> | ||||||||||||||
|
|
||||||||||||||
| % if engine == 'batch': | ||||||||||||||
| #SBATCH --nodes=${nodes} | ||||||||||||||
| #SBATCH --ntasks-per-node=${tasks_per_node} | ||||||||||||||
| #SBATCH --cpus-per-task=1 | ||||||||||||||
| #SBATCH --job-name="${name}" | ||||||||||||||
| #SBATCH --time=${walltime} | ||||||||||||||
| % if partition: | ||||||||||||||
| ##SBATCH --partition=${partition} | ||||||||||||||
| % endif | ||||||||||||||
|
Comment on lines
+11
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Partition sbatch is commented In toolchain/templates/anvil.mako the partition directive is written as "##SBATCH", so it is treated as a comment even when partition is provided. This makes user-specified partitions ineffective and can lead to jobs scheduling on the wrong/default partition or not scheduling as expected. Agent Prompt
Comment on lines
+11
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double hash comments out the partition directive. Line 12 uses Proposed fix % if partition:
-##SBATCH --partition=${partition}
+#SBATCH --partition=${partition}
% endif📝 Committable suggestion
Suggested change
|
||||||||||||||
| % if account: | ||||||||||||||
| #SBATCH --account="${account}" | ||||||||||||||
| % endif | ||||||||||||||
| #SBATCH --output="${name}.out" | ||||||||||||||
| #SBATCH --error="${name}.err" | ||||||||||||||
| #SBATCH --export=ALL | ||||||||||||||
| % if email: | ||||||||||||||
| #SBATCH --mail-user=${email} | ||||||||||||||
| #SBATCH --mail-type="BEGIN, END, FAIL" | ||||||||||||||
| % endif | ||||||||||||||
| % endif | ||||||||||||||
|
|
||||||||||||||
| ${helpers.template_prologue()} | ||||||||||||||
|
|
||||||||||||||
| ok ":) Loading modules:\n" | ||||||||||||||
| cd "${MFC_ROOT_DIR}" | ||||||||||||||
| . ./mfc.sh load -c pa -m ${'g' if gpu_enabled else 'c'} | ||||||||||||||
| cd - > /dev/null | ||||||||||||||
|
Comment on lines
+29
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GPU mode loads modules that don't exist. When If GPU support is intentionally deferred (CPU-only for now), consider adding a guard or comment. Otherwise, add |
||||||||||||||
| echo | ||||||||||||||
|
|
||||||||||||||
| % for target in targets: | ||||||||||||||
| ${helpers.run_prologue(target)} | ||||||||||||||
|
|
||||||||||||||
| % if not mpi: | ||||||||||||||
| (set -x; ${profiler} "${target.get_install_binpath(case)}") | ||||||||||||||
| % else: | ||||||||||||||
| (set -x; ${profiler} \ | ||||||||||||||
| mpirun -np ${nodes*tasks_per_node} \ | ||||||||||||||
| "${target.get_install_binpath(case)}") | ||||||||||||||
| % endif | ||||||||||||||
|
|
||||||||||||||
| ${helpers.run_epilogue(target)} | ||||||||||||||
|
|
||||||||||||||
| echo | ||||||||||||||
| % endfor | ||||||||||||||
|
|
||||||||||||||
| ${helpers.template_epilogue()} | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| #SBATCH --nodes=${nodes} | ||
| #SBATCH --tasks-per-node=${tasks_per_node} | ||
| #SBATCH --cpus-per-task=1 | ||
| #SBATCH --mem-per-cpu=4g | ||
| #SBATCH --job-name="${name}" | ||
| #SBATCH --time=${walltime} | ||
| % if partition: | ||
|
|
@@ -42,7 +43,7 @@ echo | |
| (set -x; ${profiler} "${target.get_install_binpath(case)}") | ||
| % else: | ||
| (set -x; ${profiler} \ | ||
| mpirun -np ${nodes*tasks_per_node} \ | ||
| srun \ | ||
| "${target.get_install_binpath(case)}") | ||
|
Comment on lines
44
to
47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Mpi task count dropped In toolchain/templates/oscar.mako the MPI path now invokes plain "srun" without using nodes*tasks_per_node, so the configured task count no longer influences how many ranks are launched. This can under-launch MPI ranks and make MPI runs behave differently than intended for the same nodes/tasks_per_node settings. Agent Prompt
|
||
| % endif | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug