File tree Expand file tree Collapse file tree 15 files changed +27
-26
lines changed
Expand file tree Collapse file tree 15 files changed +27
-26
lines changed Original file line number Diff line number Diff line change 1515% if account:
1616# SBATCH --account="${account}"
1717% endif
18- % if gpu ! = gpuConfigOptions.NONE.value :
18+ % if is_gpu_active :
1919# SBATCH --gpu-bind=verbose,closest
2020# SBATCH --gres=gpu:v100-16:${tasks_per_node}
2121% endif
@@ -32,7 +32,7 @@ ${helpers.template_prologue()}
3232
3333ok " :) Loading modules:\n"
3434cd " ${MFC_ROOT_DIR} "
35- . ./mfc.sh load -c b -m ${' g' if gpu else ' c' }
35+ . ./mfc.sh load -c b -m ${' g' if is_gpu_active else ' c' }
3636cd - > /dev/null
3737echo
3838
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ ${helpers.template_prologue()}
2727
2828ok " :) Loading modules:\n"
2929cd " ${MFC_ROOT_DIR} "
30- . ./mfc.sh load -c cc -m ${' g' if gpu else ' c' }
30+ . ./mfc.sh load -c cc -m ${' g' if is_gpu_active else ' c' }
3131cd - > /dev/null
3232echo
3333
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ ${helpers.template_prologue()}
2727
2828ok " :) Loading modules:\n"
2929cd " ${MFC_ROOT_DIR} "
30- . ./mfc.sh load -c c -m ${' g' if gpu else ' c' }
30+ . ./mfc.sh load -c c -m ${' g' if is_gpu_active else ' c' }
3131cd - > /dev/null
3232echo
3333
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if engine == 'batch':
5050 (set -x; ${ profiler} \
5151 jsrun --nrs ${ tasks_per_node* nodes} \
5252 --cpu_per_rs 1 \
53- --gpu_per_rs ${ 1 if gpu else 0 } \
53+ --gpu_per_rs ${ 1 if is_gpu_active else 0 } \
5454 --tasks_per_rs 1 \
5555 "${ target.get_install_binpath(case)} ")
5656 elif [ "$binary" == "srun" ]; then
Original file line number Diff line number Diff line change 1515% if account:
1616# SBATCH --account="${account}"
1717% endif
18- % if gpu ! = gpuConfigOptions.NONE.value :
18+ % if is_gpu_active :
1919# SBATCH --gpus-per-node=${tasks_per_node}
2020# SBATCH --mem=208G
2121# SBATCH --gpu-bind=closest
@@ -33,7 +33,7 @@ ${helpers.template_prologue()}
3333
3434ok " :) Loading modules:\n"
3535cd " ${MFC_ROOT_DIR} "
36- . ./mfc.sh load -c d -m ${' g' if gpu else ' c' }
36+ . ./mfc.sh load -c d -m ${' g' if is_gpu_active else ' c' }
3737cd - > /dev/null
3838echo
3939
Original file line number Diff line number Diff line change 1515% if account:
1616# SBATCH --account="${account}"
1717% endif
18- % if gpu ! = gpuConfigOptions.NONE.value :
18+ % if is_gpu_active :
1919# SBATCH --gpus-per-node=${tasks_per_node}
2020# SBATCH --mem=208G
2121# SBATCH --gpu-bind=closest
@@ -33,7 +33,7 @@ ${helpers.template_prologue()}
3333
3434ok " :) Loading modules:\n"
3535cd " ${MFC_ROOT_DIR} "
36- . ./mfc.sh load -c dai -m ${' g' if gpu else ' c' }
36+ . ./mfc.sh load -c dai -m ${' g' if is_gpu_active else ' c' }
3737cd - > /dev/null
3838echo
3939
Original file line number Diff line number Diff line change 1111# SBATCH --time=${walltime}
1212# SBATCH --cpus-per-task=7
1313# SBATCH -C nvme
14- % if gpu ! = gpuConfigOptions.NONE.value :
14+ % if is_gpu_active :
1515# SBATCH --gpus-per-task=1
1616# SBATCH --gpu-bind=closest
1717% endif
@@ -35,12 +35,12 @@ ${helpers.template_prologue()}
3535ok " :) Loading modules:\n"
3636cd " ${MFC_ROOT_DIR} "
3737% if engine == ' batch' :
38- . ./mfc.sh load -c f -m ${' g' if gpu else ' c' }
38+ . ./mfc.sh load -c f -m ${' g' if is_gpu_active else ' c' }
3939% endif
4040cd - > /dev/null
4141echo
4242
43- % if gpu ! = gpuConfigOptions.NONE.value :
43+ % if is_gpu_active :
4444 export MPICH_GPU_SUPPORT_ENABLED=1
4545% else:
4646 export MPICH_GPU_SUPPORT_ENABLED=0
@@ -67,7 +67,7 @@ ulimit -s unlimited
6767 % if engine == ' interactive' :
6868 --unbuffered --nodes ${nodes} --ntasks-per-node ${tasks_per_node} \
6969 --cpus-per-task 7 \
70- % if gpu ! = gpuConfigOptions.NONE.value :
70+ % if is_gpu_active :
7171 --gpus-per-task 1 --gpu-bind closest \
7272 % endif
7373 ${profiler} " ${target.get_install_binpath(case)} " )
Original file line number Diff line number Diff line change 1010# SBATCH --output="${name}.out"
1111# SBATCH --time=${walltime}
1212# SBATCH --cpus-per-task=7
13- % if gpu ! = gpuConfigOptions.NONE.value :
13+ % if is_gpu_active :
1414# SBATCH --gpus-per-task=1
1515# SBATCH --gpu-bind=closest
1616% endif
@@ -36,7 +36,7 @@ ${helpers.template_prologue()}
3636ok " :) Loading modules:\n"
3737cd " ${MFC_ROOT_DIR} "
3838% if engine == ' batch' :
39- . ./mfc.sh load -c h -m ${' g' if gpu else ' c' }
39+ . ./mfc.sh load -c h -m ${' g' if is_gpu_active else ' c' }
4040% endif
4141cd - > /dev/null
4242echo
Original file line number Diff line number Diff line change 11<%! import os % >
22
3+ < % is_gpu_active = (gpu != gpuConfigOptions.NONE .value) %>
34<%def name = "template_prologue() ">
45% if os.name != ' nt' :
56 #>
Original file line number Diff line number Diff line change 1515% if account:
1616# SBATCH --account="${account}"
1717% endif
18- % if gpu ! = gpuConfigOptions.NONE.value :
18+ % if is_gpu_active :
1919# SBATCH --gpu-bind=verbose,closest
2020# SBATCH --gres=gpu:v100-16:${tasks_per_node}
2121% endif
@@ -32,7 +32,7 @@ ${helpers.template_prologue()}
3232
3333ok " :) Loading modules:\n"
3434cd " ${MFC_ROOT_DIR} "
35- . ./mfc.sh load -c n -m ${' g' if gpu else ' c' }
35+ . ./mfc.sh load -c n -m ${' g' if is_gpu_active else ' c' }
3636cd - > /dev/null
3737echo
3838
You can’t perform that action at this time.
0 commit comments