McStas and choice of compilers

As McStas is to a large extent focused on operating systems that run on Intel processors (to a large extent, AMD processors can be considered Intel compatible), including Linux, Microsoft Windows and Mac OS X. For this range of operating systems, we propose either:

A) gcc which is a very portable, ISO-C compatible c compiler. Gcc is open source software and available for most platforms. For Linux it is usually part of your distribution, for Windows the McStas distribution package includes a version of gcc (in the Dev-CPP sub-package), and for Mac OS X gcc is part of the Xcode tools package available on the installation medium.

B) icc or the Intel c compiler is available for Linux, Mac OS and Windows systems and is a commercial software product. Generally, simulations run with the Intel compiler are a factor of 2 faster than the identical simulation run using gcc. To use icc with McStas on Linux or Mac OS X, set the environment variables

On Unix (and Mac OS X) systems, to use icc with MPI installations, either

On Windows, the Intel c compiler is 'icl', not 'icc' and has a dependency for Microsoft Visual C++. If you have both these softwares available, running McStas with the Intel compiler should be possible (currently untested by the McStas developer team).