/[escript]/branches/dirac/doc/install/srcommon.tex
ViewVC logotype

Annotation of /branches/dirac/doc/install/srcommon.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2290 - (hide annotations)
Thu Feb 26 06:38:16 2009 UTC (10 years, 6 months ago) by jfenwick
Original Path: trunk/doc/install/srcommon.tex
File MIME type: application/x-tex
File size: 8090 byte(s)
Some minor changes to doco before I mess about with packaging.
1 jfenwick 2289
2     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3     %
4     % Copyright (c) 2003-2008 by University of Queensland
5     % Earth Systems Science Computational Center (ESSCC)
6     % http://www.uq.edu.au/esscc
7     %
8     % Primary Business: Queensland, Australia
9     % Licensed under the Open Software License version 3.0
10     % http://www.opensource.org/licenses/osl-3.0.php
11     %
12     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13    
14     % This file contains material common to all src distributions.
15    
16     % The original version of this content came from the esscc twiki page maintained by ksteube
17    
18     \esfinley is known to compile and run on the following systems:
19     \begin{itemize}
20     \item \linux under gcc\footnote{There are some problems with OpenMP under gcc prior to version 4.3.2} - \Sec{sec:srclinux}
21     \item \linux under icc on SGI ICE 8200.
22     \item \macosx under gcc - \Sec{sec:srcmac}
23     \end{itemize}
24    
25     \section{External dependencies}
26     The following external packages are required in order to compile and run \esfinley.
27     Where version numbers are specified, more recent versions can probably be subsituted.
28     You can either try the standard/precompiled packages available for your operating system or you can download and build them from source.
29     The advantage of using existing packages is that they will probably all work togther properly.
30     You must take greater care if downloading sources separately.
31    
32     \begin{itemize}
33     \item python 2.4.4 (\url{http://python.org}) \\
34     - Python interpreter (You must compile with shared libraries.)
35     \item numarray 1.5.2 (\url{http://www.stsci.edu/resources/software_hardware/numarray/numarray.html}) \\
36     - Arrays for python.
37     \item boost 1_35_0 (\url{http://www.boost.org}) \\
38     - Provides an interface between C++ and python.
39     \item scons 0.989.5 (\url{http://www.scons.org/}) \\
40     - a python-based alternative to ``make''.
41     \end{itemize}
42    
43     The following packages should be sufficient (but not necessarily minimal) for Debian 5.0 (``Lenny''):
44     python-dev, libboost1.35-dev, scons, python-numarray, g++.
45    
46    
47     These packages may be required for some of the optional capabilities of the system.
48    
49     \begin{itemize}
50     \item netcdf-3.6.2 (\url{http://www.unidata.ucar.edu/software/netcdf}) \\-
51     Used to save data sets in binary form for checkpoint/restart (must be compiled with -fPIC).
52     \item vtk-5.0.4 (\url{http://www.vtk.org}) \\-
53     This is used to save VTK files for visualization.
54     \begin{itemize}
55     \item cmake-2.4.6 (\url{http://www.cmake.org}) \\-
56     This is used to build VTK.
57     \item mesa-7.0.3 (\url{http://www.mesa3d.org})\\-
58     Free OpenGL replacement used by VTK.
59     \end{itemize}
60    
61     \item mpich2-1.0.7 (\url{http://www.mcs.anl.gov/research/projects/mpich2}) \\-
62     Parallelization with MPI.
63     \item parmetis-3.1 (\url{http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview}) \\-
64     Optimization of the stiffness matrix.
65     \item MKL (\url{http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm}) \\-
66     Intel's Math Kernel Library for use with their c compiler.
67     \end{itemize}
68    
69     The following packages might be useful for mesh generation:
70     \begin{itemize}
71     \item gmsh-2.2.0 (\url{http://www.geuz.org/gmsh}) \\-
72     Mesh generation and viewing.
73     \begin{itemize}
74     \item fltk-1.1.9 (\url{http://www.fltk.org}) \\-
75     This is used to build gmsh
76     \item gsl-1.10 (\url{http://www.gnu.org/software/gsl}) \\-
77     This is used to build gmsh
78     \end{itemize}
79    
80     \item triangle-1.6 (\url{http://www.cs.cmu.edu/~quake/triangle.html})
81     \end{itemize}
82    
83     Packages for visualization:
84     \begin{itemize}
85     \item mayavi-1.5 (\url{http://mayavi.sourceforge.net}) \\-
86     MayaVi is referenced in our User Guide for viewing VTK files.
87     \item visit-1.9 (\url{https://wci.llnl.gov/codes/visit/})
88     \end{itemize}
89    
90     \section{Compilation}
91     Throughout this section we will assume that the source code is uncompressed in a directory called trunk.
92     You can call the directory anything you like, provided that you make the change before you compile.
93    
94     You need to indicate where to find the external dependencies.
95     Unless specified otherwise, all paths will be relative to the top level of the source.
96     To do this, create a file in the \filename{scons} directory called \filename{x_options.py} where ``x'' is the name of your computer.
97     As a starting point use one of the following:
98     \begin{itemize}
99     \item \filename{scons/linux_options_example.py} (\linux desktop)
100     \item \filename{scons/mac_options_example.py} (\macosx desktop)
101     \item \filename{ice_options_example.py} (SGI ICE 8200)
102     \item \filename{winxp_options_example.py} (\winxp)
103     \end{itemize}
104    
105     To actually compile (if you have $n$ processors, then you can use \texttt{scons -j$n$} instead):
106    
107     \begin{shellCode}
108     cd trunk
109     scons
110     \end{shellCode}
111    
112     As part of its output, scons will tell you the name of the options file it used as well as a list of features
113     and whether they are enabled for your build.
114    
115     If you require debug versions of the libraries, use:
116     \begin{shellCode}
117     scons usedebug=yes
118     \end{shellCode}
119     A note about scons: if you recompile later with different options (eg leaving off usedebug), scons will revert
120     to its default values. If you wish to make a change more permanent, then modify your options file.
121    
122    
123     You can install the binaries/libraries in a different location with:
124     \begin{shellCode}
125     scons prefix=some_dir
126     \end{shellCode}
127    
128     You can test your build using
129     \begin{shellCode}
130     scons all_tests
131     \end{shellCode}
132     An alternative method is available for performing tests on \openmp and MPI builds.
133    
134     \subsection{Compilation with \openmp}
135     You will need to consult your compiler documentation for the precise switches to use to enable OpenMP features.
136     Once you know the options, modify the omp_optim, omp_debug and omp_libs variables in your options.py file.
137    
138     For example, for gcc compilers which support \openmp use.
139     \begin{shellCode}
140     omp_optim = '-fopenmp'
141     omp_debug = '-fopenmp'
142     omp_libs = ['gomp']
143     \end{shellCode}
144     Depending on your version, last change may not be required.
145    
146     Then recompile.
147     \begin{shellCode}
148     scons useopenmp=yes
149     \end{shellCode}
150    
151     \subsection{Compilation with MPI}
152     You will need to have MPI installed on your system.
153     There are a number of implementations so we do not provide any specific advice here.
154     You will need to modify the following variables in your options file.
155     \begin{itemize}
156     \item \texttt{mpi_path} \\
157     where to find \filename{mpi.h}
158     \item \texttt{mpi_lib_path} \\
159     where to find libraries for mpi
160     \item \texttt{mpi_libs} \\
161     which libraries to link to.
162     \end{itemize}
163    
164 jfenwick 2290 Then compile with:
165     \begin{shellCode}
166     scons usempi=yes
167     \end{shellCode}
168    
169     As with debug and openmp, you can make this a more permanent setting by modifying your options file.
170    
171 jfenwick 2289 \subsection{Difficulties}
172    
173     %This is copied from Ken's notes on teh old Twiki page
174     \subsubsection{``Bad magic number''}
175     Some reasons for this error message include:
176     \begin{itemize}
177     \item Using different versions of python when installing and running escript (Use \texttt{which python} and \texttt{python --version} to check)
178     \item Using different versions of libraries (Make sure \texttt{LD_LIBRARY_PATH} has \filename{/trunk/lib} listed first)
179     \item Using different versions of python modules (Make sure \texttt{PYTHONPATH} has \filename{/trunk/escript} directory listed first)
180     \end{itemize}
181    
182     Another error we sometimes see is unsatisfied externals when trying to run a python script. This is usually due to not having \texttt{LD_LIBRARY_PATH} and \texttt{PYTHONPATH} set correctly so that you run with different libraries from the ones the code was compiled against. Check which libraries you are running against with \texttt{ldd lib/libfinley.so} and \texttt{ldd esys/finley/finleycpp.so}.
183    
184     It is also possible that the person who compiled \esfinley used incompatible libraries. For example, if you run with Python2.4 but the software was compiled against Python2.5 then you will get unsatisfied externals or a large error message with a long traceback. Another case is when Boost or Numarray was compiled against the wrong Python library. To avoid these problems everyone (builder and user) must make certain they are using the same python libraries.

  ViewVC Help
Powered by ViewVC 1.1.26