Quick Start Guide to Compiling and Installing the Plasma Theory and Simulation Group Programs

This should get you up and running with the PTSG particle in cell codes in a minimal amount of time on linux/BSD platforms with appropriately installed libraries. The instructions may work on other systems too, but trouble-shooting failed installations is beyond the scope of this manual. The XGRAFIX and XPDP1 software are dealt with explicitly, but the general procedure is applicable to other codes on the PTSG website. For more detailed instructions, refer to the README files included with the software please contact you local system administrator or the PTSG system administrator, BUT MAKE SURE YOU READ AND FOLLOW ALL THE INSTRUCTIONS. Bug reports that say "your software doesn't work" aren't useful -- in describing problems, please be verbose and describe the platform you are working on.

  1. INSTALLING XGRAFIX
    1. The PTSG codes rely on the XGRAFIX library to generate plots and will not compile without a proper XGRAFIX installtion. So the first step is to download the current version of XGRAFIX:
      http://langmuir.eecs.berkeley.edu/pub/codes/xgrafix/xgrafix260.tar.gz
    2. Uncompress the archive. From the unix prompt enter

      gunzip xgrafix260.tar.gz
      tar xvf xgrafix260.tar

      Change into the xgrafix directory:

      cd xgrafix

    3. Run the configure script. If you have root priveledge on the system and intend to install the XGRAFIX libraries system wide, just type

      ./configure

      If you don't have root priveledge or don't want to install XGRAFIX globally, you must run configure and specify the destination of the installation using the --with-prefix option:

      ./configure --with-prefix=MYPREFIX

      MYPREFIX is the desired directory path to install to -- $PWD (current working directory) and your home directory might not be bad choices. If you use the --with-prefix option, keep in mind that the makefiles of other PTSG PIC programs will need to be manually changed in order to link to the XGRAFIX library when compiling.

    4. After running configure run

      make

      from the unix prompt.

    5. Run

      make install

      from the unix prompt. If you are installing the library system wide (i.e. running configure without using the --with-prefix option), make sure you are root before running this command, or you will have permissions errors.

    6. [Optional] Test the XGRAFIX installation. Change to the ctest and run xtest program:

      cd ctest
      ./xtest

  2. INSTALLING XPDP1

    XPDP1 is an acronym for X Plasma Device Planar 1-D. Installation of XPDC1, XPDP2, XPDC2 and XES2 follow similar procedures.

    1. Download XPDP1:
      http://langmuir.eecs.berkeley.edu/pub/codes/xpdp1/xpdp1_4.11.tar.gz
    2. Uncompress XPDP1 and change into its src directory: gunzip xpdp1_4.11.tar.gz
      tar xvf xpdp1_4.11.tar
      cd xpdp1/src
    3. If you did not install XGRAFIX system wide (i.e. if you used the --with-prefix option when running the XGRAFIX configure script), you will need to edit the makefile to reflect the correct location of XGRAFIX. If XGRAFIX is installed system wide, no editting is necessary and you can skip to the next step.
      • Open the file "makefile" in your favorite editor
      • Change the line

        XGPATH = /usr/local/lib/xgrafix

        to the location specified by --with-prefix option for XGRAFIX's configure script.

        XGPATH = MYPREFIX

        For example, a user 'jhammel' with home directory /accounts/jhammel downloads xgrafix260.tar.gz to his home directory and uncompresses. After changing to the the xgrafix directory, he runs

        ./configure --with-prefix=/accounts/jhammel/xgrafix

        So 'jhammel' should change the link in XPDP1's makefile to

        XGPATH = /account/jhammel/xgrafix

      • Change the line in the makefile from

        CFLAGS= -g -I$(XGPATH) -DPDP1PATH=\"$(HOME)/xpdp1/src\"

        to

        CFLAGS= -g -I$(XGPATH) -I$(XGPATH)/include -DPDP1PATH=\"$(HOME)/xpdp1/src\"

      • Change the line in the makefile from

        LIBS = -L$(XGPATH) -L/usr/local/lib -L/usr/X11R6/lib -lXGC250 -ltk -ltcl -lXpm -lX11 -lm -ldl

        to

        LIBS = -L$(XGPATH) -L$(XGPATH)/lib -L/usr/local/lib -L/usr/X11R6/lib -lXGC250 -ltk -ltcl -lXpm -lX11 -lm -ldl

    4. Run in the xpdp1/src directory

      make

    5. [Optional] Test XPDP1. Run

      ../xpdp1.linux -i ../maxwello.inp

    Similar procedures are used to compile the XPD suite of codes.