PROC OPTMODEL uses all four processors by default, and you should see messages like this in the log:
NOTE: Problem generation will use 4 threads.
NOTE: The ___ algorithm is using up to 4 threads.
But you should not expect linear speedup from optimization algorithms. Beyond the usual overhead of any parallel implementation, some parts of the algorithms are serial, and the speedup you see strongly depends on the type of problem and the specific data for your instance.
If you are able to share your code and data, I'll be glad to take a look and possibly provide some specific recommendations to speed things up.
Rob,
I appreciate your reply. But I can't share the algorithm's code as it's proprietary.
But here is part of the log file:
NOTE: The OPTLSO procedure is executing in single-machine mode.
NOTE: The OPTLSO algorithm is using up to 4 threads.
NOTE: The problem has 344 variables (343 integer, 1 continuous).
NOTE: The problem has 0 constraints (0 linear, 0 nonlinear).
NOTE: The problem has 1 FCMP function definitions.
NOTE: The deterministic parallel mode is enabled.
Thanks! Andrew
Your subject line says OPTMODEL, but your log says OPTLSO. Was OPTMODEL just a typo?
Also, what SAS/OR version are you using?
Yikes!!!! I meant to state that I was using OPTLSO. Sorry about that.
I see a message referring to FCMP function definition. It the function is called once per item in the optimization process, there could be lots of time-consuming context changes in the computing algorithm. I have found that sometimes using a sas macro instead of a user-defined function performing the same operation can be faster. Sometime all the function really offers is compact syntax.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.