2

I want to submit a job to LSF using the bsub command. One of the job argument is "-P argument_1". So the overall command looks like

bsub -P project_name -n 4 -W 10:00 my_job -P argument_1

But bsub considers -P argument_1 as the project_name instead of considering as an argument of my_job.

Is there anyway to resolve this issue?

worldofjr
  • 3,868
  • 8
  • 37
  • 49
  • 1
    I tried your command in my cluster and it works as expected. Could you provide more details to show why you think that `argument_1` is used as the project name rather than an argument to `my_job`? e.g., provide the output of `bjobs -l` for your job. – Michael Closson Jan 08 '16 at 16:26

2 Answers2

0

What version of LSF are you using? You can check by running lsid. Try quoting your command and see if that helps:

bsub -P project_name -n 4 -W 10:00 "my_job -P argument_1"
Squirrel
  • 2,262
  • 2
  • 18
  • 29
0

Use a submission script script.sh including my_job -P placeholder_arg1. Then use

sed 's/placeholder_arg1/argument_1/g' < script.sh | bsub

to replace command line argument on-the-fly before submitting the job.

gizzmole
  • 1,437
  • 18
  • 26