S2PLOT:Installation

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 06:39, 26 October 2007
S2plot admin (Talk | contribs)
(Configuration)
← Previous diff
Revision as of 06:39, 26 October 2007
S2plot admin (Talk | contribs)
(Configuration)
Next diff →
Line 88: Line 88:
# <code>setenv S2ARCH [architecture]</code> where [architecture] is a valid archictecture description - see the table above, or ENVIRONMENT.TXT for details. # <code>setenv S2ARCH [architecture]</code> where [architecture] is a valid archictecture description - see the table above, or ENVIRONMENT.TXT for details.
# Configure the dynamic linker on your system to find the S2PLOT library. # Configure the dynamic linker on your system to find the S2PLOT library.
-** Linux: Add <code>${S2PATH}/${S2ARCH}</code> to the colon-separated environment variable <code>LD_LIBRARY_PATH</code>.+#* Linux: Add <code>${S2PATH}/${S2ARCH}</code> to the colon-separated environment variable <code>LD_LIBRARY_PATH</code>.
-** Darwin: Add <code>${S2PATH}/${S2ARCH}</code> to the colon-separated environment variable <code>DYLD_LIBRARY_PATH</code>.+#* Darwin: Add <code>${S2PATH}/${S2ARCH}</code> to the colon-separated environment variable <code>DYLD_LIBRARY_PATH</code>.
# You way wish to add $S2PATH to your executable path: eg. set path = ($path $S2PATH). # You way wish to add $S2PATH to your executable path: eg. set path = ($path $S2PATH).
This will simplify the process of building with the fbuild.csh and cbuild.csh scripts. Alternatively, make copies of the scripts and modify them as required. This will simplify the process of building with the fbuild.csh and cbuild.csh scripts. Alternatively, make copies of the scripts and modify them as required.

Revision as of 06:39, 26 October 2007

Contents

Installing S2PLOT

Detailed information on how to install S2PLOT on your system may be found in the files INSTALL.TXT and ENVIRONMENT.TXT. The following instructions provide a quick summary of the standard steps required to install and configure S2PLOT, however, users are encouraged to read the full installation documentation - particularly if there are any errors when you try to build your code.

Architectures

The currently supported architectures and operating systems for S2PLOT are:

OSCompiler Architecture S2ARCH
LinuxGNUi386linux-gnu-i386
LinuxGNUx86_64linux-gnu-x86_64
LinuxInteli386linux-intel-i386
DarwinGNUi386darwin-gnu-i386
DarwinGNUPower PCdarwin-gnu-ppc
DarwinGNUUniversal build
(No FORTRAN)
darwin-gnu-univ
DarwinInteli386darwin-intel-i386
WindowsGNUi386

cygwin-gnu-i386

Sun OSGNUSparc (BETA) Ask us about this


Prerequisites

  1. For C/C++ users, the GCC compiler is required. For FORTRAN users, the G77 compiler is required. S2PLOT has also been tested with Intel FORTRAN compilers. Please refer to INSTALL.TXT for details.
  2. An OpenGL-compliant graphics card, or the Mesa3d library. See INSTALL.TXT for details of cards and system configurations that S2PLOT has been tested on.

Choosing the Distribution

As of version 1.80, the S2PLOT distribution comes in either a single file (containing all possible architectures) named:

  • s2plot-all-A.BB-YYYY-MM-DD.tar.bz2

or two parts named:

  • s2plot-base-A.BB-YYYY-MM-DD.tar.bz2
  • s2plot-ARCH-A.BB-YYYY-MM-DD.tar.bz2

where:

  • ARCH is replaced by one of the S2ARCH strings above
  • A is the major version
  • BB is the minor version
  • YYYY is the year of the release
  • MM is the month of the release
  • DD is the day of the release

Before continuing installation, please check that you have the latest version of S2PLOT.

Install from all tarball

Unzip the all distribution file using:

bunzip2 s2plot-all-A.BB-YYYY-MM-DD.tar.bz2 (replacing A, BB, etc.)

Untar the all distribution file using: tar -xvf s2plot-all-A.BB-YYYY-MM-DD.tar.bz2 (replacing A, BB, etc.)

