0

Consider a makefile

all : a c
    (cmd3)
a : b1 b2 b3 b4
    (cmd2)
b% : 
    (cmd) $*

Consider that the dependencies b% can be parallelized and run on grid engine. What would be the simplest way to qsub these dependencies with minimal changes to the makefile so that cmd2 is executed only after all the dependencies are satisfied ?

Pushpendre
  • 795
  • 7
  • 19

1 Answers1

1

Use something like this in your makefile:

b%:
     qsub -sync yes (cmd) $*

And then use the -j option to make to run them in parallel. For example:

make -j all
Ross Ridge
  • 38,414
  • 7
  • 81
  • 112