Version 3 (modified by toby, 4 years ago) (diff)


Compiling GSAS-II

A small amount of GSAS-II code is written in Fortran, rather than Python, to capture legacy capabilities from GSAS (for space group interpretation) or for increased speed. This code must be compiled before it is run. Normally this is done for you, but on occasion (usually only for Linux) it must be done locally. This is done with commands:

cd fsource


Usually, to do this one must install some extra software not needed to run GSAS-II: the Python scons package and the GNU gfortran compiler.

gfortran: The instructions for installing gfortran will depend on your system and you may need to resort to google for more information. On most linux systems, one will use a command such as sudo apt-get gfortran or yum install gcc-gfortran. Also see for more information.

scons: If you have used the g2conda installer or the Continuum, Inc. anaconda Python package, you can use the command:

<path>conda install scons

to install scons, where <path> will be something like .../g2conda/bin; inclusion of a path in the command is required when Python has not been added to the path, as is recommended in the installation instructions to avoid conflicts between installed software packages. With Canopy or other Python dists, please consult that package's documentation.

Some platform specific compilation instructions are found here:

Use conda to install gfortran and scons


source <path>/g2conda/bin/activate
conda install gfortran_osx-64 scons
cd <path>/g2conda/GSASII/fsource

For old Mac OS X see here