Hi,
I’m trying to follow McCarl’s user guide to implement grid computing
on my 8 processor server, but not quite able.
I have a solution loop that performs a home-made multi-start for a
nonlinear problem. I’m not using KNITRO’s multistart heuristic
because I need to analyze the data for each run, and I can’t get
access to the runs in KNITRO. (Also, I don’t think I can multithread
the runs in KNITRO, as I’m trying to do here).
So I have a set xx with values xx1 to xx100000. I typically do a loop
over xx where, within each loop, I set the variables to values drawn
from a uniform distribution of the feasible values. I then store some
variables in a parameter RunData. My solve-related code looks
something like the following (although with lots of other goodies):
Loop(xx,
{bunch of code setting random initial guesses}
Solve MyModel using NLP maximizing MarketValue;
RunData(xx,‘Obj’) = MarketValue.l;
RunData(xx,‘Infes’) = MyModel.numinfes;
RunData(xx,‘MyModelstat’) = MyModel.modelstat;
RunData(xx,‘MySolvestat’) = MyModel.solvestat;
RunData(xx,‘MyTime’) = MyModel.resusd;
RunData(xx,‘Pgen1’) = PGen.l(‘g00001’);
{bunch of other code capturing whatever vars I’m interested
in}
yy = yy + 1;
if (round(yy/100) = yy/100,
execute_unload ‘ParamTestOutput’;
);
if (ACOPF.modelstat = 2,
execute_unload ‘Success’;
);
);
It should be pretty obvious what this does. At the end, I can open
ParamTestOutput and scroll through the RunData table (or copy it to
Excel to do some analysis about different solutions, run times, etc.).
I do a LOT of these, so I want to use all 8 of my processors to speed
things up, if I can. I think I understand that I can do that using
solvestat = 3. As I said, I reviewed the McCarl guide, but can’t
quite figure out what’s going on there. Any help would be great.
I now have the " if (round(yy/100) = yy/100…" code in there so that
it stores the results every 100 runs (so that I can see what’s going
on without waiting for thousands or hundreds of thousands of runs to
complete). That’s not necessary, but if I could have some feature
like that in my grid-enabled code, it would really help. Or do I just
n
By the way, I’ve asked a number of other researchers who use GAMS
pretty regularly, and they were all very interested in this issue, but
weren’t able to understand the user guide here either. So you’ll be
helping several people, as they wanted me to forward the answer to
them as soon as I have it.
Thanks much!
Emily
\