Installing CMPR on Linux

CMPR can be loaded either in a self-updating install or as a static install. The self-updating version causes the latest version of CMPR to be installed from the Argonne subversion server and also allows future updates to be installed from within the CMPR program. The static install package is updated less frequently and requires that you download and reinstall the package file to update. I recommend you use one of the self-updating install methods, as this is easier all around. If you do not have easy internet access, or you work inside a highly secure computing environment, you may be find that access to the subversion server is blocked and that your only option is to petition the rulers of the network to open access to the server (they really should) or to use the static install. Note that self-updating install actually includes two versions of CMPR, a stable version that is considered to be relatively bug-free and a development version that is actively being improved -- you can select between these versions from the Help menu. From time-to-time the improvements in the development version are transferred over to the stable version. In the static install, only the stable version is provided.

CMPR is distributed with compiled versions of all programs. The images were compiled using gfortran 4.4 using the -static-libgfortran and -static-libgcc compile options, which makes the images reasonably portable. I have found that they will run with the standard libraries on Fedora core 6, 10 and 12 and Fedora Enterprise 4, but I would appreciate input on other Linux distributions. There are some users who prefer to compile programs on their own computers. This is possible with CMPR, with the exception of the DICVOL06 program, where the source code is not distributed. See the general unix install page for information on compiling programs.

Self-Updating Install

Two different methods for loading self-updating CMPR are shown below. The former will probably be easier for most people, but died-in-the-wool Unix enthusiasts will prefer the second, command line approach.


  • Subversion: the subversion (also called svn) is required to use self-updating approach. This is a version management mechanism. This is a common package, but usually is not installed by default in most Linux installs. The presence of this can be tested by typing which svn. On RedHat, to load the package use yum install subversion
  • 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. This is not needed if you will use the 2nd command-line install method.
  • Tcl/Tk? & BLT: CMPR requires the Tcl/Tk? interpreter along with the BLT graphics package. The compiled images include a starkit version of Tcl/Tk? (file .../cmpr/exe/ncnrpack), but this has problems on some platforms:
    • Fedora core 10: the .../cmpr/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 .../cmpr/exe/ncnrpack also image works fine on FC12, but has less attractive fonts.

1. Installing self-upgrading CMPR from a distribution file (preferred)

I have prepared a file for download,, which contains the files needed to install CMPR.

  • Create the directory "below" where the files will be placed (if needed)

mkdir -p ~/myApps

  • Move to that directory

cd ~/myApps

  • Download and unpack the tar file

curl | tar xvzf -

this will create directory ~/myApps/cmpr

  • Run the supplied python script to download the latest versions of the files from the server:

python ~/myApps/cmpr/

To run the program one needs to type

<path-to-cmpr>/exe/ncnrpack <path-to-cmpr>/cmpr.tcl


<path-to-cmpr>/exe/ncnrpack <path-to-cmpr>/cmpr.tcl file-to-read1.ext file-to-read1.ext ...

This gets old fast. See below for some suggestions on how to create shortcuts.

2. Installing from the subversion server with svn at the command line

Note that the subversion package is easy to download, for example

yum install subversion

on Redhat systems. Use yast in SUSE and apt-get in Debian for similar functionality.

  1. Figure out where you want to put CMPR, I'll assume ~/myApps/CMPR for the example below
  1. Use subversion to obtain the source code:

svn co ~/myApps/CMPR

  1. Load the linux source code into the exe area

svn switch ~/myApps/CMPR/exe

  1. Load the development version into the cmprdev area

svn switch ~/myApps/CMPR/cmprdev

  1. See below for some suggestions on how to create shortcuts.

Static (non-updating) Install

Users without network access, or who do not want to install subversion should use this method to install CMPR. If this is distribution is used, only the stable version is installed and the software cannot fetch the latest upgrades from the server.

  • Create the directory where the files will be placed

mkdir -p ~/myApps/cmpr

  • Move to that directory

cd ~/myApps/cmpr

  • Download and unpack the tar file

curl | tar xvzf -

Note that the subversion version number for this distribution can be determined by noting the latest number cmpr_linux_Vxxxx.tar.gz in directory

  • See below for some suggestions on how to create shortcuts.

Creating a shortcut to CMPR

To make a shortcut to CMPR so that you can access it by typing cmpr rather than a longer command. Choose one from the two methods below:

Add an alias to your ~/.cshrc file, type:

                cat >> ~/.cshrc
                alias cmpr "/usr/local/cmpr/ncnrpack /usr/local/cmpr/cmpr.tcl"

Install a script in the on your system path. Another way to simplify access is to create a file which will execute the cmpr.tcl script from a command in your system's path, for example /usr/local/bin or ~/bin:

                cat > ~/bin/cmpr
                /usr/local/cmpr/ncnrpack /usr/local/cmpr/cmpr.tcl
                chmod +x ~/bin/cmpr

Note that in the above commands ^D means control-D.

Last modified 9 years ago Last modified on Sep 6, 2012 2:08:02 PM