ZEMAX Users' Knowledge Base - http://www.zemax.com/kb
What Computer Should I Buy to Run ZEMAX?
http://www.zemax.com/kb/articles/41/1/What-Computer-Should-I-Buy-to-Run-ZEMAX/Page1.html
By Mark Nicholson
Published on 13 December 2007
 
Updated December 2007. This article explains how to choose a workstation for running ZEMAX on. It concentrates on:
  • Choice of Processors
  • Amount of Memory
  • Graphics Card
  • Some other Frequently Asked Questions about computers

 


What Computer Should I Buy?
One very frequently asked question goes like this: "I am going to buy a new workstation, which will mainly be used for running ZEMAX. What is the optimum specification?"

Well, there's no optimum, in the sense that bigger and better hardware always traces rays faster. But there are sensible choices you can make to spend your budget wisely. This article looks at the three most important areas:
  • Choice of processor(s)
  • Amount of RAM
  • Choice of graphics card

We also answer some of the more frequently asked computer-specific questions.

 


Choice of Processor
ZEMAX is a big, number-crunching application, and so the processor should be as fast as possible, with as much cache RAM (i.e., memory that is built into the processor itself) as possible. But, there is an extra factor to consider.

ZEMAX was written from the ground up as a "multi-threaded" application. That means that every window inside ZEMAX runs as its own thread, or calculation. If you have for example, an MTF plot and a Geometric Image Analysis (GIA) window open, and click Update All, each calculation is performed at the same time, independent of each other.

This means that ZEMAX is very good at using multiple processors. If you have a machine with 2 CPUs, ZEMAX can automatically send the MTF calculation to one processor and the GIA to the other. This makes the best use of your computer's hardware.

Even better, many calculations are themselves multi-threaded. For example, lets say you are tracing 2 million non-sequential rays in a stray light analysis. ZEMAX can automatically trace one ray on one processor, one on another, etc. At the time of writing (April 2006) ZEMAX supports up to 16 processors per machine. Whilst there is a small overhead for managing the threads, performance scales almost directly with the number of processors used.

Multiple CPU machines are now quite affordable, and both Intel and AMD are putting considerable effort into multi-core processors which have multiple CPUs on one chip. This is a great advantage to the ZEMAX user, as ZEMAX has the architecture to exploit this technology. 

The article Running ZEMAX on a Multi-CPU Computer gives more details. Even entry-level computers now offer dual core operation, so this is ideal for the ZEMAX user.

ZEMAX is currently a 32-bit application, but 64 bit processors are now available, and a 64-bit version of ZEMAX is under development. A 64-bit version of Windows XP and Windows Vista is also available, although driver support for it is not extensive. The existing 32-bit ZEMAX code runs fine under 64-bit versions of Windows.

The major advantage of 64-bit operating systems and codes is that much more memory is avilable to the code (more on this on the next page).

As a result of these two factors, our recommendations for CPU choice are:
  • Buy a multiple CPU machine if possible
  • Buy 64-bit processors, even if you use a 32-bit version of the operating system for the near future

The 64-bit version of ZEMAX will require a black USB key to operate.


How Much Memory?
There are two kinds of memory available to a Windows application: Random Access Memory (RAM), which is real memory chips, and Virtual Memory (VM) which is an area of a hard-disk drive that looks like memory to the operating system. An application is normally allocated RAM on opening, but if it needs more RAM than is available, virtual memory is used instead.

The problem is that virtual memory is many thousands of times slower than real memory. Having enough RAM memory for ZEMAX and all your other applications is essential. If ZEMAX is required to use virtual memory, it will run slowly enough that users can be fooled into thinking it has crashed.

Windows is currently a 32-bit operating system, and so can address 4GB of memory space. This is usually partioned as 2GB for the operating system, and 2GB for the applications running on the machine. In reality, only about 1.4 GB is ever allocated to a single program.

There is a boot-time switch that allows this memory to be partitioned to allow applications to use up to 3GB of the 4GB limit, and ZEMAX supports the use of this switch. Again, the reality is that a single application never gets more than about 2.4 GB of memory. You can get more information on the /3GB switch here.

How much memory ZEMAX needs is a strong function of what you are using it for. Sequential ray-tracing does not use much memory, and our minimum specification of 256 MB minimum/512 MB recommended is sufficient. However, users perfroming large Physical Optics Propagation (POP) studies, or using large CAD files in non-sequential mode, may need considerably more.

