forked from agb32/dasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
119 lines (88 loc) · 3.97 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Installing DASP
===============
On Linux
--------
Installation should be relatively straight forward on Linux.
First, get the packages you need, e.g.:
make ubuntu1604
etc. If your particular distribution isn't in the Makefile, then install by hand, e.g.:
Ubuntu derivatives:
sudo apt-get install python-dev fftw3-dev libatlas-dev gsl-bin libgsl0-dev libatlas-base-dev python-scipy nfs-common screen glade python-glade2 python-matplotlib python-mpi4py libopenmpi-dev
Fedora/Redhat typically require:
yum install gsl-devel fftw3-devel atlas-devel scipy openmpi
RHEL6:
Also need openblas-devel and:
export C_INCLUDE_PATH=/usr/include/openblas/
ln -s libcblas.so.3 libcblas.so
ln -s libatlas.so.3 libatlas.so
Centos7:
yum install openmpi-devel
source /etc/profile.d/modules.sh
module load mpi/openmpi-x86_64
git clone https://bitbucket.org/mpi4py/mpi4py.git
cd mpi4py
python setup.py build #(if this fails, it means you won't have MPI... but thats okay for small/medium simulations)
sudo python setup.py install
(cd /usr/lib64 && sudo ln -s atlas/libsatlas.so libcblas.so)
(cd /usr/lib64 && sudo ln -s atlas/libsatlas.so libatlas.so)
Secondly, check MPI is working (only necessary if you want large
simulations, e.g. ELT-scale):
mpirun -np 5 python -c "from mpi4py import MPI;comm=MPI.COMM_WORLD;import os;print comm.Get_rank(),os.environ.get('PYTHONPATH','pop'),os.environ.get('PATH','pop');"
Should then print out your python path 5 times. If it doesn't work,
consider editing your /etc/environment file.
If you are simulating a large system, you will also benefit from a BLAS library. DASP can support mkl, acml, openblas or atlas. Openblas is easiest to get going with. ACML 6 isn't yet supported (uses OpenCL).
Install openblas in /opt/openblas and add /opt/openblas/lib to LD_LIBRARY_PATH.
(typing "make openblas" should do it)
Now make the simulation:
make
Export the suggested things, e.g.:
export PYTHONPATH=$PYTHONPATH:/path/to/aosim
export PATH=$PATH:/path/to/aosim/bin
For Fedora/Redhat systems, you also need to:
export PYTHONPATH=$PYTHONPATH:/path/to/aosim:/usr/local/lib:/usr/local/lib64
And may also need to add /usr/lib64/openmpi/lib
And ln -s /usr/lib64/openmpi/bin/mpirun /usr/bin/mpirun
Now, navigate to test/scao, and run:
python scao.py --iterations=200
After installation, run daspbuilder.py to get started on your first simulation.
UPGRADING from ubuntu14.04 to 16.04: (gig46-51, 53 still need to do. 47 done - clean install)
sudo do-release-upgrade
sudo rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-old
sudo apt-get install libgsl-dev
sudo apt-get remove python-mpi4py
sudo apt-get install libopenmpi-dev
sudo apt-get install python-mpi4py
cd git/aosim
git pull
make clean
make
Files that have been modified (i.e. make a backup): /etc/bash.bashrc
DOCUMENTATION:
-------------
Is in doc/
To make it, navigate to the doc directory, and run "make". You may need to install relevant packages - this can be done using:
make ubuntu1404 (and derivatives) - in the doc directory.
Installing on OS-X (i.e. a mac)
------------------
This isn't well supported, and therefore not always working. However,
the general procedure is as follows:
1. Install the necessary packages. Some uses use e.g. macports or
similar for this (see below).
2. In the dasp directory/folder, type "make".
3. Set your environment variables (PATH, PYTHONPATH, etc) as
directed.
4. Run daspbuilder.py to make your first simulation.
Using macports:
sudo port selfupdate
sudo port install py27-numpy py27-scipy
Check that the python interpreter is the one installed by macports
(/opt/local/bin/python). If typing "which python" doesn't yield this,
then you may need to update the dasp Makefiles to point to the python
in /opt/
sudo port install atlas
sudo port install fftw-3-long fftw-3-single
sudo port install py-scientific py27-gsl
sudo port install gtk2 py-pygtk
sudo port install py27-matplotlib +gtk2
Then in your dasp/ directory, type "make".
If this fails, and you are able to fix it, please commit your changes!