Skip to content

Commit e64521e

Browse files
authored
Merge pull request #7 from StatFunGen/fix_parallel
fix parallel
2 parents 438bf2f + 600eeca commit e64521e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/generate_job_script.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@ tee \${cmd_script} >/dev/null << ${eof}
174174
$(sed '/^\s*$/d' "${script_file}" | sed -n "${start},${end}p")
175175
${eof}
176176
177-
if [[ \$num_parallel_commands -gt 1 && \$(wc -l \${cmd_script}) -gt 1 ]]; then
177+
if [[ \$num_parallel_commands -gt 1 && \$(wc -l < \${cmd_script}) -gt 1 ]]; then
178+
echo "Running \$num_parallel_commands commands in parallel for \$(wc -l < \${cmd_script}) total commands."
178179
parallel -j \$num_parallel_commands ${no_fail_parallel} < \${cmd_script}
179180
else
181+
echo "Running \$(wc -l < \${cmd_script}) commands in serial"
180182
bash \${cmd_script} ${no_fail}
181183
fi
182184

0 commit comments

Comments
 (0)