FIX: Remove undistributable CHEMKIN files
[freefoam.git] / INSTALL
blobd3cce22aae396b0d01d09fcdefa37ba785b0a9c5
1 {project} Installation Instructions for Version {fullver}
2 =========================================================
3 Michael Wild <themiwi@users.sourceforge.net>
4 :Author Initials: MW
5 v{fullver}, {localdate}
6 {homepage}
8 :apidoc: {homepage}/doc/v{fullver}/API
9 :asciidoc: http://www.methods.co.nz/asciidoc[Asciidoc]
10 :bash: http://www.gnu.org/software/bash/[BASH]
11 :cd-adapco: http://www.cd-adapco.com[CD-adapco]
12 :cmake: http://cmake.org
13 :dblatex: http://dblatex.sourceforge.net[dblatex]
14 :debian: http://debian.org[Debian]
15 :dvipng: http://sourceforge.net/projects/dvipng[dvipng]
16 :emacs: http://www.gnu.org/software/emacs[Emacs]
17 :fop: http://xmlgraphics.apache.org/fop[Apache FOP]
18 :latex: http://www.latex-project.org[LaTeX]
19 :libccmio: http://freefoam.sf.net/nonfree/libccmio-2.6.1.tar.gz
20 :linuxcommand: http://linuxcommand.org
21 :mathjax: http://www.mathjax.org[MathJax]
22 :metis: http://freefoam.sf.net/nonfree/metis-5.0.1.tar.gz
23 :mgridgen: http://freefoam.sf.net/nonfree/ParMGridGen-1.0.tar.gz
24 :parmetis: http://freefoam.sf.net/nonfree/ParMetis-3.1.tar.gz
25 :scotch: http://sourceforge.net/projects/freefoam/files/ThirdParty/scotch/scotch_5.1.7.dfsg.orig.tar.gz
26 :tarball: http://sourceforge.net/projects/freefoam/files/FreeFOAM/{fullver}/freefoam-{fullver}.tar.bz2/download
27 :zlib: http://sourceforge.net/projects/freefoam/files/ThirdParty/zlib/zlib-1.2.5.tar.gz
28 :zsh: http://www.zsh.org/[ZSH]
30 Obtaining the Prerequisites
31 ---------------------------
32 Some of the libraries {project} requires (or optionally can use) are often not
33 readily available as an installable package and are quite tricky to install
34 manually. {project} can automatically download and build these libraries for
35 you, refer to below instructions. However, if you are behind a firewall or
36 CMake is unable to download a source package, you can do so manually and place
37 the files in the 'ThirdParty' directory in the {project} source tree. When you
38 run CMake, it will detect the presence of the files and not try to download
39 them.
41 You can obtain the source packages from the following URLs:
43 'libccmio'::
44   {libccmio}
45 'METIS'::
46   {metis}
47 'MGRIDGEN'::
48   {mgridgen}
49 'ParMetis'::
50   {parmetis}
51 'scotch'::
52   {scotch}
53 'zlib'::
54   {zlib}
56 On a Ubuntu or Debian installation you can install the prerequisites as follows
58 ---------------------------------------------------------------------------
59 $ apt-get install cmake-curses-gui build-essential flex bison zlib1g-dev \
60     python paraview m4 libreadline-dev
61 ---------------------------------------------------------------------------
63 Note that Debian Squeeze (the stable version at the time of this writing) and
64 Ubuntu 10.10 (Maverick Meerkat) contain too old versions of CMake. However, it
65 is very easy to download a binary distribution of CMake from {cmake} and use it
66 directly, no special installation required. Newer versions of these operating
67 systems contain more up-to-date versions of CMake.
69 The optional 'ParMetis' graph partitioning library and the
70 parallel-communications library can be installed with
72 ---------------------------------------------------------------------------
73 $ apt-get install libparmetis-dev mpi-default-dev mpi-default-bin
74 ---------------------------------------------------------------------------
76 Make sure that you have the 'multiverse' (Ubuntu) or 'non-free' (Debian)
77 repositories enabled if you want to install the 'libparmetis-dev' package.
79 The dependencies for the generation of the documentation can be installed with
81 ---------------------------------------------------------------------------
82 $ apt-get install asciidoc docbook-xsl libxml2-utils asymptote graphviz \
83     doxygen dblatex texlive-latex-extra texlive-fonts-recommended
84 ---------------------------------------------------------------------------
86 [[installation]]
87 Building {project}
88 ------------------
89 - Install the prerequisites documented in the link:README.html[README] file. If
90   your distribution does not have 'zlib', 'METIS', 'ParMetis', 'MGRIDGEN' or
91   'libccmio' be not worried, {project} can handle those for you.
92 - Download the {project} source and unpack it somewhere convenient. For the
93   further instructions we will use +$HOME/Source/+.
95 ---------------------------------------------------------------------------
96 $ mkdir -p $HOME/Source
97 $ cd $HOME/Source
98 $ wget -O freefoam-{fullver}.tar.bz2 {tarball}
99 $ tar xjf freefoam-{fullver}.tar.bz2
100 ---------------------------------------------------------------------------
101 - Create a build tree and _cd_ into it:
103 ---------------
104 $ mkdir $HOME/Source/freefoam-{fullver}-build
105 $ cd $HOME/Source/freefoam-{fullver}-build
106 ---------------
107 - Start the CMake-configuration:
109 ---------------
110 $ ccmake $HOME/Source/freefoam-{fullver}
111 ---------------
112 - Press the +c+ key. Use the arrow keys to navigate up and down and press
113   +enter+ to edit a field. To commit the change, press +enter+ again, or +ESC+
114   to abandon the change. ON/OFF fields are toggled by pressing +enter+.
115   Advanced options can be displayed by hitting the +t+ key.
116   * Set +CMAKE_BUILD_TYPE+ to 'Release' for an optimized build.
117   * If CMake complains that it can't find MPI, and you don't want to install
118     it, disable +FOAM_USE_MPI+.
119   * Select the default Pstream implementation by setting +FOAM_DEFAULT_PSTREAM+
120     to one of 'dummy' or 'mpi'. This setting will only influence the contents
121     of the <<globalconfig,global 'controlDict' file>>.
122   * If you want to use the 'metis' and 'parmetis' decomposition methods, make
123     sure that +FOAM_ENABLE_METIS+ and +FOAM_ENABLE_PARMETIS+ are enabled,
124     respectively. If you do not have 'METIS' or 'ParMetis' installed, enable
125     +FOAM_BUILD_PRIVATE_METIS+ or +FOAM_BUILD_PRIVATE_PARMETIS+, respectively.
126     CMake will then try to download and build the selected libraries for you.
127     Conversely, if one of the libraries is provided by your system, you can
128     turn the respective setting to 'OFF'. Please note that if your system
129     provides only 'ParMetis', you do not have to install 'METIS', as the former
130     also contains 'METIS' in an older version.
131   * If you want to use the 'MGridGen' agglomeration method for the GAMG solver,
132     you need to enable +FOAM_ENABLE_MGRIDGEN+ and if the library is not
133     installed on your system ensure that +FOAM_BUILD_PRIVATE_MGRIDGEN+ is
134     enabled. See <<enable-mgridgen,above>> regarding the unknown license status
135     of this package.
136   * In order to build 'ccm26ToFoam', a conversion utility for grids generated
137     with 'ProStar/ccm' (C) version 2.6, enable the setting
138     +FOAM_ENABLE_CCMIO+ and if 'libccmio' is not installed on your system,
139     also +FOAM_BUILD_PRIVATE_CCMIO+. Refer to the <<enable-ccmio,above>>
140     description of the 'libccmio' package for the license restrictions which
141     apply to this package. If you decide to build a private version, please
142     read the description of <<private-ccmio,+FOAM_BUILD_PRIVATE_CCMIO>>
143     carefully.
144   * If you plan on installing {project}, set +CMAKE_INSTALL_PREFIX+ to the base
145     directory under which {project} should reside.
146   * For more fine-grained control over what gets installed where, adjust
147     +FOAM_INSTALL_<XXX>_PATH+, where +<XXX>+ is one of +BIN+, +CMAKE+,
148     +CONFIG+, +DATA+, +DOC+, +FRAMEWORK+, +HEADER+, +LIBEXEC+, +LIBRARY+,
149     +MAN+, +PLUGIN+, +PYTHON+, +TUTORIALS+ and +USERDFOAM+. Refer to the
150     glossary for the detailed meaning of each of these variables. Paths
151     not starting with a slash ('/') will be relative to +CMAKE_INSTALL_PREFIX+.
152     If you include a leading slash, the paths are absolute.
153   * If you want {project} to use 'float' as the floating point type instead of
154     'double', change +FOAM_DOUBLE_PRECISION+ to 'OFF'.
155 - Hit +c+ again. You shouldn't get any errors anymore now. Keep pressing +c+
156   until ccmake displays "++Press [g] to generate and exit++" in the legend at
157   the bottom of the interface.
158 - Press +g+ to generate the Makefiles and exit the ccmake interface.
159 - Start the native build tool. If you used the 'Makefile' generator
160   (which is the default for Unix-platforms), type
162 ----------------
163 $ make
164 ----------------
165 - If you have a multi-core/processor machine, you can speed things up
166   significantly by telling Make to run independent jobs in parallel.
167   A good choice for the number of parallel jobs to run is the
168   number of CPU's/cores you have in your machine plus 1 (to compensate
169   for disk-latency). For a typical dual-core machine, run
171 ----------------
172 $ make -j3
173 ----------------
175 Installing {project}
176 --------------------
177 If you want to, you can now install {project}. Depending on the
178 +CMAKE_INSTALL_PREFIX+ and the individual +FOAM_INSTALL_<XXX>_PATH+ it is
179 possible that you have to do this as root, i.e. use +su -c+ or +sudo+.
180 ---------------
181 $ make install
182 ---------------
184 Using {project}
185 ---------------
186 If you didn't change +CMAKE_INSTALL_PREFIX+ and +FOAM_INSTALL_BIN_PATH+ chances
187 are that you can start using {project} right after you installed it without any
188 further steps being necessary.
190 [[globalconfig]]
191 Global Configuration Files
192 ~~~~~~~~~~~~~~~~~~~~~~~~~~
193 Unfortunately the OpenFOAM library (on which {project} builds) and some
194 applications require some files to be present for start-up. It finds those
195 in the following places (in the specified order, picking the first hit):
197 1. Under the directory specified in the +$FREEFOAM_CONFIG_DIR+ environment
198    variable
199 2. In '$HOME/.{project}/{shortver}'
200 3. In '$HOME/.{project}'
201 4. In the installation directory of the configuration files. There are
202    two possible places for this:
204    '<CMAKE_INSTALL_PREFIX>/<FOAM_INSTALL_CONFIG_PATH>':: if you specified
205      +<FOAM_INSTALL_CONFIG_PATH>+ as a relative path.
206    '<FOAM_INSTALL_CONFIG_PATH>':: if you specified +<FOAM_INSTALL_CONFIG_PATH>+
207      as an absolute path.
209 The default location is '/usr/local/etc/{project}-{ver}'.
211 Selecting the Parallel Communications Library
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213 Both, {project} and OpenFOAM abstract the parallel operations into the
214 'Pstream' library, making it rather simple to firstly switch between parallel
215 implementations and secondly port the software to a new communications library.
216 However, {project} uses a much more flexible mechanism of determining which
217 'Pstream' implementation library to use than OpenFOAM. The latter does this by
218 adjusting the +LD_LIBRARY_PATH+ environment variable. As {project} wants to be
219 a well behaved Linux citizen, this is not an option. Instead, {project}
220 dynamically loads the desired 'Pstream' library at startup (i.e. as a plug-in).
221 The following list details how {project} determines what library to load (if at
222 all):
224 1. If the environment variable +FREEFOAM_PSTREAM_LIBRARY+ is set,
225    {project} will try to load the library specified by it.
226 2. If the sub-dictionary +PstreamImplementation+ exists in the global
227    'controlDict' file (see <<globalconfig,'Global Configuration Files'>>), it
228    reads the value of the entry +configName+ therein. It then expects that a
229    sub-dictionary of +PstreamImplementation+ with the name specified in
230    +configName+ exists. If that sub-dictionary contains the entry +library+, it
231    will try to load a library specified by the value of that entry.
233 After {project} (possibly) loaded the library, it will try to instantiate
234 concrete implementations of the abstract base classes +PstreamImpl+,
235 +IPstreamImpl+ and +OPstreamImpl+. Which classes are to be instantiated
236 is determined as follows:
238 1. {project} queries the environment variables +FREEFOAM_PSTREAM_CLASS+,
239    +FREEFOAM_IPSTREAM_CLASS+ and +FREEFOAM_OPSTREAM_CLASS+ for the class
240    names to be instantiated.
241 2. For any of the variables not set, it requires the sub-dictionary
242    +PstreamImplementation+ to be present in the global 'controlDict', reads the
243    value of +configName+ and similarly to the library loading, loads the
244    sub-dictionary specified by that value. It then expects to find the entries
245    +Pstream+, +IPstream+ and +OPstream+ which specify the names of the classes
246    to load.
248 This means that one can create a global 'controlDict' file containing
249 (among other things) something like the following:
250 =========
251 ---------
252 PstreamImplementation
254     //configName dummy;
255     configName mpi;
257     dummy
258     {
259         library libdummyPstream.so;
260         Pstream dummyPstreamImpl;
261         OPstream dummyOPstreamImpl;
262         IPstream dummyIPstreamImpl;
263     }
265     mpi
266     {
267         library libmpiPstream.so;
268         Pstream mpiPstreamImpl;
269         OPstream mpiOPstreamImpl;
270         IPstream mpiIPstreamImpl;
271     }
273 ---------
274 =========
276 This way the administrator can provide a global 'controlDict' in the {project}
277 installation. Every user can then override that 'controlDict' by supplying her
278 own file in her home directory as detailed in <<globalconfig,'Global
279 Configuration Files'>>. In order to select a particular 'Pstream'
280 implementation for a specific communications library, the user can then either
281 adjust the +PstreamImplementation::configName+ entry in the global
282 'controlDict' file, set the +FREEFOAM_PSTREAM_CONFIG+ variable or for full
283 control, set the variables +FREEFOAM_PSTREAM_LIBRARY+,
284 +FREEFOAM_PSTREAM_CLASS+, +FREEFOAM_IPSTREAM_CLASS+ and
285 +FREEFOAM_OPSTREAM_CLASS+.
287 Running {project} From the Build Tree
288 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289 You can use {project} without installing it first, directly from the build
290 tree. However, this might take a little bit more effort to set up because most
291 likely you will have to adjust the following environment variables:
293 `PATH`::
294   Must contain '$HOME/Source/freefoam-{fullver}-build/bin'
295 `LD_LIBRARY_PATH`::
296   Must contain '$HOME/Source/freefoam-{fullver}-build/lib/{project}-{ver}'
297 `FREEFOAM_CONFIG_DIR`::
298  Should point to '$HOME/Source/freefoam-{fullver}-build/etc'
300 Where it is assumed that you followed the <<installation,installation
301 instructions>>. If you used different paths for downloading and compiling
302 {project}, you will have to adjust these names. Refer to
303 <<environment,'Extending Search Paths And Setting Environment Variables
304 Permanently'>> if you need help setting these variables.
306 Running the tutorials
307 ---------------------
308 Now you should be able to run the tutorial cases. For this copy the +tutorials+
309 directory to some convenient place:
310 ---------------
311 $ mkdir -p $HOME/{project}/$LOGNAME-{shortver}/run
312 $ cp -r $HOME/Source/freefoam-{fullver}-build/tutorials \
313   $HOME/{project}/$LOGNAME-{shortver}/run/
314 $ cd $HOME/{project}/$LOGNAME-{shortver}/run/tutorials
315 ---------------
316 And try to run e.g. the 'cavity' tutorial case:
317 ---------------
318 $ cd incompressible/icoFoam
319 $ freefoam blockMesh -case cavity
320 $ freefoam checkMesh -case cavity
321 $ freefoam ico -case cavity
322 ---------------
323 Things should run smoothly and finish without an error.
325 All the tutorials contain a script for automatic execution since some of the
326 cases are quite intricate and it is not obvious how to run them. Also, these
327 scripts are used for automated testing. The scripts are called 'Allrun', where
328 the one located in the 'tutorials' directory is a driver script to run all the
329 other tutorials.
331 Obtaining the Source Code from the GIT repository
332 -------------------------------------------------
333 - Clone the {project} repository (here the clone is placed in
334   +$HOME/Source/{project}+):
336 ---------------------------------------------------------------------------
337 $ mkdir -p $HOME/Source
338 $ git clone git://repo.or.cz/freefoam.git $HOME/Source/{project}
339 ---------------------------------------------------------------------------
340 - Proceed in the same way (replacing the path names appropriately) as in the
341   above build instructions.
343 Shell completion scripts
344 ------------------------
345 {project} comes with completions scripts for the {bash} and {zsh} shells. The
346 former is quite simplistic and only offers very basic completion of the
347 available application names. The ZSH completion, however, is quite complete and
348 also completes options and arguments for all applications. These completion
349 functions are not installed by +make install+, because no two systems have the
350 same locations for these kinds of scripts. You find them for manual
351 installation in the {project} sources in the directory
352 'data/shellFunctions/bashCompletion' and 'data/shellFunctions/zshCompletion'
353 respectively. Please refer to the documentation of your system/shell on where
354 to place them.
356 Emacs mode
357 ----------
358 {project} includes a rudimentary major mode for the {emacs} programming editor.
359 If you want to use this mode, place the file
360 'data/editor-modes/foamdict-mode.el' in a directory where your Emacs
361 installation finds it. Please refer to the Emacs documentation for further
362 instructions.
364 Build Configuration Reference
365 -----------------------------
366 All installation paths below, if not absolute, are relative to
367 'CMAKE_INSTALL_PREFIX'.
369 ///////////////////////////
370 KEEP ALPHABETICALLY SORTED!
371 ///////////////////////////
373 [glossary]
374 +CMAKE_BUILD_TYPE+::
375   One of '<empty>', 'Debug', 'Release', 'RelWithDebInfo' and 'MinSizeRel'.
376   Refer to the CMake documentation for more detail.
377 +CMAKE_INSTALL_PREFIX+::
378   Installation prefix under which to install {project}.
379 +FOAM_DOUBLE_PRECISION+::
380   If set to 'ON' {project} will be compiled using 'double' as the
381   floating point type. If set to 'OFF' it will use 'float'.
382 +FOAM_BUILD_FRAMEWORKS+::
383   If this is enabled, the libraries are built as frameworks. Only available on
384   Mac OS X.
385 +FOAM_BUILD_PRIVATE_CCMIO+::
386   [[private-ccmio]]
387   Automatically download and build libccmio. Unfortunately this process may
388   fail in the download step if CMake cannot find either 'wget' or 'curl' on
389   your system, since CMake itself currently does not support 'https' URLs. If
390   this happens, the build process will abort. To fix the issue, Download the
391   file {libccmio} manually and place it in +ThirdParty/ccmio/src+ (relative to
392   the build directory). It is important that you re-run CMake *before*
393   restarting the build in order to notify the build system that the file is now
394   there.
395 +FOAM_BUILD_PRIVATE_METIS+::
396   Automatically download and build 'METIS'.
397 +FOAM_BUILD_PRIVATE_MGRIDGEN+::
398   Automatically download and build 'MGRIDGEN'.
399 +FOAM_BUILD_PRIVATE_PARMETIS+::
400   Automatically download and build 'ParMetis'.
401 +FOAM_BUILD_PRIVATE_SCOTCH+::
402   [[private-scotch]]
403   Automatically download and build 'SCOTCH'.
404 +FOAM_BUILD_PRIVATE_ZLIB+::
405   Automatically download and build the 'ZLIB' compression library.
406 +FOAM_DEFAULT_PSTREAM+::
407   The default Pstream selection in the global 'controlDict' file.
408 +FOAM_DOXYDOCS_FOR_SF+::
409   This setting is for the maintainers of the {project} and indicates whether
410   the Doxygen documentation should be built for deployment on {homepage}
411 [[enable-ccmio]]
412 +FOAM_ENABLE_CCMIO+::
413   Enable the use of 'libccmio'. This is required to build the grid conversion
414   utility 'ccm26ToFoam'.
416 [WARNING]
417 The license of 'libccmio' (C) is proprietary and requires the consent of the
418 copyright holders ({cd-adapco}) to download and use the
419 library. Further it is not allowed to redistribute it in any form. The request
420 for permission of inclusion with {debian} was answered as
421 follows by mailto:geoffrey.prewett@us.cd-adapco.com[Geoffrey Prewett]:
423 -------------------------------------------------------------------------------
424 Gerber,
426 Sorry for the delay in response.  I checked back with our development director,
427 and he felt that it would be best to not include libccmio with Debian.
428 Instead, we would prefer to continue our current policy and keep it on our
429 web/FTP and have people ask for it.  There are three reasons for this:
431 1) We don't support STAR on Debian, and don't want to give the impression that
432    we do.
433 2) We would like to keep a list of people that we give the library to.
434 3) This is not a general purpose library;  its sole purpose is to communicate
435 between our products.  Accepting outside changes risks committing a change that
436 would break our own software in possibly subtle ways.
438 So I regret to tell you that my company has declined to permit libccmio to be
439 distributed as part of Debian.
441 Regards,
442 Geoff Prewett
443 -------------------------------------------------------------------------------
445 +FOAM_ENABLE_DOXYGEN_DOCS+::
446   Enable building of the 'Doxygen API documentation'. The documentation will
447   only be built once and is not updated automatically. This is because it
448   depends on a huge number of files and would make dependency tracking very
449   slow and difficult to maintain. To force the re-generation of the API
450   documentation execute +make apidoc+.
451 +FOAM_ENABLE_METIS+::
452   Enable the use of the 'METIS' graph partitioning library which is required to
453   implement the 'metis' decomposition method.
454 [[enable-mgridgen]]
455 +FOAM_ENABLE_MGRIDGEN+::
456   Enable the use of 'MGRIDGEN' which is required to build
457   'MGridGenGamgAgglomeration' providing the 'MGridGen' agglomeration method for
458   the GAMG solver.
460 [WARNING]
461 The license of 'MGRIDGEN' is unknown and the upstream authors so far have not
462 answered any inquiries to resolve the issue. If you enable the use of
463 'MGRIDGEN' you alone are responsible for ensuring that you don't violate any
464 license conditions applying to these libraries. The authors of {project} will
465 and cannot take any responsibility for your actions.
467 +FOAM_ENABLE_MANPAGE_HELP+::
468   [[foam_enable_manpage_help]]
469   Build (and install) the help-pages in manpage format. This requires a
470   complete {asciidoc} toolchain to be present.
471 +FOAM_ENABLE_MATHJAX+::
472   When 'FOAM_ENABLE_XHTML_GUIDES' is enabled, use {mathjax} for the math
473   rendering.
474 +FOAM_ENABLE_PARMETIS+::
475   Enable the use of the 'ParMetis' graph partitioning library which is required
476   to implement the 'parMetis' decomposition method.
477 +FOAM_ENABLE_PDF_GUIDES+::
478   Build a PDF version of the user guide. In addition to a complete {asciidoc}
479   toolchain, this requires either {dblatex} (for better results) or {fop} to be
480   installed. If FOP is used, {latex} and {dvipng} are required.
481 +FOAM_ENABLE_XHTML_GUIDES+::
482   Build a XHTML version of the user guide. This requires a complete {asciidoc}
483   toolchain. If +FOAM_ENABLE_MATHJAX+ is disabled, this also requires {latex}
484   and {dvipng} to be available.
485 +FOAM_ENABLE_XHTML_HELP+::
486   Build (and install) the help-pages in XHTML format for the display in a web
487   browser. The requirements are the same as for
488   <<foam_enable_manpage_help,+FOAM_ENABLE_MANPAGE_HELP+>>.
489 +FOAM_EXE_PREFIX+::
490   Prefix used to mangle application names. Normally this shouldn't be changed.
491 +FOAM_ENABLE_FULL_TUTORIAL_TESTS+::
492   Run the full tutorials as tests, don't limit their run-time to a single time
493   step.
494 +FOAM_INSTALL_BIN_PATH+::
495   Installation path of the binaries.
496 +FOAM_INSTALL_CMAKE_PATH+::
497   Installation path of the CMake development files.
498 +FOAM_INSTALL_CONFIG_PATH+::
499   Installation path of the configuration files.
500 +FOAM_INSTALL_DATA_PATH+::
501   Installation path of the architecture-independent files.
502 +FOAM_INSTALL_DOC_PATH+::
503   Installation path of the documentation files.
504 +FOAM_INSTALL_FRAMEWORK_PATH+::
505   Installation path of the Mac OS X frameworks. This is only available and
506   takes effect if {project} is compiled on Mac OS X, and if
507   'FOAM_BUILD_FRAMEWORKS' is enabled.
508 +FOAM_INSTALL_HEADER_PATH+::
509   Installation path of the header files. On Mac OS X, and if
510   'FOAM_BUILD_FRAMEWORKS' is enabled, this setting is ignored.
511 +FOAM_INSTALL_LIBEXEC_PATH+::
512   Installation path of the binaries which should not be on the +PATH+.
513 +FOAM_INSTALL_LIBRARY_PATH+::
514   Installation path of the libraries.
515 +FOAM_INSTALL_MAN_PATH+::
516   Installation path of the manpage files.
517 +FOAM_INSTALL_PLUGIN_PATH+::
518   Installation base-path of plugins.
519 +FOAM_INSTALL_PYTHON_PATH+::
520   Installation path for Python modules.
521 +FOAM_INSTALL_USERDFOAM_PATH+::
522   Installation path of the Ensight plug-in.
523 +FOAM_INSTALL_TUTORIALS_PATH+::
524   Installation path of the tutorials.
525 +FOAM_USE_FOP+::
526   Use {fop} instead of {dblatex} when building the PDF of the user guide.
527 +FOAM_USE_MPI+::
528   If enabled, {project} will use the MPI parallel communications library.
529   This is required in order to build some of the libraries and utilities.
530 +FOAM_USE_LOCAL_DOXYGEN_DOCS+::
531   This setting influences the location in which the Doxygen source
532   code documentation is looked for if any of the {project} applications
533   is invoked with the '-doc' or '-srcDoc' options. If it is disabled,
534   the documentation will be loaded over the network from
535   {apidoc}. If you enable it, the
536   documentation will be loaded locally. This requires that you either
537   build and install the documentation by enabling +FOAM_ENABLE_DOXYGEN_DOCS+,
538   or provide the required HTML files otherwise.
539 +HTML_DOC_BROWSER+::
540   This is the program used to display the Doxygen source code documentation
541   if any of the {project} applications is invoked with the '-doc' or '-srcDoc'
542   options. The special value of 'ECHO' changes the behaviour to just write
543   the location of the HTML file to the output. This is a good setting if
544   you're system doesn't have any kind of HTML browser installed (such
545   as on a cluster).
546 +FOAM_HTML_DOC_BROWSER_COMMAND+::
547   This is the command with which to invoke the HTML browser. By default
548   it calls the program named in +HTML_DOC_BROWSER+ and passes it the
549   name/URL of the documentation file to be displayed. You shouldn't
550   have to change this unless your HTML browser requires some unusual
551   options or arguments.
553 Troubleshooting
554 ---------------
556 The {project} Executables Are Not Found By The Shell
557 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
558 There are three possible reasons for this:
560 1. Your shell (notably 'csh', 'tcsh' and 'zsh') requires you to refresh the
561    cache of available executables. You can do so by entering the command:
563 --------------
564 $ rehash
565 --------------
567 2. If 'rehashing' didn't solve the problem, the problem most likely is that you
568    installed {project} into a non-standard location by changing the
569    configuration variables +CMAKE_INSTALL_PREFIX+ or +FOAM_INSTALL_BIN_PATH+ in
570    which case the executables where installed into a directory not searched by
571    the shell. In this case you have to add the installation directory of the
572    executables to the +PATH+ variable. There are two possible locations:
575 '<CMAKE_INSTALL_PREFIX>/<FOAM_INSTALL_BIN_PATH>':: if you specified
576   +FOAM_INSTALL_BIN_PATH+ as a relative path
577 '<FOAM_INSTALL_BIN_PATH>':: if you specified +FOAM_INSTALL_BIN_PATH+ as an
578   absolute path
581 After extending the +PATH+ variable with the installation directory of the
582 executables, you should be able to run all {project} applications as any other
583 binary available on the system. See <<environment,'Extending Search Paths And
584 Setting Environment Variables Permanently'>> for
585 instructions on how to extend the search path.
587 3. This option is similar to the previous solution and applies if you want to
588    run {project} from the build tree (i.e. without running +make install+). In
589    this case you again have to make sure that your shell finds the executables
590    built by CMake by extending the +PATH+ variable. Further, you have to tell
591    {project} where to find the global configuration files (see
592    <<globalconfig,'Global Configuration Files'>>). Here, you have the option to
593    place the files under your home directory or set an environment variable.
594    The former can be achieved by:
596 --------------
597 $ mkdir -p $HOME/.{project}/{shortver}
598 $ cp $HOME/Source/freefoam-{fullver}-build/etc/controlDict \
599     $HOME/.{project}/{shortver}
600 $ cp $HOME/Source/freefoam-{fullver}-build/etc/cellModels \
601     $HOME/.{project}/{shortver}
602 $ cp -r $HOME/Source/freefoam-{fullver}-build/etc/thermoData \
603     $HOME/.{project}/{shortver}
604 --------------
606 The latter (and recommended) method is to set the environment variable
607 +FREEFOAM_CONFIG_DIR+ to '$HOME/Source/freefoam-{fullver}-build/etc'. Adjust
608 the paths to match the build tree to your actual setup.
610 Starting Any {project} Application Fails Because Some Libraries Cannot Be Found
611 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
612 Although CMake should have taken care of this by using +RPATH+ on Linux and
613 +install_name+ on Mac OS X, it might be necessary on some systems to adjust the
614 library search paths:
616 +LD_LIBRARY_PATH+:: This variable is used by all Unix like systems (e.g. Linux,
617   Mac OS X, etc.)
618 +DYLD_LIBRARY_PATH+:: This variable is used by Mac OS X.
620 If you installed {project}, there are (as with the executables), two possible
621 installation directories:
623 '<CMAKE_INSTALL_PREFIX>/<FOAM_INSTALL_LIBRARY_PATH>':: if you specified
624   +FOAM_INSTALL_LIBRARY_PATH+ as a relative path.
625 '<FOAM_INSTALL_LIBRARY_PATH>':: if you specified +FOAM_INSTALL_LIBRARY_PATH+ as
626   an absolute path.
628 If you are trying to run from the build tree, you have to include
629 '$HOME/Source/freefoam-{fullver}-build/lib/{project}-{ver}' in the above
630 mentioned search paths (where you have to adjust the location of the build tree
631 to your actual setup).
633 A Running {project} Application Aborts Because It Can't 'dlopen' A Library
634 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
635 {project} (and OpenFOAM) often dynamically load libraries at run-time (a.k.a
636 plug-ins) to add features the user requested without requiring that the whole
637 application be recompiled. This makes it very simple to add new boundary
638 conditions, turbulence and combustion models etc. However, it also requires
639 that {project} must be able to find these libraries at run-time. The operating
640 system function which does the loading of the libraries ('dlopen') usually
641 tries to find the library with the given name in several places; namely a
642 default search path and a search path configured by one or multiple environment
643 variables such as +LD_LIBRARY_PATH+ or +DYLD_LIBRARY_PATH+ (on Mac OS X). The
644 details vary from platform to platform, so you best consult the documentation
645 of 'dlopen' for the details.
647 Additionally {project} allows you to configure a custom search path for
648 plug-ins in the <<globalconfig,global 'controlDict'>> file by listing the
649 directories to be searched in the list +LibrarySearchPaths+. By default
650 {project} is configured to search for plug-ins in the location where CMake
651 installed them.
653 If you want to add your own plug-in libraries (e.g. you want to add your own
654 boundary conditions class), you most probably will want to extend this search
655 path.
657 {project} Aborts When Trying To Instantiate a Plugin Class
658 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
659 If you get a warning message similar to the following
661  --> FOAM Warning :
662      From function dlLibraryTable::open(const dictionary& dict, const word& libsEntry, const TablePtr tablePtr)
663      in file XXX/src/OpenFOAM/db/dlLibraryTable/dlLibraryTableTemplates.C at line 68
664      library "libfieldFunctionObjects.so" did not introduce any new entries
666 (where +XXX+ is the path to the {project} source code and the actual library
667 name can be different), followed by a fatal error stating that {project} does
668 not know a class or type, e.g.
670  --> FOAM FATAL ERROR:
671  Unknown function type fieldAverage
673  Table of functionObjects is empty
676      From function functionObject::New(const word& name, const Time&, const dictionary&)
677      in file XXX/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C at line 74.
679  FOAM exiting
681 and you are absolutely sure that the named type actually exists in the library
682 mentioned in the preceding warning message, the issue is very likely that
683 {project} is loading the plugin library from a different binary tree than the
684 executable belongs to.
686 [IMPORTANT]
687 Always make sure that you never load plugins from different binary trees (where
688 the build tree and the install tree count as such). If you want to run a binary
689 from the build tree but already have a corresponding installation tree, use the
690 +FREEFOAM_CONFIG_DIR+ environment variable to point {project} to the directory
691 '<path to build tree>/etc/' containing the global 'controlDict' file in the
692 **build tree**. Otherwise the binaries are likely to be incompatible with each
693 other.
695 [[environment]]
696 Extending Search Paths And Setting Environment Variables Permanently
697 --------------------------------------------------------------------
698 The way one sets environment variables and extends the executable and library
699 search paths permanently strongly depends on the shell used. Usually one has to
700 create or change an initialization file in the users home directory. In the
701 following this will be discussed very briefly for the popular shells 'BASH' and
702 'tcsh'. However, if you need more help or want information on using the shell,
703 there is an excellent tutorial available at {linuxcommand}.
705 BASH
706 ~~~~
707 The BASH shell is the default shell for most Linux/Unix distributions. Most
708 systems configure the BASH shell such that it reads the text file
709 '$HOME/.bashrc' when starting up, so this is the place where one appends
710 customizations of the environment variables. On some systems this file is not
711 processed by default (notably Mac OS X). In this case you can use
712 '$HOME/.bash_profile'.
714 Referencing A Variable
715 ^^^^^^^^^^^^^^^^^^^^^^
716 To retrieve the value stored in a shell variable or environment variable, one
717 prefixes its name with the dollar (+$+) character.
719 Setting A Variable
720 ^^^^^^^^^^^^^^^^^^
721 The syntax for setting a variable and making it available to child-processes of
722 the shell is the following:
723 -------
724 $ export variable_name=variable_value
725 -------
726 Note that no white-space characters are allowed surrounding the +=+ sign.
728 Extending A Search Path
729 ^^^^^^^^^^^^^^^^^^^^^^^
730 The shell and other Unix system facilities use environment variables to locate
731 executables and dynamically linked libraries. These search paths consist of
732 strings naming directories in which the executables and libraries should be
733 searched for. The individual paths are separated by a colon (+:+) character. To
734 add the e.g. the directory '$HOME/bin' to the search path for executables, one
735 would do the following:
736 -------
737 $ export PATH=$PATH:$HOME/bin
738 -------
739 which appends '$HOME/bin' to the end of the +PATH+ variable.
741 TCSH
742 ~~~~
743 Some users and administrators prefer to use a 'C-Shell', such as the TCSH. Here
744 you can use e.g. the file '$HOME/.tcshrc' to customize the environment.
746 Referencing A Variable
747 ^^^^^^^^^^^^^^^^^^^^^^
748 As with the BASH, one retrieves the value stored in a shell variable or
749 environment variable by prefixing its name with the dollar (+$+) character.
750 Sometimes it is also necessary to protect the variable name by surrounding it
751 with curly braces (+{+ and +}+).
753 Setting A Variable
754 ^^^^^^^^^^^^^^^^^^
755 The syntax for setting a variable and making it available to child-processes of
756 the shell is the following:
757 -------
758 $ setenv variable_name variable_value
759 -------
761 Extending A Search Path
762 ^^^^^^^^^^^^^^^^^^^^^^^
763 The shell and other Unix system facilities use environment variables to locate
764 executables and dynamically linked libraries. These search paths consist of
765 strings naming directories in which the executables and libraries should be
766 searched for. The individual paths are separated by a colon (+:+) character. To
767 add the e.g. the directory '$HOME/bin' to the search path for executables, one
768 would do the following:
769 [subs="verbatim"]
770 -------
771 $ setenv PATH ${PATH}:${HOME}/bin
772 -------
773 which appends '$HOME/bin' to the end of the +PATH+ variable. Note that
774 'C-shells' usually require the user to type 'rehash' after changing the +PATH+
775 variable to update the cache of available programs.
777 ////////////////////////////////////////////////////////////////////
778 Process with: asciidoc -a toc -f data/asciidoc/html.conf INSTALL
780 Vim users, this is for you:
781 vim: ft=asciidoc sw=2 expandtab fenc=utf-8
782 ////////////////////////////////////////////////////////////////////