質問

My problem is that: I have a bash script that do something and then call 800 bsub jobs like this:

pids=
rm -f ~/.count-*
for i in `ls _some_files_`; do
    of=~/.count-${i}
    bsub -I "grep _something_ $i > $of" &
    pids="${!} ${pids}"
done
wait ${pids}

Then the scripts process the output files $of and echo the results.

The trouble is that I got a lot of lines like:

Job <7536> is submitted to default queue <interactive>.
<<Waiting for dispatch ...>>
<<Starting on hostA>> 

It's actually 800 times the 3 lines above. Is there a way of suppressing this LSF lines?

I've tried in the loop above:

bsub -I "grep _something_ $i > $of" &> /dev/null

I does remove the LSF verbosity but instead of submitting almost all 800 jobs at once and then take less than 4 min to run, it submits just few jobs at a time and I have to wait more than an hour for the script to finish.

AFAIK lsf bsub doesn't seem to have a option to surpress all this verbosity. What can I do here?

役に立ちましたか?

解決

You can suppress this output by setting the environment variable BSUB_QUIET to any value (including empty) before your bsub. So, before your loop say you could add:

export BSUB_QUIET=

Then if you want to return it back to normal you can clear the variable with:

unset BSUB_QUIET

Hope that helps you out.

他のヒント

Have you considered using job dependencies and post-process the logfiles?

1) Run each "child" job (removing the "-Is") and output the IO to separate output file. Each job should be submitted with a jobname (see -J). the jobname could form an array.

2) Your final job would be dependent on the children finishing (see -w).

Besides running concurrent across the cluster, another advantage of this approach is that your overall process is not susceptible to IO issues.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top