Run external programs in parallel on OSX

*To*: mathgroup at smc.vnet.net*Subject*: [mg124872] Run external programs in parallel on OSX*From*: phillman5 <phillman5 at gmail.com>*Date*: Fri, 10 Feb 2012 05:53:57 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

I have an external program I need to run via Mathematica many times, on different cores so they all run in parallel. Mathematica generates the input file for the external program. What I did before was to generate a batch file for Windows, each line starting with START, then execute this batch file manually. This would cause each line to open a new 'terminal', so each command line would be on a different core/ processor. I'd like to do the same on my quad core mac, but all within Mathematica. I tried to paralyze the RUN calls, but I think each run is still using the same 'terminal' window? I also tried duplicating the executable with many names and calling each in the paralyzed loop with the run statement, but no better, I only see only one processor/core working at a time. I think each command sent to OSX waits till that last has completed. So what I think I need is to execute the RUN command in Mathematica but each time to a different shell or something so four instances will run in parallel. I don't want Mathematica to wait till until the RUN command has finished to start the next. any help would be appreciated.