S2PLOT:Installation
From S2PLOT
Revision as of 06:40, 26 October 2007 S2plot admin (Talk | contribs) (→Configuration) ← Previous diff |
Current revision S2plot admin (Talk | contribs) |
||
Line 2: | Line 2: | ||
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. | 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. | ||
+ | |||
+ | <b>PLEASE NOTE THAT THE INSTALLATION NOTES BELOW REFER TO OLDER VERSIONS OF S2PLOT RELEASED PRIOR TO VERSION 3.2.1</b>. | ||
+ | We will update this information in the very near future. | ||
==Architectures== | ==Architectures== | ||
Line 9: | Line 12: | ||
<table> | <table> | ||
<tr><td width=15%><b>OS</b></td><td width=15%><b>Compiler</b></td> | <tr><td width=15%><b>OS</b></td><td width=15%><b>Compiler</b></td> | ||
- | <td width=25%><b>Architecture</b></td> | + | <td width=15%><b>Architecture</b></td> |
- | <td width=35%><b><tt>S2ARCH</tt></b></td></tr> | + | <td width=20%><b>S2ARCH</b></td><td width=15%><b>Notes</b></td></tr> |
<tr><td>Linux</td><td>GNU</td><td>i386</td><td><tt>linux-gnu-i386</tt></td></tr> | <tr><td>Linux</td><td>GNU</td><td>i386</td><td><tt>linux-gnu-i386</tt></td></tr> | ||
- | <tr><td>Linux</td><td>GNU</td><td>x86_64</td><td><tt>linux-gnu-x86_64</tt></td></tr> | + | <tr><td>Linux</td><td>GNU</td><td>x86_64</td><td><tt>linux-gnu-x86_64</tt></td><td>64-bit, OpenMP required</td></tr> |
- | <tr><td>Linux</td><td>Intel</td><td>i386</td><td><tt>linux-intel-i386</tt></td></tr> | + | |
<tr><td>Darwin</td><td>GNU</td><td>i386</td><td><tt>darwin-gnu-i386</tt></td></tr> | <tr><td>Darwin</td><td>GNU</td><td>i386</td><td><tt>darwin-gnu-i386</tt></td></tr> | ||
- | <tr><td>Darwin</td><td>GNU</td><td>Power PC</td><td><tt>darwin-gnu-ppc</tt></td></tr> | + | <tr><Td>Darwin</td><td>GNU</td><td>x86_64</td><td><tt>darwin-gnu-x86_64</tt></td><td>64-bit, OpenMP required</td></tr><tr> |
- | <tr><td>Darwin</td><td>GNU</td><td>Universal build<br>(No FORTRAN)</td><td><tt>darwin-gnu-univ</tt></td></tr> | + | <td>Darwin</td><td>GNU</td><td>Power PC</td><td><tt>darwin-gnu-ppc</tt></td></tr> |
- | <tr><td>Darwin</td><td>Intel</td><td>i386</td><td><tt>darwin-intel-i386</tt></td></tr> | + | <tr><td>Darwin</td><td>GNU</td><td>Universal build</td><td><tt>darwin-gnu-univ</tt></td><td>no FORTRAN</td></tr> |
- | <tr><td>Windows</td><td>GNU</td><td>i386</td><td> | + | |
- | <tt>cygwin-gnu-i386</tt> | + | |
- | </td></tr> | + | |
- | <tr><td>Sun OS</td><td>GNU</td><td>Sparc (BETA)</td> | + | |
- | <td>Ask us about this</td> | + | |
- | </tr> | + | |
</table> | </table> | ||
Line 29: | Line 25: | ||
==Prerequisites== | ==Prerequisites== | ||
- | # 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. | + | # For C/C++ users, the gcc compiler is required. For FORTRAN users, the gfortran or g77 compiler is required. |
# 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. | # 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== | ==Choosing the Distribution== | ||
- | As of version 1.80, the S2PLOT distribution comes in either a single file (containing all possible architectures) named: | + | The S2PLOT [[S2PLOT:Download | distribution]] comes in either a single file (containing all possible architectures) named: |
* s2plot-all-A.BB-YYYY-MM-DD.tar.bz2 | * s2plot-all-A.BB-YYYY-MM-DD.tar.bz2 | ||
Line 57: | Line 53: | ||
Untar the all distribution file using: | Untar the all distribution file using: | ||
- | <code>tar -xvf s2plot-all-A.BB-YYYY-MM-DD.tar.bz2</code> (replacing A, BB, etc.) | + | <code>tar -xvf s2plot-all-A.BB-YYYY-MM-DD.tar</code> (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. | 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. | ||
Line 68: | Line 64: | ||
Untar the base distribution file using: | Untar the base distribution file using: | ||
- | <code>tar -xvf s2plot-base-A.BB-YYYY-MM-DD.tar.bz2</code> (replacing A, BB, etc.) | + | <code>tar -xvf s2plot-base-A.BB-YYYY-MM-DD.tar</code> (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: | 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: | ||
- | <code>bunzip2 s2plot-darwin-gnu-i386-1.80-2007-04-05.tar.bz2</code> | + | <code>bunzip2 s2plot-darwin-gnu-i386-2.00-2007-12-17.tar.bz2</code> |
- | <code>tar -xvf s2plot-darwin-gnu-i386-1.80-2007-04-05.tar</code> | + | <code>tar -xvf s2plot-darwin-gnu-i386-2.00-2007-12-17.tar</code> |
which will install the relevant version of the S2PLOT library within the s2plot-A.BB directory. | which will install the relevant version of the S2PLOT library within the s2plot-A.BB directory. | ||
Line 93: | Line 89: | ||
# If you are planning to use textures, set the environment variable <code>S2PLOT_TEXPATH</code>. The recommended default value is: <code>setenv S2PLOT_TEXPATH ${S2PATH}/textures</code>. | # If you are planning to use textures, set the environment variable <code>S2PLOT_TEXPATH</code>. The recommended default value is: <code>setenv S2PLOT_TEXPATH ${S2PATH}/textures</code>. | ||
# If you are planning to use the LaTeX commands, set the environment variable <code>S2PLOT_LATEXBIN</code> to the location of your local LaTeX installation. eg. <code>setenv S2PLOT_LATEXBIN /usr/local/latex</code> (Linux) or <code>setenv S2PLOT_LATEXBIN /sw/bin/latex</code> (OSX). You will also need to set variables <code>S2PLOT_DVIPNGBIN</code> and <code>S2PLOT_IMPATH</code>. See ENVIRONMENT.TXT for details. | # If you are planning to use the LaTeX commands, set the environment variable <code>S2PLOT_LATEXBIN</code> to the location of your local LaTeX installation. eg. <code>setenv S2PLOT_LATEXBIN /usr/local/latex</code> (Linux) or <code>setenv S2PLOT_LATEXBIN /sw/bin/latex</code> (OSX). You will also need to set variables <code>S2PLOT_DVIPNGBIN</code> and <code>S2PLOT_IMPATH</code>. See ENVIRONMENT.TXT for details. | ||
- | + | # For other environment variables, see [[S2PLOT:Environment_Variables | here]]. | |
- | 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== | ==Testing== | ||
Line 100: | Line 95: | ||
Once S2PLOT is installed, and the configuration tasks have been completed, you are now ready to test the installation using the precompiled binaries. | Once S2PLOT is installed, and the configuration tasks have been completed, you are now ready to test the installation using the precompiled binaries. | ||
- | # 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. | + | # Test that you can run the programs from a terminal (do not use the Apple Finder or other file managers). Change to directory <code>${S2PATH}/${S2ARCH} </code> and run any of the demonstration programs. |
- | # 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. | + | # Copy s2opend.c from the directory <code>${S2PATH}/functions</code> to your own directory. Compile with <code>cbuild.csh s2opend</code> 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. | + | # If either of these steps results in errors, please refer to INSTALL.TXT for recommended actions. |
==Where to Next?== | ==Where to Next?== | ||
Line 108: | Line 103: | ||
You should now have a fully-functional installation of S2PLOT. | 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. | + | To learn more about using S2PLOT, you can try the various function examples available as source code (in the <code>${S2PATH}/functions</code> directory) or as pre-compiled binaries (in the<code>${S2PATH}/${S2ARCH}</code> directory). Note that you cannot compile the source code samples within the <code>${S2PATH}/functions</code> directory. The [[S2PLOT:Function_List | Function List]] on this web-site also contains sample code for every single S2PLOT function. We are developing a series of [[S2PLOT:HowTo | How Tos]] to aid programmers new to S2PLOT. |
+ | |||
+ | * C/C++ programmers: use the files named filename.c and build with <code>${S2PATH}/cbuild.csh filename</code> | ||
+ | * FORTRAN programmers: you will need to examine the architecture definition file ($S2ARCH.in) file for your architecture to see whether gfortran or g77 is being used, and whether your source file extension should be .f or .f90. Build your code with <code>${S2PATH}/fbuild.csh</code> | ||
+ | |||
+ | 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 [[S2PLOT:Function List | here]]. | ||
+ | |||
+ | ==Disclaimers== | ||
+ | |||
+ | S2PLOT is freely available for non-commercial and educational use, however, it is not public-domain software. The programming libraries and documentation may not be redistributed or sub-licensed in any form without permission from Swinburne University of Technology. The programming library and sample codes are provided without warranty. | ||
+ | |||
+ | We would appreciate it if research outcomes using S2PLOT would provide the following acknowledgement: | ||
+ | |||
+ | ''Three-dimensional visualisation was conducted with the S2PLOT progamming library'' | ||
+ | |||
+ | and a reference to | ||
+ | |||
+ | ''D.G.Barnes, C.J.Fluke, P.D.Bourke & O.T.Parry, 2006, Publications of the Astronomical Society of Australia, 23(2), 82-93.'' | ||
+ | |||
+ | S2PLOT development was funded through the Researcher Developer Grant Scheme at [http://www.swinburne.edu.au Swinburne University of Technology]. | ||
- | * C/C++ programmers: use the files named s2ucN.c and build with ${S2PATH}/cbuild.csh | + | [[S2PLOT | Back]] to S2PLOT home page. |
- | * 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. | + | __NOEDITSECTION__ |
Current revision
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.
PLEASE NOTE THAT THE INSTALLATION NOTES BELOW REFER TO OLDER VERSIONS OF S2PLOT RELEASED PRIOR TO VERSION 3.2.1. We will update this information in the very near future.
Architectures
The currently supported architectures and operating systems for S2PLOT are:
OS | Compiler | Architecture | S2ARCH | Notes |
Linux | GNU | i386 | linux-gnu-i386 | |
Linux | GNU | x86_64 | linux-gnu-x86_64 | 64-bit, OpenMP required |
Darwin | GNU | i386 | darwin-gnu-i386 | |
Darwin | GNU | x86_64 | darwin-gnu-x86_64 | 64-bit, OpenMP required |
Darwin | GNU | Power PC | darwin-gnu-ppc | |
Darwin | GNU | Universal build | darwin-gnu-univ | no FORTRAN |
Prerequisites
- For C/C++ users, the gcc compiler is required. For FORTRAN users, the gfortran or g77 compiler is required.
- 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
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
(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
(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-2.00-2007-12-17.tar.bz2
tar -xvf s2plot-darwin-gnu-i386-2.00-2007-12-17.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:
-
setenv S2PATH [location]
where [location] is the path to the s2plot-A.BB directory. -
setenv S2ARCH [architecture]
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.
- Linux: Add
${S2PATH}/${S2ARCH}
to the colon-separated environment variableLD_LIBRARY_PATH
. - Darwin: Add
${S2PATH}/${S2ARCH}
to the colon-separated environment variableDYLD_LIBRARY_PATH
.
- Linux: Add
- 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. - If you are planning to use textures, set the environment variable
S2PLOT_TEXPATH
. The recommended default value is:setenv S2PLOT_TEXPATH ${S2PATH}/textures
. - 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) orsetenv S2PLOT_LATEXBIN /sw/bin/latex
(OSX). You will also need to set variablesS2PLOT_DVIPNGBIN
andS2PLOT_IMPATH
. See ENVIRONMENT.TXT for details. - For other environment variables, see here.
Testing
Once S2PLOT is installed, and the configuration tasks have been completed, you are now ready to test the installation using the precompiled binaries.
- 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. - Copy s2opend.c from the directory
${S2PATH}/functions
to your own directory. Compile withcbuild.csh s2opend
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, you can try the various function examples available as source code (in the ${S2PATH}/functions
directory) or as pre-compiled binaries (in the${S2PATH}/${S2ARCH}
directory). Note that you cannot compile the source code samples within the ${S2PATH}/functions
directory. The Function List on this web-site also contains sample code for every single S2PLOT function. We are developing a series of How Tos to aid programmers new to S2PLOT.
- C/C++ programmers: use the files named filename.c and build with
${S2PATH}/cbuild.csh filename
- FORTRAN programmers: you will need to examine the architecture definition file ($S2ARCH.in) file for your architecture to see whether gfortran or g77 is being used, and whether your source file extension should be .f or .f90. Build your code 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.
Disclaimers
S2PLOT is freely available for non-commercial and educational use, however, it is not public-domain software. The programming libraries and documentation may not be redistributed or sub-licensed in any form without permission from Swinburne University of Technology. The programming library and sample codes are provided without warranty.
We would appreciate it if research outcomes using S2PLOT would provide the following acknowledgement:
Three-dimensional visualisation was conducted with the S2PLOT progamming library
and a reference to
D.G.Barnes, C.J.Fluke, P.D.Bourke & O.T.Parry, 2006, Publications of the Astronomical Society of Australia, 23(2), 82-93.
S2PLOT development was funded through the Researcher Developer Grant Scheme at Swinburne University of Technology.
Back to S2PLOT home page.