Clearly the memory footprint of a CAD file is dependent on how complex the file is, and how efficiently it was exported, and it is hard to generalize about the memory requirements in this case.

With Physical Optics, the calculation is simpler. Each pixel in the data array represents the complex amplitude (i.e. amplitude and phase) of  a coherent beam at that point. Therefore two double-precision words are needed per pixel. If polarization is used, four double-precision words are needed, two for each polarization state. Therefore either 16 or 32 bytes are needed per pixel, depending on polarization, just to store the data. Propagating through surfaces requires 56 bytes per pixel for standard surfaces, although more complex surfaces may need up to 90 bytes.

For example, propagating a 2048 x 2048 unpolarized beam through normal refractive surfaces will require about 288 Mb. Making it polarized will require 576. Note this is in addition to the other memory ZEMAX requires.

To propagate an 8K x 8K polarized beam will require more than 9GB of memory. This is currently not possible on 32-bit Windows. Howver, 64-bit versions of Windows XP will allow almost unlimited amounts of memory to be addressed.

To summarize this section, ZEMAX must have enough memory for your intended application. Having too little will slow ZEMAX dramatically, as it is forced to use virtual memory. Having more free memory than is needed will not, however, give any speed advantage.


What About the Graphics Card?
The choice of graphics card is not so critical. Modern games are far more demanding of the graphics card than ZEMAX is! However, some simple rules can be applied:
  • Avoid "integrated" graphics, where the graphics chip is on the motherboard. These generally use system memory and tend not to have the most stable drivers. A stand-alone card with dedicated memory is usually the better choice.
  • ZEMAX uses OpenGL to provide the Shaded Model layout, which is important for presentation-quality graphics. Check that your graphics card comes with an OpenGL driver.

And that's it! Other factors like sound cards, network cards etc have little or no impact on ZEMAX.

In summary, we recommend multiple processors, and multiple 64-bit processors for future expandability. As much memory as you need! This is hard to generalize about. Unless you are using large CAD objects, or POP, then 512MB should be sufficient, 1 GB plenty.We recommend stand-alone graphics cards from a reputable manufacturer such as nVidia or ATi.


Frequently Asked Questions
How Important is the Hard Drive?

Not very. Modern hard drives start at around 80GB, and most ZEMAX files are small. We suggest 200 MB or so free space for ZEMAX.

The exception is when users undertake large opto-mechanical stray light or illumination analysis. In these cases, users often save all rays to a  ray database, and then query that database with ZEMAX' powerful filter capabilities. These databases are often hundreds of megabytes or more. For these users, large, fast disks and RAID arrays can be appropriate.

Is Intel better than AMD?

We're neutral on this. Both manufacturers' processors work fine. ZEMAX is written in 100% C, and is then compiled to machine code. We don't do any specific processor optimization or machine-code hacks.

How Can I Check Before I Buy?

The ZEMAX demonstration version does not require a hardware key or a driver to be installed. It supports exactly the same performance test as the full version, however. Best of all, if you install the demonstration version, you can then copy the entire /zemax demo folder onto a USB thumb drive and run it from there.  So, you can simply move the thumb drive from machine to machine, and test real performance easily.

Does ZEMAX Run on a Macintosh?

ZEMAX will run on Intel-processor based Macs running Windows XP via either Boot Camp or Parallels Desktop. A USB key is needed as Macs do not have parallel ports. As long as XP is running normally, ZEMAX will install and run using the normal installation procedure. Note that ZEMAX Development Corporation cannot provide support on installing BootCamp, Parallels Desktop or Windows XP on your Macintosh computer. For more information, please see the Knowledge Base article, "How to Run ZEMAX on an Intel-based Macintosh computer".

Does ZEMAX Run Under Emulation?

In principle, if an emulator was perfect, ZEMAX would not be able to tell if it was running under a "real" Windows machine or in an emulated environment. Unfortunately, current emulators are far from perfect.

We have heard from users who run ZEMAX under VMWare on Linux machines. They report that calculations run at approximately 80% of "native" speed, but that graphics (and particularly the OpenGL Shaded Graphics) are noticeably slower. (This is compared to simply running Windows on the same machine directly). However, note that we do not support running under emulation: if it works then fine, but if not, we can't help!

What is your preferred version of Windows?

ZEMAX runs under all current versions of Windows. Our preferred version is XP Pro, in either 32 or 64 bit versions. ZEMAX runs perfecty under Vista, in both 32 and 64-bit versions, but many users find Vista clunky compared to XP. We at ZDC will stay with XP for as long as we can!