wiki:InstallLinux
Last modified 6 months ago Last modified on 09/06/2012 01:36:36 PM

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 I have seen bugs with some releases of BLT for Tcl/Tk? 8.5. This GSAS/EXPGUI distribution comes with a version of Tcl/Tk? (file .../gsas/exe/ncnrpack), but this has problems on some platforms:
    • 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.
  • 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 http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsassvnlinux.tar.gz | tar xvzf -
  • python bootstrap.py

There are many other ways, using GUI tools, to accomplish the same tasks. If curl cannot access the file, you can download http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsassvnlinux.tar.gz and expand that into the location where GSAS and EXPGUI will be installed. Then run the bootstrap.py file contained in that directory. 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. If this is used, the software 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/.

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

Reported Problems & Work Arounds

Notes on problems specific Linux versions