1 2=NODE Installation Installation 3=UP Intro [30] 4 5=DESCRIPTION 6 UNU.RAN was developed on an Intel architecture under Linux with 7 the GNU C compiler but should compile and run on any computing 8 environment. It requires an ANSI compliant C compiler. 9 10 Below find the installation instructions for unices. 11 12 13 @subsubheading Uniform random number generator 14 15 UNU.RAN can be used with any uniform random number generator but (at the 16 moment) some features work best with Pierre L'Ecuyer's RngStreams library 17 (see @url{http://statmath.wu.ac.at/software/RngStreams/} for a 18 description and downloading. 19 For details on using uniform random number in UNU.RAN 20 see @ref{URNG,,Using uniform random number generators}. 21 22 Install the required libraries first. 23 24 25 @subsubheading UNU.RAN 26 27 @enumerate 28 29 @item First unzip and untar the package and change to the directory: 30 @smallexample 31 tar zxvf unuran-@value{VERSION}.tar.gz 32 cd unuran-@value{VERSION} 33 @end smallexample 34 35 @item Optional: Edit the file @file{src/unuran_config.h} 36 37 @item Run a configuration script: 38 @smallexample 39 sh ./configure --prefix=<prefix> 40 @end smallexample 41 42 where @code{<prefix>} is the root of the installation tree. 43 When omitted @file{/usr/local} is used. 44 45 Use @code{./configure --help} to get a list of other options. 46 In particular the following flags are important: 47 48 @itemize @bullet 49 @item 50 Enable support for some external sources of uniform random 51 number generators 52 (@pxref{URNG,,Using uniform random number generators}): 53 54 @table @code 55 @item --with-urng-rngstream 56 URNG: use Pierre L'Ecuyer's RNGSTREAM library 57 [default=@code{no}] 58 59 @item --with-urng-prng 60 URNG: use Otmar Lendl's PRNG library 61 [default=@code{no}] 62 63 @item --with-urng-gsl 64 URNG: use random number generators from GNU Scientific Library 65 [default=@code{no}] 66 67 @item --with-urng-default 68 URNG: global default URNG (builtin|rngstream) 69 [default=@code{builtin}] 70 @end table 71 72 We strongly recommend to use RngStreams library: 73 @smallexample 74 sh ./configure --with-urng-rngstream --with-urng-default=rngstream 75 @end smallexample 76 77 @emph{Important:} You must install the respective libraries 78 @file{RngStreams}, @file{PRNG} and @file{GSL} before 79 @code{./configure} is executed. 80 81 @item 82 Also make a shared library: 83 84 @table @code 85 @item --enable-shared 86 build shared libraries [default=@code{no}] 87 @end table 88 89 @item 90 The library provides the function @code{unur_gen_info} for 91 information about generator objects. This is intented for 92 using in interactive computing environments. 93 This feature can be enabled / disabled by means of the 94 configure flag 95 96 @table @code 97 @item --enable-info 98 INFO: provide function with information about 99 generator objects [default=@code{yes}] 100 @end table 101 102 @item 103 Enable support for deprecated UNU.RAN routines if you have 104 some problems with older application after upgrading the 105 library: 106 107 @table @code 108 @item --enable-deprecated 109 enable support for deprecated UNU.RAN routines 110 [default=@code{no}] 111 @end table 112 113 @item 114 Enable debugging tools: 115 116 @table @code 117 @item --enable-check-struct 118 Debug: check validity of pointers to structures 119 [default=@code{no}] 120 121 @item --enable-logging 122 Debug: print informations about generator into logfile 123 [default=no] 124 @end table 125 @end itemize 126 127 128 @item Compile and install the libray: 129 @smallexample 130 make 131 make install 132 @end smallexample 133 134 Obviously @code{$(prefix)/include} and @code{$(prefix)/lib} 135 must be in the search path of your compiler. You can use environment 136 variables to add these directories to the search path. If you 137 are using the bash type (or add to your profile): 138 @smallexample 139 export LIBRARY_PATH="<prefix>/lib" 140 export C_INCLURE_PATH="<prefix>/include" 141 @end smallexample 142 143 If you want to make a shared library, then making such 144 a library can be enabled using 145 @smallexample 146 sh ./configure --enable-shared 147 @end smallexample 148 If you want to link against the shared library make sure that 149 it can be found when executing the binary that links to the 150 library. If it is not installed in the usual path, then the 151 easiest way is to set the @code{LD_LIBRARY_PATH} environment 152 variable. See any operating system documentation about shared 153 libraries for more information, such as the ld(1) and 154 ld.so(8) manual pages. 155 156 @item Documentation in various formats (PDF, HTML, info, plain 157 text) can be found in directory @file{doc}. 158 159 @item You can run some tests by 160 @smallexample 161 make check 162 @end smallexample 163 164 However, some of these tests requires the usage of the PRNG or 165 RngStreams library and are only executed if these are installed 166 enabled by the corresponding configure flag. 167 168 An extended set of tests is run by 169 @smallexample 170 make fullcheck 171 @end smallexample 172 173 However some of these might fail occasionally due to 174 roundoff errors or the mysteries of floating point arithmetic, 175 since we have used some extreme settings to test the library. 176 177 @end enumerate 178 179 180 @subsubheading Upgrading 181 182 @itemize @minus 183 @item @emph{Important:} 184 185 UNU.RAN now relies on some aspects of IEEE 186 754 compliant floating point arithmetic. In particular, 187 @code{1./0.} and @code{0./0.} must result in @code{infinity} 188 and @code{NaN} (not a number), respectively, and must not 189 cause a floating point exception. 190 For allmost all modern compting architecture this is implemented 191 in hardware. For others there should be a special compiler flag 192 to get this feature (e.g., @code{-MIEEE} on DEC alpha or 193 @code{-mp} for the Intel C complier). 194 195 @item Upgrading UNU.RAN from version 0.9.x or earlier: 196 197 With UNU.RAN version 1.0.x some of the macro definitions in 198 file @file{src/unuran_config.h} are moved into file 199 @file{config.h} and are set/controlled by the 200 @code{./configure} script. 201 202 Writting logging information into the logfile must now be 203 enabled when running the configure script: 204 @smallexample 205 sh ./configure --enable-logging 206 @end smallexample 207 208 @item Upgrading UNU.RAN from version 0.7.x or earlier: 209 210 With UNU.RAN version 0.8.0 the interface for changing 211 underlying distributions and running a reinitialization 212 routine has been simplified. The old routines can be compiled 213 into the library using the following configure flag: 214 @smallexample 215 sh ./configure --enable-deprecated 216 @end smallexample 217 218 Notice: Using these deprecated routines is not supported any 219 more and this strong discouraged. 220 221 Wrapper functions for external sources of uniform random 222 numbers are now enabled by configure flags and not by macros 223 defined in file @file{src/unuran_config.h}. 224 225 The file @file{src/unuran_config.h} is not installed any 226 more. It is now only included when the library is compiled. 227 It should be removed from the global include path of the 228 compiler. 229 230 @end itemize 231 232=EON 233 234/*---------------------------------------------------------------------------*/ 235 236