Monday, July 7, 2008

Parallel processing of large models

> It might be desirable to invoke parallel processing of my optimization model
> on a network of PCs.

The simplest way to use parallel processing is to use a parallel solver such as Cplex, Xpress or Mosek and tell it to use multiple threads. E.g. with Cplex say threads 4 in an option file and it will exploit your quad core machine. Be aware that parallel processing is not always faster and that you need extra memory. This option only works on SMP machines (basically computers with multiple CPUs/cores).

If I remember correctly Xpress had once a version that worked on a network of machines using PVM. I don't think this was ever available under GAMS. GAMS/Xpress can use multiple threads, but again as SMP only.

GAMS has some grid facilities and the GAMS people have been pushing the Sun grid facility. In my experience this is all somewhat premature. The GAMS grid stuff is fragile and the Sun grid facility looks primitive. It would require quite some work to make this more user friendly. In addition, you need to make sure your model is suited for this type of architecture. The problem must be decomposable in a number of independent jobs, otherwise this approach won't work. Once you get this to work, in many cases you will find out that performance is often disappointing compared to a serial implementation on a fast PC.

Note that GAMS itself is single-threaded. I am not aware of a parallel modeling language although this would make sense for some classes of models. The block structure could be exploited for coarse-grained parallellism. The GAMS internals are very messy so I don't think this will be an option that will be added quickly.

No comments:

Post a Comment