[Ecolab-list] Installing EcoLab with UNURAN
Brought to you by:
hpcoder
From: <ad...@he...> - 2007-12-13 22:46:38
|
Hi everyone, I was trying to install EcoLab with UNURAN and ran into some problems (which I think is because I am using a newer version of UNURAN) and I would like to describe here how I fixed them. I used very non-standard installation directories so I am just going to go through the entire installation procedure. This can serve as a guide for anyone who is new at this and others can also point out how this could be done in an easier way. I am running EcoLab on a Dell Latitude D610, Pentium M 2.13Ghz system with 1GB RAM, running Fedora 8. I used the following versions of the softwares required. tcl-8.4.15-5.fc8 blt-2.4-19.fc8 gcc-4.1.2-33 EcoLab-4.D25 unuran-1.1.0 prng-3.0.2 Installation Procedure ----------------------------- For simplicity, I am assuming everything is done as root. 1. Download PRNG 3.0.2 from http://statistik.wu-wien.ac.at/prng/download.html tar -xvzf prng-3.0.2.tar.gz cd prng-3.0.2 ./configure --prefix=/opt/ecolab-4.D25/prng make all && make all install 2. Download UNURAN 1.1.0 from http://statistik.wu-wien.ac.at/unuran/download.html tar -xvzf unuran-1.1.0.tar.gz cd unuran-1.1.0 export LDFLAGS=-L/opt/ecolab-4.D25/prng/lib export CPPFLAGS=-I/opt/ecolab-4.D25/prng/include ./configure --prefix=/opt/ecolab-4.D25/unuran --with-urng-prng make all && make all install 3. Download EcoLab 4.D25 from http://ecolab.sourceforge.net tar -xvzf ecolab.4.D25.tar.gz cd ecolab.4.D25 To let ecolab know where unuran and prng are located edit the include/Makefile and in the block for UNURAN configuration starting with ifdef UNURAN include the installed directories for unuran and prng vi include/Makefile change the FLAGS variable to FLAGS+=-DUNURAN -I/opt/ecolab-4.D25/unuran/include -I/opt/ecolab-4D25/prng/include change the LIBS variable to LIBS+=-L/opt/ecolab-4.D25/unuran/lib -L/opt/ecolab-4.D25/prng/lib -lunuran -lprng The following I think is because I am using a newer version of UNURAN than EcoLab 4.D25 was developed on. But you will have make two changes in include/random_unuran.h otherwise the compilation will throw an error complaining that prng* cannot be converted to UNUR_URNG*. After going through the unuran documentation I found a method which actually converts the prng* to UNUR_URNG*. So the changes to the include/random_unuran.h file are as follows. vi include/random_unuran.h add #include <unuran_urng_prng.h> to the include statements change line 50 ( after adding the above include it is line 51) which is originally unur_chg_urng(gen, uni.gen); to unur_chg_urng(gen, unur_urng_prngptr_new(uni.gen)); Now install Ecolab using the following command and everything should be fine. After this I was able to open all the models without any errors make PREFIX=/opt/ecolab-4.D25 UNURAN=1 all install Hope a guide on this lines is put up at the EcoLab website. It took me almost an entire day to just get EcoLab installed and working. Regards, Srinivasa Shivakar Vulli (shivakar) |