1

I want to run the following scripts with different input arguments using GNU Parallel in parallel:

Rscript svmRScript_v2.copy.r 0.1 1 #(1) 0.1 and 1 are the input arguments
Rscript svmRScript_v2.copy.r 0.1 2 #(2)
Rscript svmRScript_v2.copy.r 0.1 5 #(3)
Rscript svmRScript_v2.copy.r 0.1 10 #(4)

So all I wanna do is run the 'commands' (1),(2),(3),(4) in parallel using GNU parallel.

My best guess was something like

parallel Rscript < svmRScript_v2.copy.r ::: 0.1 1 ::: 0.1 2 ::: 0.1 5 ::: 0.1 10

I know this is entirely wrong and I'm getting the following error: Fatal error: cannot open file ':::': No such file or directory.

Any suggestion what I need to change?

Thanks in advance.

2
  • Does Rscript require a file argument? Drop the <, since it appears Rscript is trying to read ::: as its argument rather than svnRScript_v2.copy.r. Commented Aug 19, 2015 at 16:02
  • Yes. Originally, in the command line I'd run it as Rscript svmRScript_v2.copy.r 0.1 1 & . It's like bash program.sh arg1 arg2 ; arg1 and arg2 are the inputs to the program. Commented Aug 19, 2015 at 16:06

1 Answer 1

1

The obvious is:

parallel Rscript svmRScript_v2.copy.r 0.1 ::: 1 2 5 10

But I have the feeling you might want 0.1 and 0.2 later:

parallel Rscript svmRScript_v2.copy.r ::: 0.1 0.2 ::: 1 2 5 10

If the order of the arguments is wrong:

parallel Rscript svmRScript_v2.copy.r {2} {1} ::: 0.1 0.2 ::: 1 2 5 10

Did you have a chance to watch the intro videos and walk through the tutorial?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.