wiki:InstallLinux
Last modified 5 years ago Last modified on 01/27/15 12:41:08

Installing GSAS & EXPGUI on Linux

There are two ways provided here to install GSAS & EXPGUI. The first is preferred since it downloads directly from a subversion repository. In this method the distribution .tar file does not need to change when the program is updated. Instead, the latest version of the programs are downloaded from a server when the program is installed (an internet connection is obviously required). Subsequently, if there are updates to GSAS or EXPGUI, an update can be made where only the modified or added files are upgraded. This update step can be done using the File/Update... menu option in EXPGUI or by executing the bootstrap.py file in the GSAS directory. However, these methods require ~double the space needed by GSAS & EXPGUI. For users who need to install GSAS & EXPGUI on systems where an Internet connection to the server is not possible or where space usage is critical, an alternate .tar file is also provided containing all GSAS & EXPGUI files, but this requires that upgrades be performed by downloading and installing the all GSAS & EXPGUI files from a future distribution.

There are so many flavors and releases of Linux in use, it is hard to prepare a installer that works on all platforms. Some testing has been done with Fedora Core 10 & 12. Please send feedback on experience with other systems to mailto:toby@…

Prerequisites

  • Python: the python interpreter is required to run the self-installer install script. This I believe is found on all modern linuxes as part of the basic install.
  • Subversion: the subversion (also called svn) is required to use self-installer as well. This is the version management mechanism. This is a common package, but usually is not installed by default. The presence of this can be tested by typing which svn. On RedHat, to load the package use yum install subversion
  • tcsh: this shell is needed to run the GSAS script. If you will only use EXPGUI, this is not needed. It does not seem to be loaded by default. The presence of this can be tested by typing ls /bin/tcsh. To load the package on RedHat, use yum install tcsh
  • Tcl/Tk & BLT: EXPGUI requires the Tcl/Tk interpreter to run. In addition, the BLT graphics package is required for plots, such as in program LIVEPLOT (EXPGUI can be run without this). It is possible to load Tcl/Tk and BLT on most versions of Linux, but most recent dists of Tcl/Tk/BLT seem to be buggy. You are recommended to use the Tcl/Tk (file .../gsas/exe/ncnrpack) that comes with the GSAS/EXPGUI distribution, but pay attention to the following notes:
    • Fedora core 10: the .../gsas/exe/ncnrpack image fails, but the blt.i386 (2.4-28.z.fc10) package works fine.
    • Fedora core 12: the initial yum-loaded version of BLT failed. Be sure to upgrade to blt.i686 (2.4-32.z.fc12 or later); the .../gsas/exe/ncnrpack also image works fine on FC12, but has less attractive fonts.
    • Ubuntu 14.04: Tcl/Tk? 8.6 fails, but ncnrpack runs OK if libstdc++-4.8 is installed.
  • GSAS: The GSAS image files (in .../gsas/exe) are compiled using g77, which will require a compatibility library to run on many modern Linux versions. If you have problems, here are some of the packages that may need to be installed to have these files run:
    • FC10: libgcc, glibc, libxcb, libX11, libXau, libXdmcp
    • FC12: libgcc, glibc, libxcb, libX11, libXau
  • web proxy information: If your site requires use of a web proxy, you will need to know the proxy name and port number. See the discussion on proxies for more on configuring that.

Self-Upgrading GSAS & EXPGUI Installation Commands

The following four commands can be used to create a GSAS installation directory and install GSAS & EXPGUI in that area:

  • mkdir ~/gsas
  • cd ~/gsas
  • curl https://subversion.xray.aps.anl.gov/EXPGUI/gsas/linux/dist/bootstrap.py > bootstrap.py
  • python bootstrap.py

There are many other ways, using GUI tools, to accomplish the same tasks. If curl cannot access the file, you can use https://subversion.xray.aps.anl.gov/trac/EXPGUI/browser/gsas/linux/dist/bootstrap.py?format=txt and move that file into the location where GSAS and EXPGUI will be installed. Then run the bootstrap.py file. Note that if curl fails, but a web browser works, you probably have a web proxy in use. See the discussion on proxies for more on configuring that.

It should be noted that GSAS and EXPGUI desktop shortcuts are created for Gnome using the distributed Tcl/Tk version. I am not sure what other mechanisms are available for app integration on KDE, etc., but am happy to get input.

Upgrades

In EXPGUI, one can press the "Upgrade GSAS/EXPGUI" menu button in the File menu. The response to this will be a window that says if there are updates to download or that the programs are "up-to-date". If there are updates, you have the option of installing them and restarting EXPGUI.

If you do not use EXPGUI, you can update by running the bootstrap.py in the gsas folder as before. Clicking on the file might work.

Note that if you make any modifications to any files distributed as part of GSAS or EXPGUI, these files may not be upgraded, should the changes be in the same regions as upgrades made by Bob or myself. If you are in the practice of modifying the programs, you should learn to use svn and do your upgrades by hand.

Non-Upgrading GSAS & EXPGUI Installation Commands

Users without network access, or who do not want to install subversion can use this method to install GSAS & EXPGUI, but this will likely get you a pretty old version of EXPGUI, since this distribution is not updated very often. If this is used, the software also cannot fetch the latest upgrades from the server. The following three commands can be used to create a GSAS installation directory and install GSAS & EXPGUI in that area:

There are many other ways, using GUI tools, to accomplish the same tasks. The gist is to download file http://11bm.xray.aps.anl.gov/downloads/gsas/linux/gsas+expgui_linux.tar.gz and expand that into the location where GSAS and EXPGUI will be installed. Note that the subversion version number for this distribution can be determined by noting the latest number gsas+expgui_linux_Vxxxx.dmg in directory http://11bm.xray.aps.anl.gov/downloads/gsas/linux/.

Note that it is possible to update manually by downloading the latest version of EXPGUI using https://subversion.xray.aps.anl.gov/trac/EXPGUI/changeset/HEAD/trunk?old_path=%2F&format=zip and then manually move these files into the expgui directory.

With this download method, you are also on your own to create shortcuts.

Reported Problems & Work Arounds

Notes on problems specific Linux versions