This will produce a directory named by the pattern s2plot-A.BB. You can now move the s2plot-A.BB directory to any location you prefer, for example to /usr/local. You are now ready to move onto the Configuration step.

Install from base and ARCH tarballs

Unzip the base distribution file using:

bunzip2 s2plot-base-A.BB-YYYY-MM-DD.tar.bz2 (replacing A, BB, etc.)

Untar the base distribution file using: tar -xvf s2plot-base-A.BB-YYYY-MM-DD.tar.bz2 (replacing A, BB, etc.)

This will produce a directory named by the pattern s2plot-A.BB. Now unzip and untar the specific architecture version you wish to use. For example, to use Darwin Gnu compiler version:

bunzip2 s2plot-darwin-gnu-i386-1.80-2007-04-05.tar.bz2

tar -xvf s2plot-darwin-gnu-i386-1.80-2007-04-05.tar

which will install the relevant version of the S2PLOT library within the s2plot-A.BB directory. You can now move the s2plot-A.BB directory to any location you prefer, for example to /usr/local.

Configuration

Now is a good time for you read the INSTALL.TXT and ENVIRONMENT.TXT files that are in the s2plot-A.BB directory.

Configuration of S2PLOT is achieved by editing s2plot.csh in the distribution directory and adding several environment variables to the .cshrc file in your home directory. As a minimum, the following should be added to your .cshrc file:

  1. setenv S2PATH [location] where [location] is the path to the s2plot-A.BB directory.
  2. setenv S2ARCH [architecture] where [architecture] is a valid archictecture description - see the table above, or ENVIRONMENT.TXT for details.
  3. Configure the dynamic linker on your system to find the S2PLOT library.
    • Linux: Add ${S2PATH}/${S2ARCH} to the colon-separated environment variable LD_LIBRARY_PATH.
    • Darwin: Add ${S2PATH}/${S2ARCH} to the colon-separated environment variable DYLD_LIBRARY_PATH.
  4. You way wish to add $S2PATH to your executable path: eg. set path = ($path $S2PATH).

This will simplify the process of building with the fbuild.csh and cbuild.csh scripts. Alternatively, make copies of the scripts and modify them as required.

  1. If you are planning to use textures, set the environment variable S2PLOT_TEXPATH. The recommended default value is:

setenv S2PLOT_TEXPATH ${S2PATH}/textures.

  1. If you are planning to use the LaTeX commands, set the environment variable S2PLOT_LATEXBIN to the location of your local LaTeX installation. eg. setenv S2PLOT_LATEXBIN /usr/local/latex (Linux) or setenv S2PLOT_LATEXBIN /sw/bin/latex (OSX). You will also need to set variables S2PLOT_DVIPNGBIN and S2PLOT_IMPATH. See ENVIRONMENT.TXT for details.

To use S2PLOT on Windows, you must have a working installation of cygwin. Please make sure you read the INSTALL.TXT and ENVIRONMENT.TXT files that are in the s2plot-A.BB directory for information on which packages need to be installed. Configuration is similiar to Linux version. Please note that Cgywin S2PLOT can be slow.

Testing

Once S2PLOT is installed, and the configuration tasks have been completed, you are now ready to test the installation using the precompiled binaries.

  1. Test that you can run the programs from a terminal (do not use the Apple Finder or other file managers). Change to directory ${S2PATH}/${S2ARCH} and run any of the demonstration programs.
  2. Copy s2uc1.c from the directory ${S2PATH}/samples to your own directory. Compile with cbuild.csh s2uc1 and check that you can run execute # the binary.

If either of these steps results in errors, please refer to INSTALL.TXT for recommended actions.

Where to Next?

You should now have a fully-functional installation of S2PLOT.

To learn more about using S2PLOT, copy the rest of the sample source code from ${S2PATH}/samples to a new directory and test that you can compile it.

  • C/C++ programmers: use the files named s2ucN.c and build with ${S2PATH}/cbuild.csh
  • FORTRAN-77 programmers: use the files named fs2ucN.c and build with ${S2PATH}/fbuild.csh

You are now ready to write your own S2PLOT code, and compile it in your own workspace. More details on using S2PLOT may be found by exploring this website. A complete function list is available here.

Personal tools