Debian Codegraph @

doc/platforms/Cray/make_python_numpy

raw
1 #!/bin/csh
2
3 module swap PrgEnv-pgi PrgEnv-gnu
4 setenv CC cc
5 setenv CXX CC
6 setenv OPT '-O3 -funroll-all-loops'
7
8 # edit the installation paths if necessary
9 mkdir -p sw/xt5
10 cd sw/xt5
11 set sw_home=`pwd`
12 setenv EXPAT_DIR ${sw_home}/expat-2.0.1-1
13 setenv ZLIB_DIR ${sw_home}/zlib-1.2.3-1
14 setenv PYTHON_DIR ${sw_home}/Python-2.5.4-1
15
16 wget https://www.python.org/ftp/python/2.5.4/Python-2.5.4.tar.bz2
17 wget https://sunet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
18 wget https://www.zlib.net/zlib-1.2.3.tar.bz2
19 tar jxf Python-2.5.4.tar.bz2
20 tar zxf expat-2.0.1.tar.gz
21 tar jxf zlib-1.2.3.tar.bz2
22 wget https://python-nose.googlecode.com/files/nose-0.11.0.tar.gz
23 tar zxf nose-0.11.0.tar.gz
24 wget https://dfn.dl.sourceforge.net/sourceforge/numpy/numpy-1.2.1.tar.gz
25 tar zxf numpy-1.2.1.tar.gz
26
27 cd ${sw_home}
28 echo "Making Expat"
29 cd expat-2.0.1
30 ./configure --disable-shared --prefix=${EXPAT_DIR}
31 make
32 make install
33
34 cd ${sw_home}
35 echo "Making Zlib"
36 cd zlib-1.2.3
37 ./configure --prefix=${ZLIB_DIR}
38 make # ignore error: /usr/lib/../lib64/libc.a: could not read symbols: Bad value
39 make install
40
41 cd ${sw_home}
42 echo "Making Python"
43 cd Python-2.5.4
44
45 wget --no-check-certificate https://svn.fysik.dtu.dk/projects/gpaw/trunk/doc/install/Cray/dynload_redstorm.c -O Python/dynload_jaguar.c
46
47
48 ./configure --prefix=${PYTHON_DIR} SO=.a DYNLOADFILE=dynload_jaguar.o MACHDEP=jaguar --host=x86_64-unknown-linux-gnu --disable-sockets --disable-ssl --enable-static --disable-shared | tee config.log
49
50 wget --no-check-certificate https://svn.fysik.dtu.dk/projects/gpaw/trunk/doc/install/Cray/linkforshared.py
51 cat Lib/distutils/unixccompiler.py linkforshared.py > unixccompiler.py
52 mv -f unixccompiler.py Lib/distutils
53
54 mv -f Modules/Setup Modules/Setup.orig
55 wget --no-check-certificate https://svn.fysik.dtu.dk/projects/gpaw/trunk/doc/install/Cray/Setup_jaguar -O Modules/Setup
56 touch Modules/Setup
57
58 make | tee make.log
59 # ignore errors like:
60 # *** WARNING: renaming "_ctypes" since importing it failed: dynamic module does not define init function (init_ctypes)
61 make install | tee make_install.log
62
63 cd ${sw_home}
64 echo "Making Numpy"
65 cd numpy-1.2.1
66 ${PYTHON_DIR}/bin/python setup.py install | tee install.log
67
68 cd ${sw_home}/Python-2.5.4
69 echo "Remaking Python"
70 cat ../numpy-1.2.1/install.log | grep Append | cut -d ":" -f 2 | sed -n 's/ *//p' > append
71 cat Modules/Setup append > Setup
72 mv -f Setup Modules
73
74 make | tee make2.log
75 make install | tee make_install2.log