McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP


About McStas
 Conditions of use
 Project funding

 Other Downloads (share)

Mailing list

Search web/mailinglist

 McStas manual



Links <- UPDATED!

Report bugs


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

  • MCSTAS_CC=icc
  • MCSTAS_CFLAGS="-g -O2 -wd177,266,1011,181"

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

  • In case your mpicc is a shell script, edit this shell script and set the CC variable to "icc"
  • In case your mpicc is a binary, create an alias (or a shell script), e.g. impicc = icc -lmpi

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).

Last Modified: Thursday, 07-Feb-2008 22:40:45 CET
Search website mailinglist archive GitHub repos