Hi all,
I'm an aerospace engineering student, and I'm working on a senior capstone project. One of the mathematical models I'm developing requires an astronomical amount of generated data from XFOIL, a popular aerospace tool used to find the lift and drag coefficients on airfoils. (But I'm digressing.)
Cut to the chase: I have a Perl script that calls XFOIL repeatedly with different input parameters to generate the data I need. I need XFOIL to run 5600 times, and as it stands right now it takes about 100 seconds on average per run. Doing the math, this means it will take about 6.5 days to complete.
Now, I have a quad-core machine, but my experience as a programmer is limited, and I really only know how to use basic Perl. I would like to run 4 instances of XFOIL at a time, all on their own core. Something like this:
while (1){
for (i = 1..4){
if (! exists XFOIL_instance(i)){
start_new_XFOIL_instance(i, input_parameter_list);
}
}
}
So the program is checking (or preferably sleeping until an XFOIL instance wakes it up to start a new instance) if every core is running XFOIL. If not, the previous instance exited and we can start a new instance with the new input parameter list.
If anyone has any idea how this can be achieved, please let me know. This would significantly speed up the time I need to generate data and will let me work on the aerospace project itself.
Thanks for the help!