On Sat, Oct 09, 2010 at 09:01:10PM +0200, Julia Lawall wrote:
> On Sat, 9 Oct 2010, Kees Cook wrote:
> > I wasn't able to find any documentation (or prior mailing list questions)
> > about running spatch in parallel. There seems to be some mention of it
> > in the PDFs, but it seems out of date. (There is no -mod_distrib option
> > any more?)
> > 
> > I'd love to be able to spread the run across all my CPUs.
> 
> Go to the directory tools/distributed and read the README file.
> 
> You can change the value of MAX (number of processes) in spatch_linux.c if 
> you like.  There is also a command line argument for that.
> 
> Suggestions for improvement are welcome.

Ah-ha, -max and -index are the key (they're not listed in the manpage,
but they do show up in -longhelp). This shell script seems to do the
trick for me:

MAX=$(getconf _NPROCESSORS_ONLN)
for i in $(seq $MAX); do
    spatch -max $MAX -index $i "$@"
done

Thanks!

-Kees

-- 
Kees Cook
Ubuntu Security Team
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to