Unpacking the Distribution
After downloading the PGS 4 distribution, decide where you are going to set up your PGS tree. Put the .tar.gz file there and then issue this command:
tar -xvzf pgs-<xxx>.tar.gz
where of course <xxx> is "osx" on a Mac, or "linux" on a Linux machine. The unrolled tar file will create (or overwrite!) a directory folder in that area called PGS with the following contents:
Makefile (used to "make" PGS libraries if needed)
Building an Executable
Example executables are provided, and serve as the main illustration for using PGS. These include
Users of previous versions of PGS may be familiar with these, but a number of things have changed, as described in the PGS/doc/README file. Any new or experienced user of PGS will need to review the README file and update several features of their programs.
The script "mkpgs" provided in the examples area shows how to compile and link a PGS job. (The olympics executable comes pre-compiled/linked - it is called "olympics" and is in the examples area.) A user would compile and link the "taus" executable by issuing the command
Using the Makefile
From the main PGS directory, one can compile executables or rebuild the libraries using the "make" program. Typing "make all" will build all of the libraries (if they are not already built). Typing "make clean" will remove all libraries and executables. Typing "make pythia" will build just the PYTHIA library, and so on.
To build the executable "testexec" from the source code "pgs_testexec.f" in the "examples/" folder, type "make examples/testexec". New compiler options or make commands can be added to the "Makefile" in the PGS directory. It is often convenient to add additional dependencies to the "all:" line in order for the "make all" command to automatically compile all desired executables. Note that the Makefile can be used instead of the mkpgs script (which is included for historical reasons).
John Conway, Univ. of California, Davis
Problems with this page? Send email. (Last update April 2012.)