1 FreeFOAM Installation Instructions for Version {fullver}
2 ========================================================
3 Michael Wild <themiwi@users.sourceforge.net>
5 v{fullver}, {localdate}
6 http://freefoam.sourceforge.net
10 - Install the prerequisites documented in the link:README.html[README] file. If
11 your distribution does not have 'METIS', 'ParMetis', 'MGRIDGEN' or 'libccmio'
12 be not worried, FreeFOAM can handle those for you.
13 - Download the FreeFOAM source and unpack it somewhere convenient. For the
14 further instructions we will use +$HOME/Source/+.
16 ---------------------------------------------------------------------------
17 $ mkdir -p $HOME/Source
19 $ wget http://master.dl.sourceforge.net/sourceforge/freefoam/freefoam-{fullver}.tar.bz2
20 $ tar xjf freefoam-{fullver}.tar.bz2
21 ---------------------------------------------------------------------------
22 - Create a build tree and _cd_ into it:
25 $ mkdir $HOME/Source/freefoam-{fullver}-build
26 $ cd $HOME/Source/freefoam-{fullver}-build
28 - Start CMake-configuration:
31 $ ccmake $HOME/Source/freefoam-{fullver}
33 - Press the +c+ key. Use the arrow keys to navigate up and down and press
34 +enter+ to edit a field. To commit the change, press +enter+ again, or +ESC+
35 to abandon the change. ON/OFF fields are toggled by pressing +enter+.
36 Advanced options can be displayed by hitting the +t+ key.
37 * Set +CMAKE_BUILD_TYPE+ to 'Release' for an optimized build.
38 * If CMake complains that it can't find MPI, and you don't want to install it, disable
39 +FF_USE_MPI+. If, instead, you want to use GAMMA or PVM, enable +FF_USE_GAMMA+ or
40 +FF_USE_PVM+, respectively. You can also enable more than one of the options.
43 Currently only the MPI implementation is available.
45 * Select the default Pstream implementation by setting +FF_DEFAULT_PSTREAM+
46 to one of 'dummy', 'mpi', 'pvm' or 'gamma'. This setting will only influence
47 the contents of the <<globalconfig,global 'controlDict' file>>.
48 * If CMake told you it couldn't find ParaView:
49 . Set +ParaView_DIR+ to the path of the directory containing
50 'ParaViewConfig.cmake', which is most likely the ParaView build directory.
51 . If you do not want to build the ParaView plug-ins, disable
52 +FF_BUILD_PARAVIEW_PLUGINS+
53 * If you do not have 'METIS' or 'ParMetis', enable
54 +FF_BUILD_PRIVATE_METIS+ or +FF_BUILD_PRIVATE_PARMETIS+, respectively.
55 CMake will then try to download and build the selected libraries for you.
56 Conversely, if one of the libraries is provided by your system, you can turn
57 the respective setting to 'OFF'. Please note that if your system provides
58 only 'ParMetis', you do not have to install 'METIS', as the former also
59 contains 'METIS' in an older version.
60 * If you want to use the 'MGridGen' agglomeration method for the GAMG solver,
61 you need to enable +FF_ENABLE_PARMGRIDGEN+ and if the library is not
62 installed on your system ensure that +FF_BUILD_PRIVATE_PARMGRIDGEN+ is
63 enabled. See <<parmgridgen,above>> regarding the unknown license status of
65 * In order to build 'ccm26ToFoam', a conversion utility for grids generated
66 with 'ProStar/ccm' (C) version 2.6, enable the setting +FF_ENABLE_CCMIO+
67 and if 'libccmio' is not installed on your system, also
68 +FF_BUILD_PRIVATE_CCMIO+. Refer to the <<libccmio,above>> description of
69 the 'libccmio' package for the license restrictions which apply to this
71 * If you plan on installing FreeFOAM, set +CMAKE_INSTALL_PREFIX+ to the base directory
72 under which FreeFOAM should reside.
73 * For more fine-grained control over what gets installed where, adjust
74 +FF_INSTALL_CONFIG_PATH+, +FF_INSTALL_HEADER_PATH+, +FF_INSTALL_LIB_PATH+,
75 +FF_INSTALL_FRAMEWORK_PATH+, +FF_INSTALL_PV3FOAMREADER_PATH+,
76 +FF_INSTALL_PVFOAMREADER_PATH+ and +FF_INSTALL_USERDFOAM_PATH+. Paths not
77 starting with a slash ('/') will be relative to 'CMAKE_INSTALL_PREFIX'. If
78 you include a leading slash, the paths are absolute.
79 * If you want FreeFOAM to use 'float' as the floating point type instead of
80 'double', change +FF_DOUBLE_PRECISION+ to 'OFF'.
81 - Hit the +c+ key again. If you enabled +FF_BUILD_PRIVATE_CCMIO+, CMake will fail
82 to download https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz.
83 Please follow the instructions in the error message on how to work around this
84 problem, or download the file manually and place it in +ThirdParty/ccmio/+
85 (relative to the build directory). Then hit +c+ again.
86 - You shouldn't get any errors anymore now. Keep pressing +c+ until ccmake
87 displays "++Press [g] to generate and exit++" in the legend at the bottom of
89 - Press +g+ to generate the Makefiles and exit the ccmake interface.
90 - Start the native build tool. If you used the 'Makefile' generator
91 (which is the default for Unix-platforms), type
96 - If you have a multi-core/processor machine, you can speed things up
97 significantly by telling Make to run independent jobs in parallel.
98 A good choice for the number of parallel jobs to run is the
99 number of CPU's/cores you have in your machine plus 1 (to compensate
100 for disk-latency). For a typical dual-core machine, run
108 If you want to, you can now install FreeFOAM. Depending on the
109 +CMAKE_INSTALL_PREFIX+ and the individual +FF_INSTALL_*_PATH+ it is possible
110 that you have to do this as root, i.e. use +su+ or +sudo+.
117 If you didn't change +CMAKE_INSTALL_PREFIX+ and +FF_INSTALL_BIN_PATH+ chances
118 are that you can start using FreeFOAM right after you installed it without any
119 further steps being necessary.
122 Global Configuration Files
123 ~~~~~~~~~~~~~~~~~~~~~~~~~~
124 Unfortunately the OpenFOAM library (on which FreeFOAM builds) and some
125 applications require some files to be present for start-up. It finds those
126 in the following places (in the specified order, picking the first hit):
128 1. Under the directory specified in the +$FREEFOAM_CONFIG_DIR+ environment
130 2. In '$HOME/.FreeFOAM/{shortver}'
131 3. In '$HOME/.FreeFOAM'
132 4. In the installation directory of the configuration files. There are
133 two possible places for this:
135 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_CONFIG_PATH>':: if you specified
136 +<FF_INSTALL_CONFIG_PATH>+ as a relative path.
137 '<FF_INSTALL_CONFIG_PATH>':: if you specified +<FF_INSTALL_CONFIG_PATH>+ as
140 The default location is '/usr/local/etc/FreeFOAM-{ver}'.
142 Selecting the Parallel Communications Library
143 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144 Both, FreeFOAM and OpenFOAM abstract the parallel operations into the 'Pstream'
145 library, making it rather simple to firstly switch between parallel
146 implementations and secondly port the software to a new communications library.
147 However, FreeFOAM uses a much more flexible mechanism of determining which
148 'Pstream' implementation library to use than OpenFOAM. The latter does this by
149 adjusting the +LD_LIBRARY_PATH+ environment variable. As FreeFOAM wants to be a
150 well behaved Linux citizen, this is not an option. Instead, FreeFOAM dynamically
151 loads the desired 'Pstream' library at startup (i.e. as a plug-in). The
152 following list details how FreeFOAM determines what library to load (if at all):
154 1. If the environment variable +FREEFOAM_PSTREAM_LIBRARY+ is set,
155 FreeFOAM will try to load the library specified by it.
156 2. If the sub-dictionary +PstreamImplementation+ exists in the global
157 'controlDict' file (see <<globalconfig,'Global Configuration Files'>>), it
158 reads the value of the entry +configName+ therein. It then expects that a
159 sub-dictionary of +PstreamImplementation+ with the name specified in
160 +configName+ exists. If that sub-dictionary contains the entry +library+, it
161 will try to load a library specified by the value of that entry.
163 After FreeFOAM (possibly) loaded the library, it will try to instantiate
164 concrete implementations of the abstract base classes +PstreamImpl+,
165 +IPstreamImpl+ and +OPstreamImpl+. Which classes are to be instantiated
166 is determined as follows:
168 1. FreeFOAM queries the environment variables +FREEFOAM_PSTREAM_CLASS+,
169 +FREEFOAM_IPSTREAM_CLASS+ and +FREEFOAM_OPSTREAM_CLASS+ for the class
170 names to be instantiated.
171 2. For any of the variables not set, it requires the sub-dictionary
172 +PstreamImplementation+ to be present in the global 'controlDict', reads the
173 value of +configName+ and similarly to the library loading, loads the
174 sub-dictionary specified by that value. It then expects to find the entries
175 +Pstream+, +IPstream+ and +OPstream+ which specify the names of the classes
178 This means that one can create a global 'controlDict' file containing
179 (among other things) something like the following:
182 PstreamImplementation
189 library libdummyPstream.so;
190 Pstream dummyPstreamImpl;
191 OPstream dummyOPstreamImpl;
192 IPstream dummyIPstreamImpl;
197 library libmpiPstream.so;
198 Pstream mpiPstreamImpl;
199 OPstream mpiOPstreamImpl;
200 IPstream mpiIPstreamImpl;
206 This way the administrator can provide a global 'controlDict' in the FreeFOAM
207 installation. Every user can then override that 'controlDict' by supplying her
208 own file in her home directory as detailed in <<globalconfig,'Global
209 Configuration Files'>>. In order to select a particular 'Pstream' implementation
210 for a specific communications library, the user can then either adjust the
211 +PstreamImplementation::configName+ entry in the global 'controlDict' file, set
212 the +FREEFOAM_PSTREAM_CONFIG+ variable or for full control, set the variables
213 +FREEFOAM_PSTREAM_LIBRARY+, +FREEFOAM_PSTREAM_CLASS+, +FREEFOAM_IPSTREAM_CLASS+
214 and +FREEFOAM_OPSTREAM_CLASS+.
216 Running FreeFOAM From the Build Tree
217 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218 You can use FreeFOAM without installing it first, directly from the build tree.
219 However, this might take a little bit more effort to set up because most likely
220 you will have to adjust the following environment variables:
222 PATH:: Must contain '$HOME/Source/freefoam-{fullver}-build/bin'
223 LD_LIBRARY_PATH:: Must contain '$HOME/Source/freefoam-{fullver}-build/lib/FreeFOAM-{ver}'
224 FREEFOAM_CONFIG_DIR:: Should point to '$HOME/Source/freefoam-{fullver}-build/etc'
226 Where it is assumed that you followed the <<installation,installation instructions>>. If
227 you used different paths for downloading and compiling FreeFOAM, you will have
228 to adjust these names. Refer to <<environment,'Extending Search Paths And
229 Setting Environment Variables Permanently'>> if you need help setting these
232 Running the tutorials
233 ---------------------
234 Now you should be able to run the tutorial cases. For this copy the +tutorials+
235 directory to some convenient place:
237 $ mkdir -p $HOME/FreeFOAM/$LOGNAME-{shortver}/run
238 $ cp -r $HOME/Source/freefoam-{fullver}-build/tutorials $HOME/FreeFOAM/$LOGNAME-{shortver}/run/
239 $ cd $HOME/FreeFOAM/$LOGNAME-{shortver}/run/tutorials
241 And try to run e.g. the 'cavity' tutorial case:
244 $ ff_blockMesh -case cavity
245 $ ff_checkMesh -case cavity
246 $ ff_icoFoam -case cavity
248 Things should run smoothly and finish without an error.
251 The prefix 'ff_' used in above commands depends on the configuration
252 variable +EXECUTABLE_PREFIX+ and might be different from the default.
253 Adapt above invocations accordingly.
255 Obtaining the Source Code from the GIT repository
256 -------------------------------------------------
257 - Clone the FreeFOAM repository (here the clone is placed in
258 +$HOME/Source/FreeFOAM+):
260 ---------------------------------------------------------------------------
261 $ mkdir -p $HOME/Source
262 $ git clone git://repo.or.cz/freefoam.git $HOME/Source/FreeFOAM
263 ---------------------------------------------------------------------------
264 - Proceed in the same way (replacing the path names apropriately) as in the
265 above build instructions.
267 Build Configuration Reference
268 -----------------------------
271 One of '<empty>', 'Debug', 'Release', 'RelWithDebInfo' and 'MinSizeRel'.
272 Refer to the CMake documentation for more detail.
273 +FF_DOUBLE_PRECISION+::
274 If set to 'ON' FreeFOAM will be compiled using 'double' as the
275 floating point type. If set to 'OFF' it will use 'float'.
276 +FF_BUILD_FRAMEWORK+::
277 If this is enabled, the libraries are built as frameworks. Only available on Mac OS X.
278 +CMAKE_INSTALL_PREFIX+::
279 Installation prefix under which to install FreeFOAM.
280 +FF_INSTALL_BIN_PATH+::
281 Installation path of the binaries. If not absolute, it is relative to
282 'CMAKE_INSTALL_PREFIX'.
283 +FF_INSTALL_CONFIG_PATH+::
284 Installation path of the configuration files. If not absolute, it is
285 relative to 'CMAKE_INSTALL_PREFIX'.
286 +FF_INSTALL_HEADER_PATH+::
287 Installation path of the header files. If not absolute, it is
288 relative to 'CMAKE_INSTALL_PREFIX'. On Mac OS X, and if
289 'FF_BUILD_FRAMEWORK' is enabled, this setting is ignored.
290 +FF_INSTALL_LIB_PATH+::
291 Installation path of the libraries. If not absolute, it is
292 relative to 'CMAKE_INSTALL_PREFIX'.
293 +FF_INSTALL_FRAMEWORK_PATH+::
294 Installation path of the Mac OS X frameworks. If not absolute, it is
295 relative to 'CMAKE_INSTALL_PREFIX'. This is only available and takes
296 effect if FreeFOAM is compiled on Mac OS X, and if
297 'FF_BUILD_FRAMEWORK' is enabled.
298 +FF_INSTALL_PV3FOAMREADER_PATH+::
299 Installation path of the ParaView3 plug-ins. If not absolute, it is
300 relative to 'CMAKE_INSTALL_PREFIX'.
301 +FF_INSTALL_PVFOAMREADER_PATH+::
302 Installation path of the ParaView2 plug-ins. If not absolute, it is
303 relative to 'CMAKE_INSTALL_PREFIX'.
304 +FF_INSTALL_USERDFOAM_PATH+::
305 Installation path of the Ensight plug-in. If not absolute, it is
306 relative to 'CMAKE_INSTALL_PREFIX'.
307 +EXECUTABLE_PREFIX+::
308 Prefix which get prepended to the name of the executables. This defaults to
309 'ff_' and serves the disambiguation of names.
311 If enabled, FreeFOAM will use the GAMMA parallel communications library.
313 If enabled, FreeFOAM will use the MPI parallel communications library.
314 This is required in order to build some of the libraries and utilities.
316 If enabled, FreeFOAM will use the PVM parallel communications library.
317 +FF_DEFAULT_PSTREAM+::
318 The default Pstream selection in the global 'controlDict' file.
319 +FF_BUILD_PARAVIEW_PLUGINS+::
320 Whether to build the ParaView plug-ins. If enabled, FreeFOAM requires a
321 ParaView build tree and the 'ParaView_DIR' variable set to the path of it.
324 Enable the use of 'libccmio'. This is required to build the grid conversion
325 utility 'ccm26ToFoam'.
328 The license of 'libccmio' (C) is proprietary and requires the consent of the
329 copyright holders (http://www.cd-adapco.com[CD-adapco]) to download and use the
330 library. Further it is not allowed to redistribute it in any form. The request
331 for permission of inclusion with http://debian.org[Debian] was answered as
332 follows by mailto:geoffrey.prewett@us.cd-adapco.com[Geoffrey Prewett]:
334 --------------------------------------------------------------------------------
337 Sorry for the delay in response. I checked back with our development director,
338 and he felt that it would be best to not include libccmio with Debian.
339 Instead, we would prefer to continue our current policy and keep it on our
340 web/FTP and have people ask for it. There are three reasons for this:
342 1) We don't support STAR on Debian, and don't want to give the impression that we do.
343 2) We would like to keep a list of people that we give the library to.
344 3) This is not a general purpose library; its sole purpose is to communicate
345 between our products. Accepting outside changes risks committing a change that
346 would break our own software in possibly subtle ways.
348 So I regret to tell you that my company has declined to permit libccmio to be
349 distributed as part of Debian.
353 --------------------------------------------------------------------------------
355 +FF_BUILD_PRIVATE_CCMIO+::
356 Automatically download and build libccmio. Unfortunately this process will
357 fail in the download step, since CMake currently does not support 'https'
358 URLs. But you will get specific instructions from the build system on how to
359 get around this problem.
360 +FF_BUILD_PRIVATE_METIS+::
361 Automatically download and build 'METIS'.
362 +FF_BUILD_PRIVATE_PARMETIS+::
363 Automatically download and build 'ParMetis'.
364 [[enable-parmgridgen]]
365 +FF_ENABLE_PARMGRIDGEN+::
366 Enable the use of 'PARMGRIDGEN' and 'MGRIDGEN' which is required to build
367 'MGridGenGamgAgglomeration' providing the 'MGridGen' agglomeration method for
371 The license of 'MGRIDGEN' and 'PARMGRIDGEN' is unknown and the upstream authors
372 so far have not answered any inquiries to resolve the issue. If you enable the
373 use of 'MGRIDGEN' and 'PARMGRIDGEN' you alone are responsible for ensuring that
374 you don't violate any license conditions applying to these libraries. The
375 authors of FreeFOAM will and cannot take any responsibility for your
378 +FF_BUILD_PRIVATE_PARMGRIDGEN+::
379 Automatically download and build 'PARMGRIDGEN' and 'MGRIDGEN'.
380 +FF_BUILD_DOXYGEN_DOCS+::
381 Enable building of the 'Doxygen API documentation'. The documentation will
382 only be built once and is not updated automatically. This is because it
383 depends on a huge number of files and would make dependency tracking very
384 slow and difficult to maintain. To force the re-generation of the API
385 documentation execute +make apidoc+.
386 +FF_USE_LOCAL_DOXYGEN_DOCS+::
387 This setting influences the location in which the Doxygen source
388 code documentation is looked for if any of the FreeFOAM applications
389 is invoked with the '-doc' or '-srcDoc' options. If it is disabled,
390 the documentation will be loaded over the network from
391 http://freefoam.sf.net/doc/Doxygen/html. If you enable it, the
392 documentation will be loaded locally. This requires that you either
393 build and install the documentation by enabling +FF_BUILD_DOXYGEN_DOCS+,
394 or provide the required HTML files otherwise.
396 This is the program used to display the Doxygen source code documentation
397 if any of the FreeFOAM applications is invoked with the '-doc' or '-srcDoc'
398 options. The special value of 'ECHO' changes the behaviour to just write
399 the location of the HTML file to the output. This is a good setting if
400 you're system doesn't have any kind of HTML browser installed (such
402 +FF_HTML_DOC_BROWSER_COMMAND+::
403 This is the command with which to invoke the HTML browser. By default
404 it calls the program named in +HTML_DOC_BROWSER+ and passes it the
405 name/URL of the documentation file to be displayed. You shouldn't
406 have to change this unless your HTML browser requires some unusual
407 options or arguments.
412 The FreeFOAM Executables Are Not Found By The Shell
413 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
414 There are three possible reasons for this:
416 1. Your shell (notably 'csh', 'tcsh' and 'zsh') requires you to refresh the
417 cache of available executables. You can do so by entering the command:
423 2. If 'rehashing' didn't solve the problem, the problem most likely is that you
424 installed FreeFOAM into a non-standard location by changing the configuration
425 variables +CMAKE_INSTALL_PREFIX+ or +FF_INSTALL_BIN_PATH+ in which case the
426 executables where installed into a directory not searched by the shell. In
427 this case you have to add the installation directory of the executables to
428 the +PATH+ variable. There are two possible locations:
431 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_BIN_PATH>':: if you specified
432 +FF_INSTALL_BIN_PATH+ as a relative path
433 '<FF_INSTALL_BIN_PATH>':: if you specified +FF_INSTALL_BIN_PATH+ as an absolute
437 After extending the +PATH+ variable with the installation directory of the
438 executables, you should be able to run all FreeFOAM applications as any other
439 binary available on the system. See <<environment,'Extending Search Paths And
440 Setting Environment Variables Permanently'>> for
441 instructions on how to extend the search path.
443 3. This option is similar to the previous solution and applies if you want to
444 run FreeFOAM from the build tree (i.e. without running +make install+). In
445 this case you again have to make sure that your shell finds the executables
446 built by CMake by extending the +PATH+ variable. Further, you have to tell
447 FreeFOAM where to find the global configuration files (see
448 <<globalconfig,'Global Configuration Files'>>). Here, you have the option to
449 place the files under your home directory or set an environment variable. The
450 former can be achieved by:
453 $ mkdir -p $HOME/.FreeFOAM/{shortver}
454 $ cp $HOME/Source/freefoam-{fullver}-build/etc/controlDict $HOME/.FreeFOAM/{shortver}
455 $ cp $HOME/Source/freefoam-{fullver}-build/etc/cellModels $HOME/.FreeFOAM/{shortver}
456 $ cp -r $HOME/Source/freefoam-{fullver}-build/etc/thermoData $HOME/.FreeFOAM/{shortver}
459 The latter (and recommended) method is to set the environment variable
460 +FREEFOAM_CONFIG_DIR+ to '$HOME/Source/freefoam-{fullver}-build/etc'. Adjust paths to the
461 build tree to your actual setup.
463 Starting Any FreeFOAM Application Fails Because Some Libraries Cannot Be Found
464 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
465 Although CMake should have taken care of this by using +RPATH+ on Linux and
466 +install_name+ on Mac OS X, it might be necessary on some systems to adjust the
467 library search paths:
469 +LD_LIBRARY_PATH+:: This variable is used by all Unix like systems (e.g. Linux,
471 +DYLD_LIBRARY_PATH+:: This variable is used by Mac OS X.
473 If you installed FreeFOAM, there are (as with the executables), two possible
474 installation directories:
476 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_LIB_PATH>':: if you specified
477 +FF_INSTALL_LIB_PATH+ as a relative path.
478 '<FF_INSTALL_LIB_PATH>':: if you specified +FF_INSTALL_LIB_PATH+ as an absolute
481 If you are trying to run from the build tree, you have to include
482 '$HOME/Source/freefoam-{fullver}-build/lib/FreeFOAM-{ver}' in the above mentioned search
483 paths (where you have to adjust the location of the build tree to your actual
486 A Running FreeFOAM Application Aborts Because It Can't 'dlopen' A Library
487 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
488 FreeFOAM (and OpenFOAM) often dynamically load libraries at run-time (a.k.a
489 plug-ins) to add features the user requested without requiring that the whole
490 application be recompiled. This makes it very simple to add new boundary
491 conditions, turbulence and combustion models etc. However, it also requires that
492 FreeFOAM must be able to find these libraries at run-time. The operating system
493 function which does the loading of the libraries ('dlopen') usually tries to
494 find the library with the given name in several places; namely a default search
495 path and a search path configured by one or multiple environment variables such
496 as +LD_LIBRARY_PATH+ or +DYLD_LIBRARY_PATH+ (on Mac OS X). The details vary from
497 platform to platform, so you best consult the documentation of 'dlopen' for the
500 Additionally FreeFOAM allows you to configure a custom search path for plug-ins
501 in the <<globalconfig,global 'controlDict'>> file by listing the directories to
502 be searched in the list +LibrarySearchPaths+. By default FreeFOAM is configured
503 to search for plug-ins in the location where CMake installed them.
505 If you want to add your own plug-in libraries (e.g. you want to add your own
506 boundary conditions class), you most probably will want to extend this search
510 Extending Search Paths And Setting Environment Variables Permanently
511 --------------------------------------------------------------------
512 The way one sets environment variables and extends the executable and library
513 search paths permanently strongly depends on the shell used. Usually one has to
514 create or change an initialization file in the users home directory. In the
515 following this will be discussed very briefly for the popular shells 'BASH' and
516 'tcsh'. However, if you need more help or want information on using the shell,
517 there is an excellent tutorial available at http://linuxcommand.org.
521 The BASH shell is the default shell for most Linux/Unix distributions. Most
522 systems configure the BASH shell such that it reads the text file
523 '$HOME/.bashrc' when starting up, so this is the place where one appends
524 customizations of the environment variables. On some systems this file is not
525 processed by default (notably Mac OS X). In this case you can use
526 '$HOME/.bash_profile'.
528 Referencing A Variable
529 ^^^^^^^^^^^^^^^^^^^^^^
530 To retrieve the value stored in a shell variable or environment variable, one
531 prefixes its name with the dollar (+$+) character.
535 The syntax for setting a variable and making it available to child-processes of
536 the shell is the following:
538 $ export variable_name=variable_value
540 Note that no white-space characters are allowed surrounding the +=+ sign.
542 Extending A Search Path
543 ^^^^^^^^^^^^^^^^^^^^^^^
544 The shell and other Unix system facilities use environment variables to locate
545 executables and dynamically linked libraries. These search paths consist of
546 strings naming directories in which the executables and libraries should be
547 searched for. The individual paths are separated by a colon (+:+) character. To
548 add the e.g. the directory '$HOME/bin' to the search path for executables, one
549 would do the following:
551 $ export PATH=$PATH:$HOME/bin
553 which appends '$HOME/bin' to the end of the +PATH+ variable.
557 Some users and administrators prefer to use a 'C-Shell', such as the TCSH. Here
558 you can use e.g. the file '$HOME/.tcshrc' to customize the environment.
560 Referencing A Variable
561 ^^^^^^^^^^^^^^^^^^^^^^
562 As with the BASH, one retrieves the value stored in a shell variable or
563 environment variable by prefixing its name with the dollar (+$+) character.
564 Sometimes it is also necessary to protect the variable name by surrounding it
565 with curly braces (+{+ and +}+).
569 The syntax for setting a variable and making it available to child-processes of
570 the shell is the following:
572 $ setenv variable_name variable_value
575 Extending A Search Path
576 ^^^^^^^^^^^^^^^^^^^^^^^
577 The shell and other Unix system facilities use environment variables to locate
578 executables and dynamically linked libraries. These search paths consist of
579 strings naming directories in which the executables and libraries should be
580 searched for. The individual paths are separated by a colon (+:+) character. To
581 add the e.g. the directory '$HOME/bin' to the search path for executables, one
582 would do the following:
585 $ setenv PATH ${PATH}:${HOME}/bin
587 which appends '$HOME/bin' to the end of the +PATH+ variable. Note that
588 'C-shells' usually require the user to type 'rehash' after changing the +PATH+
589 variable to update the cache of available programs.
591 ////////////////////////////////////////////////////////
592 Process with: asciidoc -a toc INSTALL
594 Vim users, this is for you:
595 vim: ft=asciidoc sw=2 expandtab fenc=utf-8
596 ////////////////////////////////////////////////////////