| 1 |
|
| 2 |
//----------------------------------------------// |
| 3 |
// Langage Objet pour la RElativite NumeriquE // |
| 4 |
// (LORENE) // |
| 5 |
//----------------------------------------------// |
| 6 |
|
| 7 |
******************************* |
| 8 |
* INSTALLATION INSTRUCTIONS * |
| 9 |
******************************* |
| 10 |
|
| 11 |
$Id: INSTALL,v 1.9 2013/07/17 12:16:12 j_novak Exp $ |
| 12 |
|
| 13 |
Comments or questions should be addressed to |
| 14 |
[email protected], [email protected], [email protected]. |
| 15 |
|
| 16 |
See also the file INSTALL_linux for some features specific to Linux. |
| 17 |
|
| 18 |
|
| 19 |
0/ Prerequisites |
| 20 |
============= |
| 21 |
|
| 22 |
0.1/ Softwares absolutely required by LORENE: |
| 23 |
---------------------------------------- |
| 24 |
|
| 25 |
gmake: the GNU make utility |
| 26 |
|
| 27 |
a C++ compiler: any compiler compliant to the ISO norm of C++ should be able |
| 28 |
to compile LORENE |
| 29 |
|
| 30 |
a Fortran 77 compiler: a small part of LORENE is written in Fortran 77, namely |
| 31 |
the Fast Fourier Transform used by the spectral method and the solver |
| 32 |
of Poisson equation in 2-dimensional space. In future releases of LORENE, |
| 33 |
these parts should be rewritten in C++, so that a Fortran 77 compiler |
| 34 |
will no longer be necessary to compile LORENE. |
| 35 |
Note: the Fortran 95 compiler of the GCC 4.0 suite, namely gfortran, |
| 36 |
works well (no need to downgrade to the old g77 |
| 37 |
|
| 38 |
CVS: The internet access to Lorene sources is performed via a CVS server. |
| 39 |
CVS (Concurrent Versions System) is powerfull tool to |
| 40 |
manage versions and develop over the network. CVS is a free software |
| 41 |
under the GNU General Public License. It comes in standard with |
| 42 |
many Linux distributions. If you don't have it on your system, you |
| 43 |
can download it from the web site |
| 44 |
|
| 45 |
http://www.nongnu.org/cvs/ |
| 46 |
|
| 47 |
LAPACK: Lorene uses the LAPACK (Linear Algebra PACKage) library to perform |
| 48 |
linear algebra operations. LAPACK must therefore be installed on |
| 49 |
your system (including the development packages). LAPACK is a public |
| 50 |
domain software and can be downloaded from |
| 51 |
http://www.netlib.org/lapack/ |
| 52 |
If you are using Linux, note that LAPACK comes along with many Linux |
| 53 |
distributions. |
| 54 |
|
| 55 |
GSL (GNU Scientific Library): LORENE uses the GSL library to compute Bessel |
| 56 |
functions involved in some elliptic operators. GSL must therefore be |
| 57 |
installed on your system. GSL is a free software and can be |
| 58 |
downloaded from the GSL web site: |
| 59 |
http://www.gnu.org/software/gsl/ |
| 60 |
If you are using Linux, note that GSL comes along with many Linux |
| 61 |
distributions. |
| 62 |
|
| 63 |
your C compiler / preprocessor must support a "-M" option to output a |
| 64 |
dependency file, or use |
| 65 |
makedepend: to create dependencies in makefiles. On Linux systems, makedepend |
| 66 |
comes along with X11 development packages (for instance libxorg-x11-devel |
| 67 |
in Mandriva 2006 or xorg-x11-devel in SuSE 9.2) |
| 68 |
|
| 69 |
|
| 70 |
0.2/ Optional FFT library for LORENE: |
| 71 |
------------------------------- |
| 72 |
FFTW3 (Fastest Fourier Transform in the West): By default, LORENE uses a |
| 73 |
FORTRAN Fourier Transform. It is possible to use a faster library written |
| 74 |
in C, namely FFTW, version 3 (older versions are incompatible!) that can be |
| 75 |
downloaded from the FFTW Web site. If you are using Linux, note that FFTW3 |
| 76 |
comes along with most of distributions. To use it, you will have to set the |
| 77 |
appropriate variable FFT_DIR to FFTW3 in the local_settings file |
| 78 |
|
| 79 |
|
| 80 |
0.3/ Software required only to produce graphical outputs: |
| 81 |
--------------------------------------------------- |
| 82 |
|
| 83 |
PGPLOT: Lorene uses the PGPLOT library for producing 2-D graphical outputs. |
| 84 |
You can use Lorene without PGPLOT provided that you don't perform |
| 85 |
any call to the routines |
| 86 |
Lorene/C++/Source/Non_class_members/Graphics/des_* |
| 87 |
However, it is recommended to install PGPLOT on your system, from |
| 88 |
the web site |
| 89 |
http://www.astro.caltech.edu/~tjp/pgplot/ |
| 90 |
|
| 91 |
If you are using Linux, see the companion file INSTALL_linux. |
| 92 |
See in particular the instructions for a quick installation of PGPLOT |
| 93 |
Note that a small correction must be applied to the makefile if you are |
| 94 |
using gcc 4.0 (or above) (remplacement of g77 by gfortran) |
| 95 |
|
| 96 |
|
| 97 |
OpenDX: this powerful software is used to produce 3-D visualization of |
| 98 |
various Lorene objects. The corresponding OpenDX scripts are located |
| 99 |
in the directory Lorene/Visu/OpenDX. |
| 100 |
OpenDX can be freely downloaded from the web page http://www.opendx.org/. |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
0.3/ Softwares required to generate LORENE HTML documentation: |
| 105 |
-------------------------------------------------------- |
| 106 |
Doxygen: LORENE uses the software Doxygen to produce LaTeX and HTML |
| 107 |
documentation from the source files themselves (class declarations in |
| 108 |
Lorene/C++/Include/*.h). You can of course compile and run LORENE codes |
| 109 |
without Doxygen being installed on your system. But to write any piece of |
| 110 |
code, it is necessary to have LORENE documentation. Therefore, it is |
| 111 |
strongly recommended to install Doxygen on your system, if you do not |
| 112 |
already have it (Doxygen comes along with many Linux distributions). |
| 113 |
Doxygen is a free software under the GNU General Public License. |
| 114 |
You can download it from the Doxygen web site: |
| 115 |
http://www.stack.nl/~dimitri/doxygen/ |
| 116 |
|
| 117 |
LaTeX: the text formatting system TeX/LaTeX is required by DOC++ to generate |
| 118 |
the PostScript documentation, as well as to treat the mathematical |
| 119 |
formulae in the HTML documentation. |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
1/ Download from the CVS repository |
| 124 |
================================ |
| 125 |
|
| 126 |
Connect to the CVS repository in Meudon: |
| 127 |
|
| 128 |
cvs -d :pserver:[email protected]:/cvsroot login |
| 129 |
|
| 130 |
password: anonymous |
| 131 |
|
| 132 |
Download Lorene by typing |
| 133 |
|
| 134 |
cvs -z5 -d :pserver:[email protected]:/cvsroot checkout Lorene |
| 135 |
|
| 136 |
|
| 137 |
2/ Set of the environment variable HOME_LORENE |
| 138 |
=========================================== |
| 139 |
|
| 140 |
Enter to Lorene root directory which has just been created |
| 141 |
|
| 142 |
cd Lorene |
| 143 |
|
| 144 |
and define HOME_LORENE to be the full path name of this directory: |
| 145 |
-- if your Unix shell is csh or tcsh, type |
| 146 |
|
| 147 |
setenv HOME_LORENE $PWD |
| 148 |
|
| 149 |
-- if it is instead bash (common under Linux), type |
| 150 |
|
| 151 |
export HOME_LORENE=$PWD |
| 152 |
|
| 153 |
For future use of Lorene, it would be helpful to define HOME_LORENE in |
| 154 |
the resource file .cshrc .tchsrc or .bashrc in your home directory by |
| 155 |
inserting the line |
| 156 |
setenv HOME_LORENE /??/Lorene in .cshrc or .tchsrc |
| 157 |
export HOME_LORENE=/??/Lorene in .bashrc |
| 158 |
|
| 159 |
where /?? denotes the full path to the Lorene directory |
| 160 |
This will avoid to set it manually after each login. |
| 161 |
|
| 162 |
|
| 163 |
3/ Defining the parameters specific to your system |
| 164 |
----------------------------------------------- |
| 165 |
|
| 166 |
Before to launch the compilation of Lorene, you have to specify which |
| 167 |
compilers to use, with which options, and where are located some system |
| 168 |
libraries. This information should be passed to Lorene via the |
| 169 |
file |
| 170 |
$HOME_LORENE/local_settings |
| 171 |
|
| 172 |
This file is the only one of the Lorene distribution which is |
| 173 |
architecture/system dependent. It will be included by all the |
| 174 |
Lorene Makefiles, which are fully architecture independent. |
| 175 |
|
| 176 |
Some templates files are provided in the directory Local_settings for |
| 177 |
-- Linux with GNU compilers (local_settings_linux) |
| 178 |
-- SGI Irix (local_settings_irix) |
| 179 |
-- Compaq Alpha Digital Unix (local_settings_alpha) |
| 180 |
-- IBM AIX (local_settings_aix) |
| 181 |
-- MacOS X with GNU compilers (local_settings_darwin) |
| 182 |
|
| 183 |
To create the file $HOME_LORENE/local_settings, you simply have to |
| 184 |
copy one of this file into local_settings by typing, e.g. under Linux |
| 185 |
|
| 186 |
cd $HOME_LORENE |
| 187 |
cp Local_settings/local_settings_linux local_settings |
| 188 |
|
| 189 |
You may then edit local_settings to adapt it to some special features of |
| 190 |
your system implementation, e.g. to use FFTW3 instead of the standard |
| 191 |
FORTRAN FFT, changing the FFT_DIR variable from FFT991 to FFTW3. |
| 192 |
|
| 193 |
|
| 194 |
4/ Compiling |
| 195 |
========= |
| 196 |
|
| 197 |
The compilation of Lorene is launched via the command (in the HOME_LORENE |
| 198 |
directory) |
| 199 |
|
| 200 |
gmake |
| 201 |
|
| 202 |
This will first create the Lorene documentation, including the HTML |
| 203 |
reference guide, provided Doxygen is installed on your system (see the |
| 204 |
prerequisites section above). |
| 205 |
Then the C++ part is compiled and the Fortran 77 one. |
| 206 |
|
| 207 |
To read Lorene's reference manual, open the file |
| 208 |
$HOME_LORENE/Doc/refguide/index.html in a web browser |
| 209 |
|
| 210 |
If you run into trouble during the compilation, you can clean the C++ directory, |
| 211 |
leaving only the sources as downloaded by the CVS checkout command, by |
| 212 |
|
| 213 |
cd $HOME_LORENE/C++ |
| 214 |
gmake uninstall |
| 215 |
|
| 216 |
Then, you can fix the problem (e.g. add a path for include file in |
| 217 |
local_settings), and perform the gmake command again. |
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
5/ Testing the installation |
| 222 |
======================== |
| 223 |
|
| 224 |
If everything went well with the compilation, you can check the link with |
| 225 |
LAPACK and PGPLOT libraries with |
| 226 |
|
| 227 |
gmake test |
| 228 |
|
| 229 |
This will produce three executables: |
| 230 |
|
| 231 |
$HOME_LORENE/Test/test_fft : check LAPACK and PGPLOT |
| 232 |
$HOME_LORENE/Test/test_lapack : check LAPACK only |
| 233 |
$HOME_LORENE/Test/test_pgplot : check LAPACK and PGPLOT |
| 234 |
|
| 235 |
|
| 236 |
6/ Upgrading the installation |
| 237 |
========================== |
| 238 |
|
| 239 |
As a research software, LORENE is under permanent development. |
| 240 |
You should therefore run from time to time the commands |
| 241 |
|
| 242 |
cd $HOME_LORENE |
| 243 |
cvs update -d |
| 244 |
gmake |
| 245 |
|
| 246 |
to get the latest version of LORENE. |
| 247 |
The script $HOME_LORENE/lorene_up contains the above commands, so |
| 248 |
that it is equivalent to type |
| 249 |
|
| 250 |
$HOME_LORENE/lorene_up |
| 251 |
|
| 252 |
7/ Removing everything but the sources |
| 253 |
=================================== |
| 254 |
|
| 255 |
To restore the Lorene directory in the state it was just prior to step 4/ |
| 256 |
(compilation), type |
| 257 |
|
| 258 |
cd $HOME_LORENE |
| 259 |
gmake uninstall |
| 260 |
|
| 261 |
|