Choosing a new PC for GEMPACK simulations

Updated October 2009

We are sometimes asked, what is the best sort of PC to buy for running GEMPACK simulations? Usually the inquirer is running larger models and has experienced problems such as: over-long solve times; or shortage of memory (RAM). If your GEMPACK model solves fairly quickly (<5 minutes) and does not complain about shortage of memory, any new Windows PC will work fine [but we'd suggest 4GB of RAM].

Choose a dual- or quad-core CPU

Most desktop PCs now have "dual-core" or "quad-core" CPUs (several processors in one chip). We heartily recommend them. Their advantages are:

Both AMD and Intel offer dual- and quad-core CPUs -- but only Intel offers the fastest (and highest-priced) processors. For value, choose the 2nd or 3rd fastest models that have plenty of on-chip cache. In November 2009, suitable models were:

The chips above are capable of operating in 64-bit mode, if that turns out to be needed (more below).

Get plenty of RAM

When memory (RAM) is short, Windows is able to use hard disk space instead (called "paging") -- at the cost of a severe speed reduction. If your GEMPACK program is starved of RAM it will run very slowly. Also, the operating system and background processes consume quite a bit of memory. Use Task Manager, as follows, to investigate how much memory is required to meet background needs, and to run two or more simulations at once.

Close all programs, then open email and a small Word document (small tasks you might want to do while a simulation was running). Right-click on the task bar (normally at the bottom of screen) and activate Task Manager. Select the Performance tab. You should see something like:

Task Manager

The red circles indicate items of interest:

Thus, Windows is using considerable resources in the background before you even start trying to run a large simulation !

Now start a large GEMPACK simulation running. Then, in Task Manager, select the Processes tab. You should see something like:

Task Manager

Click once or twice on the "Mem usage" column heading to bring your GEMPACK program to the top, and see how much memory it is using. In this example, GTAP.EXE is using 503 megabytes to do a 60-region, 57 sector simulation (similar information will be found near the end of your solution log file). With the 348MB background requirement, 851 MB is needed in total. More regions or sectors would require more RAM.

Such a large simulation will not be quick: you will be strongly tempted to put your dual-core CPU to work. You could do this by manually launching two simulations at once; for recursive dynamic models the RunDynam (or RunMonash) shell program will automate the processs. In this case, no one simulation is faster, but the total job is done sooner. In contrast, GEMPACK 10 or later allows for parallel processing to speed up a single simulation: it splits up one simulation into parts. You can specify how many additional jobs (called 'servants') are created. In each case:

How much memory can 32-bit Windows use ?

32-bit (ie, normal) Windows XP/Vista allows each running program to use up to 2GB of RAM. This is usually ample. However, 32-bit XP/Vista also places a limit (in theory 4GB, in practice often around 3.3GB) on the total memory used by ALL running programs. So you could not run 2 instances of a program that required 1.8GB. Such a large model would be exceptional, but in that situation, you should consider installing 64-bit Windows XP/Vista. The 32-bit programs still run fine, but you can install and use as much memory as you can afford. 64-bit Windows requires a 64-bit-capable CPU, but most new desktop dual-core CPUs are already 64-bit-capable.

In an extreme case, a single simulation might require more than 2GB of RAM -- more than can be used by a conventional 32-bit EXE. You could use the Intel 64-bit compiler with 64-bit WinXP/Vista to surmount this limitation (with GEMPACK 10 or later). A 64-bit EXE is not inherently faster than its 32-bit counterpart, but it can use more RAM. However, if your simulation requires 3GB of RAM, you are facing a long wait (or must run it over the weekend).

You can read more about 64-bit computing and parallel computations with GEMPACK 10 here.

Extreme Quads Xeon God Box ?

If you are a PC enthusiast you may have read about, and lusted after, various high-end options. Some CPUs bear the 'Extreme' or Xeon brand, or use faster FB-DIMM RAM, and you can get motherboards with 2 or 4 sockets (allowing perhaps 16 cores !). If you want to install more than 8 or 12 GB of RAM, you may be forced to use a high-end or "server" motherboard, perhaps accompanied by faster RAID or SCSI hard disk drives.

Such machines tend to be large, expensive and noisy. Very often, you could run more simulations for less money by buying and using 2 less exotic PCs. Bear in mind the speed of technical progress: you might spend less and solve quicker if you bought a good conventional desktop every 18 months, instead of an expensive server-class machine every three years.

In spite of these caveats, there could be circumstances that justify the big spend. Imagine a recursive-dynamic model which required 900MB of RAM to solve. We wish to solve using 4-6-8 step extrapolation for 20 periods, for both base (control) and policy (perturbed) scenarios. The latest RunDynam shell program will co-ordinate the simultaneous running of three simulations. And, with GEMPACK 10, each 4-6-8 computation can be shared between 2 or 3 cores. So there is ample work to occupy 8 cores, providing 8GB of RAM is installed. A 2-socket board with 2 quad-core CPUs would pay dividends.

What PCs does CoPS buy ?

Recent high-end PCs bought by CoPS for intensive GEMPACK use have featured:

or:

The 8GB or 12GB RAM is fairly generous: most CoPS models use no more than 500MB, and it is rare to run more than two simulations at once.

What about notebooks ?

A Core 2 Duo (not just "Core Duo") notebook with 4GB of RAM will delight you -- if your model is not too big for it. Most notebooks now allow 4GB of RAM. Ask for a T9xxx series CPU which runs at 2500MHz or faster, and has 6MB of L2 cache. However, bear in mind that a good notebook usually costs more and runs slower than a good desktop PC. To extend battery life, manufacturers choose less power-hungry components -- which also run slower. Again, notebooks often have no separate video RAM (instead borrowing some of the main RAM). Therefore, it is not normally practical to run the very largest models on a notebook.

Netbooks: Cute, tiny, cheap -- and slow. Get the model with more RAM.

Brain-power or computer-power ?

Some users could halve their model's solve time simply by exploiting GEMPACK more skilfully. For example they could:

Read more about these ideas here. Other non-hardware ways to save time include:

Thinking and computer-power are indeed potential substitutes -- although to solve really big models you will need plenty of both.

Watch this space !

Recent developments have included:


Related topics:
Reducing Simulation Time
Condensation and Solution Speed
Not Enough Memory to Solve a Model
Memory Limit for GEMPACK
64-bit computing and parallel computations with GEMPACK 10
Should I move to 64-bit Windows?


Go back to
GEMPACK FAQ Page