You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: webdocs/compile.rst
+136-6Lines changed: 136 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,41 @@
13
13
Compiling GSAS-II
14
14
======================
15
15
16
-
A small amount of GSAS-II code is written in Fortran and one routine in C, rather than Python, to provide improved computation speed. Other large and complex capabilities, such as the GSAS(-I) space group interpretation code and DIFFaX are also used as as Fortran code. This code must be compiled before it is run. Normally this is done for you, but on occasion it must be done locally.
16
+
The vast majority of GSAS-II's code is written in Python, but where
17
+
speed or complex analysis is
18
+
needed a small amount of code is written in other languages. There are
19
+
several small routines in Fortran used for speed, as well as the
20
+
complex codes for space group
21
+
analysis code (taken from the original GSAS package) and the DIFFaX
22
+
code, for faulted materials, has also been incorporated.
23
+
There is also one routine
24
+
for image analysis written in C and one for magnetic k-vector
25
+
analysis, written in Cython. There are also two small stand-alone
26
+
programs used for the NIST*LATTICE unit cell analysis capability.
27
+
All of these routines must be compiled to provide dynamic-link
28
+
libraries and executable programs, which we refer to collectively as the GSAS-II
29
+
binaries. Versions of these must match the operating system where they
30
+
will be run and must also match the version of Python and numpy module
31
+
that they will be used with. Most users will install versions of the GSAS-II
32
+
binaries that have been distributed with GSAS-II, but they can be
33
+
compiled by users and in some cases that will be necessary. The
34
+
documentation here discusses these files.
35
+
36
+
Note that there are two methods used for compiling GSAS-II. For Python
37
+
3.11 and earlier, a build process with a utility called `Scons` was used, but this
38
+
stopped working for GSAS-II with Python 3.12 and a new build process
39
+
using the `meson` tool was implemented. At present, there are two
40
+
branches for GSAS-II. The `master` branch uses Scons and the
41
+
`main` branch uses meson. The master branch is the current default
42
+
branch but will eventually be retired in favor of the newer `main`
43
+
branch.
44
+
45
+
Supplied Binary Files
46
+
---------------------------
47
+
48
+
The GSAS-II binaries are supplied on GitHub as "release" files,
49
+
https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/latest. In
50
+
that location, the files are in tar archives named `prefix_pX.X_nY.Y.tgz`
17
51
18
52
The supplied binaries are placed in a subdirectory name with name
19
53
`prefix`\ _p\ `X.X`\ _n\ `Y.Y` where
@@ -26,11 +60,109 @@ The supplied binaries are placed in a subdirectory name with name
26
60
* Linux: ARM processors (64-bit and 32-bit Raspberry Pi OS only).
27
61
[Prefixes `linux_arm32_` and `linux_arm64_`\ ]
28
62
29
-
Some older versions combinations of Python and
30
-
NumPy can be found in the older svn repository for GSAS-II:
63
+
Some older binary files with combinations of older Python and
64
+
NumPy versions can be found in the older svn repository for GSAS-II:
The compilation process requires installation of the gcc and gfortran compilers. Others may be possible, but have not been tried. Also, the Python Scons package must be installed into Python. compilation is done with commands::
67
+
Compiling with meson
68
+
---------------------------
69
+
70
+
Compiling GSAS-II binaries is quite simple. One needs to install the
71
+
Python meson and cython packages and a C compiler and the Gfortran
72
+
compiler. On Linux it probably best to use compilers supplied with the
73
+
dist using a commands such as `apt-get` or `yum`,
74
+
but these compilers can be installed via conda
75
+
from conda-forge and the latter does not require admin privs.
76
+
On windows and MacOS, the easist way to obtain them
0 commit comments