-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expand webdocs. Mostly done w/trac wiki pages now
- Loading branch information
Showing
4 changed files
with
115 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.. raw:: html | ||
|
||
<style> .clear {clear: both;}</style> | ||
|
||
.. image:: ./images/gsas2.png | ||
:scale: 25 % | ||
:alt: GSAS-II logo | ||
:align: right | ||
|
||
====================== | ||
Compiling GSAS-II | ||
====================== | ||
|
||
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. | ||
|
||
The supplied binaries are placed in a subdirectory name with name | ||
`prefix`\ _p\ `X.X`\ _n\ `Y.Y` where | ||
`prefix` is noted below and `X.X` is the Python version and `Y.Y` is the numpy | ||
|
||
* Windows-10: 64-bit Intel-compatible processors. [Prefix `win_64_`\ ] | ||
* MacOS: Intel processors. [Prefix `mac_64_`\ ] | ||
* MacOS: ARM processors, aka Apple Silicon (M1, etc). [Prefix `mac_arm_`\ ] | ||
* Linux: 64-bit Intel-compatible processors. [Prefix `linux_64_`\ ] | ||
* Linux: ARM processors (64-bit and 32-bit Raspberry Pi OS only). | ||
[Prefixes `linux_arm32_` and `linux_arm64_`\ ] | ||
|
||
Some older versions combinations of Python and | ||
NumPy can be found in the older svn repository for GSAS-II: | ||
https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/Binaries | ||
|
||
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:: | ||
|
||
cd fsource | ||
scons | ||
|
||
The scons file captures the compilation options needed for the supported platforms, but to compile on other platforms, it may be necessary to modify the `Sconstruct` file to configure for the new platform. | ||
|
||
Installation of compilers is highly depend on the computer system being used, but in many cases they can be installed as a conda package, with a command such as:: | ||
|
||
conda install gfortran_osx-64 scons | ||
|
||
Use the `conda search gfortran` command to find the name for the package. | ||
On most linux systems, one can use a command such as `sudo apt-get gfortran` or `yum install gcc-gfortran`. Also see https://gcc.gnu.org/wiki/GFortranBinaries for more information. | ||
|
||
Note that the intent is that this Scons-based process will be replaced with one to run under meson in mid-2024. In the meantime, some older web pages discussing compiling GSAS-II may be of use: | ||
|
||
* https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/CompilingWindows | ||
* https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallMacHardWay#CompilingFortranCode | ||
* https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallLinux#CompilingFortranCode | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. raw:: html | ||
|
||
<style> .clear {clear: both;}</style> | ||
|
||
.. image:: ./images/gsas2.png | ||
:scale: 25 % | ||
:alt: GSAS-II logo | ||
:align: right | ||
|
||
================================================== | ||
Customized Python Installation | ||
================================================== | ||
|
||
Experienced system managers or code developers may wish to perform their own Python installations. Noting that the GSAS-II GUI requires at a minimum wxPython, matplotlib, PyOpenGL, NumPy and SciPy be installed, while for scripting use, only NumPy and SciPy are required. For full functionality, several other optional packages are needed, as is `discussed in the GSAS-II Python package requirements <https://gsas-ii.readthedocs.io/en/latest/packages.html#gui-requirements>`_. | ||
If Python versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or run the compilation yourself (`see compilation information <https://advancedphotonsource.github.io/GSAS-II-tutorials/compile.html>`_). | ||
|
||
The choices for how to install Python and packages come down to distribution methods such as conda, pip, homebrew or Linux distro-supplied installation. It is also possible to obtain all as source code and compile them locally. | ||
|
||
conda | ||
---------- | ||
|
||
With conda, use commands such as this:: | ||
|
||
conda install python=3.11 numpy=1.26 wxpython scipy matplotlib pyopengl pillow h5py imageio requests git gitpython -c conda-forge | ||
|
||
or:: | ||
|
||
conda create -n <envname> python=3.11 numpy=1.26 wxpython scipy matplotlib pyopengl pillow h5py imageio requests git gitpython -c conda-forge | ||
|
||
pip | ||
-------- | ||
|
||
For pip (PyPI) installation, download and install Python from https://www.python.org/downloads/ (the 3.11 version is recommended) and then use a Python pip command similar to this:: | ||
|
||
pip install numpy wxpython scipy matplotlib pyopengl pillow h5py imageio requests gitpython | ||
|
||
homebrew | ||
--------------- | ||
|
||
Homebrew is one of several installers that will install a OS-specific complied software package or will download, compile and install the package from source code. See help information for that installer. | ||
|
||
|
||
Distro-supplied packages | ||
--------------------------------- | ||
|
||
A small number of users or sites prefer to use Python distributions supplied via a Linux distrobution, such as from Ubuntu, Debian or Redhat. As an example for how this is done, please see some older notes on installation with the Raspberry Pi OS: https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallPiLinux. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,13 @@ Running GSAS-II requires a number of coordinated installation steps and there ar | |
GSAS2FULL installer | ||
======================= | ||
|
||
Most users of GSAS-II are seeking a simple way to install and run the software and can live with the idea that they may have duplicated Python installations (several hundreds of MB each) on their computer. The GSAS2FULL self-installer provides that and can be found `here <https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/latest>`_. Brief instructions follow: | ||
Most users of GSAS-II are seeking a simple way to install and run the software and can live with the idea that they may have duplicated Python installations (several hundreds of MB each) on their computer. The GSAS2FULL self-installer provides that and can be `downloaded from here <https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/latest>`_. Brief installation instructions are outlined below with links to more complete instructions: | ||
|
||
Windows | ||
----------- | ||
|
||
For Windows download file and run file https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-Windows-x86_64.exe. | ||
For Windows download file https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-Windows-x86_64.exe and run it. | ||
After the installer is started | ||
You will have a choice for where to install the software (the default is usually OK, but something like ``c:\software`` might be better, if your computer security allows that.) | ||
|
||
More complete installation instructions `are here <install-g2f-win.html>`_. | ||
|
@@ -28,7 +29,7 @@ MacOS and Linux | |
For MacOS and Linux use a command such as:: | ||
|
||
g2="https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-<platform>" | ||
curl "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p <install-loc> | ||
curl -L "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p <install-loc> | ||
|
||
where: | ||
|
||
|
@@ -47,26 +48,28 @@ Users who work extensively with Python and use the conda Python installer may pr | |
|
||
This creates a conda virtual environment named ``GSASII`` (this can be changed) for use by GSAS-II. While it is also possible to install GSAS-II into the conda base environment, this is not recommended as it can create conflicts between Python and package versions needed by GSAS-II and those required by other packages. | ||
|
||
Using a system-supplied Python | ||
================================= | ||
Installing GSAS-II after Python Installation | ||
============================================= | ||
|
||
A small number of users or sites prefer to use Python distributions supplied via other routes (such as Debian packages, or using `PyPi <https://pypi.org/ PyPI>`_, etc). It is the user's responsibility to configure Python (at a minimum, GUI use requires wxPython, matplotlib, | ||
PyOpenGL, NumPy and SciPy while for scripting use, only NumPy and SciPy are required) but a number of other optional packages needed for | ||
full functionality, `as discussed here <https://gsas-ii.readthedocs.io/en/latest/packages.html#gui-requirements>`_. | ||
If versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or run the compilation yourself. | ||
A small number of users or sites prefer to use Python distributions supplied via other routes (such as Debian packages) or using `PyPi <https://pypi.org/ PyPI>`_, etc. or prefer to handle use of conda on their own. Some discussion on Python installation is | ||
`found here<install_pip.html>`_. Independent of how Python is installed, multiple packages are needed, please see the | ||
`discussion on Python package requirements <https://gsas-ii.readthedocs.io/en/latest/packages.html#gui-requirements>`_, noting that the GSAS-II GUI requires at a minimum wxPython, matplotlib, | ||
PyOpenGL, NumPy and SciPy, while for scripting use, only NumPy and SciPy are required. For full functionality, several other optional packages are needed. | ||
If versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or run the compilation yourself (`see compilation information <https://advancedphotonsource.github.io/GSAS-II-tutorials/compile.html>`_). | ||
|
||
A simple way to install GSAS-II with a supplied Python environment is to use these commands (on all platforms):: | ||
A simple way to install GSAS-II with a supplied Python environment uses the `gitstrap.py` script provided for this purpose. Use these commands (on any platform) to install GSAS-II:: | ||
|
||
cd ~/G2 | ||
curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py | ||
python gitstrap.py | ||
|
||
This will place the install script in directory ``~/G2`` (which you may wish to change) and will place all GSAS-II files in subdirectory ``~/G2/GSAS-II`` | ||
|
||
For GSAS-II Software Developers | ||
================================= | ||
Installation for GSAS-II Software Developers | ||
============================================== | ||
|
||
While all of the above approaches will clone a copy of the GSAS-II repository from GitHub, software developers will likely wish to clone the repo themselves from | ||
While all of the above approaches do clone a copy of the GSAS-II repository from GitHub, software developers will likely wish to clone the repo themselves. This will also require This is done | ||
from | ||
``[email protected]:AdvancedPhotonSource/GSAS-II.git`` or ``https://github.com/AdvancedPhotonSource/GSAS-II.git``. | ||
|
||
If the repo is cloned at ``~/myProjects/myGSASII`` then the local copy of GSAS-II can be | ||
|