Main Lemma Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

compiling.dox 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. namespace Lemma{
  2. /**
  3. \page Compiling
  4. <div class="lemmamainmenu">
  5. \ref Intro "Intro"
  6. | \b Compiling
  7. | \ref Memory "Memory management"
  8. | \ref Minimal "Minimal programme"
  9. | \ref EmSources "EM Sources"
  10. </div>
  11. Compiling Lemma is fairly straightforward. The biggest hurdle is possibly installing
  12. the prerequisites, but on many platforms this is easy.
  13. \section Table Table of contents
  14. - \ref Prerequisites
  15. - \ref OptionalPrerequisites
  16. - \ref Downloading
  17. - \ref Configuring
  18. - \ref Building
  19. \section Prerequisites Prerequisites
  20. You will need to acquire the following free packages:
  21. - SCons - SCons is a make replacement that is written in Python. It is easily
  22. configurable and directly controls the build process. It is not a Makefile
  23. intermediary like some similar applications. It is freely available at
  24. <http://scons.org>. On Linux, your package manager very likely provides this. On
  25. Windows it is slightly more complicated. But, hey, Windows is easy... right? That's why
  26. you use it :) The process is well documented on the SCons
  27. website. You might guess that we aren't huge Windows fans.
  28. - Eigen3 - Eigen is a header-only linear algebra template library. It is made
  29. available under the Gnu Lesser Public License. It is available at
  30. <http://eigen.tuxfamily.org>. Please note that Lemma uses Version 3 of the Library.
  31. \subsection Dependencies
  32. The only dependencies are the Eigen linear algebra Library v3, a
  33. C++ compiler and scons.
  34. (Currently a fortran compiler is needed too, see above)
  35. The following compilers are fully supported and tested: gnu, mingw,
  36. and intelc. Several routines are parallelised for shared memory platforms
  37. using OpenMP. Any of the above compilers is able to be used with OpenMP.
  38. Microsoft's Visual C++ compiler will likely be supported for stable
  39. releases, but is not actively tested. (Also the current FORTRAN compiler
  40. dependency limits this compiler as well.) Eigen extensively uses template
  41. meta programming, the Borland compiler has been shown to be subpar at
  42. optimizing this type of code and will likely never be supported actively.
  43. A new compiler clang, is being developed and may prove to be promising as
  44. well, but current C++ support is lacking. If you are using a different
  45. compiler, please share your experiences with us.
  46. The Visualization ToolKit (VTK) is used for visualisation throughout Lemma.
  47. It is not an explicit dependency, but without it, you will not be able to
  48. get any graphical output.
  49. Eigen is freely available under the LGPL at
  50. <http://eigen.tuxfamily.org>. The necessary components of Eigen will
  51. be included in stable releases of Lemma.
  52. Scons is a make replacement built on top of Python, and is also free.
  53. \section OptionalPrerequisites Optional Prerequisites
  54. - VTK - The Visualization ToolKit is a powerful data visualization framework. This is
  55. an optional dependency, but some functionality will be missing without it. Any
  56. version after 5.4 is fine. VTK is available under a BSD license from <http://vtk.org>
  57. Again-- on Linux-- most package managers offer VTK. Compiling from source is not
  58. terribly difficult, but requires installing CMake as well. Strangely (wink wink) this is
  59. harder under Windows.
  60. - Qt - Limited GUI support is provided leveraging the Qt framework. You will need to have
  61. the development version of Qt 4 installed to use this.
  62. - Boost - Several classes use Boost. Lemma ships with a minimalist part of Boost and should compile
  63. without it. However, if you are getting Boost errors while compiling, install the development version
  64. of boost. Note that Ubuntu ships with a very old Boost that has caused some issues.
  65. Also, the Python wrapper requires boost.python and is not shipped with Lemma.
  66. \section Downloading Acquiring the source
  67. Lemma is currently available from svn checkout only. Note that while Lemma is still in Beta only
  68. developers have access to the source code. Contact us if you would like to contribute.
  69. \code
  70. svn co https://svn.lemmasoftware.org/lemma/trunk Lemma
  71. \endcode
  72. \section Configuring Configuring
  73. There is very little configuring to do. In the main Lemma directory you will find a file
  74. called 'Examplesettings.py listed below'
  75. \include Examplesettings.py
  76. Configure this to your machine, and copy to a file named
  77. \code
  78. settings.py
  79. \endcode
  80. If you have more questions about a parameter you can type
  81. \code
  82. scons -h
  83. \endcode
  84. For more information. After configuring, copy Examplesettings.py to a file called settings.py.
  85. \section Building
  86. To build the libraries simply type:
  87. \code
  88. scons -j2
  89. \endcode
  90. To build the libraries and unit tests. The -j2 arguments tell scons how many threads compilation
  91. should occur on (parallel build). We recommend one per processor. Note, this only affects
  92. the speed of the build, not whether or not Lemma will have OpenMP support.
  93. \section Installing
  94. To install the library simply type:
  95. \code
  96. scons install
  97. \endcode
  98. To install to INSTALLDIR. Note depending on your machine, you may need sudo privileges to do this.
  99. Also, if you let INSTALLDIR=./lib this step will fail as those libraries are already located in Lemma/lib.
  100. Note that on a Mac, this step is crucial.
  101. */
  102. /** @} */
  103. }