@@ -40,10 +40,10 @@ Fortran ABI mismatch
40
40
41
41
The two most popular open source fortran compilers are g77 and gfortran.
42
42
Unfortunately, they are not ABI compatible, which means that concretely you
43
- should avoid mixing libraries built with one with another. In particular, if
44
- your blas/lapack/atlas is built with g77, you *must* use g77 when building
45
- numpy and scipy; on the contrary, if your atlas is built with gfortran, you
46
- *must* build numpy/scipy with gfortran.
43
+ should avoid mixing libraries built with one with another. In particular,
44
+ if your blas/lapack/atlas is built with g77, you *must* use g77 when
45
+ building numpy and scipy; on the contrary, if your atlas is built with
46
+ gfortran, you *must* build numpy/scipy with gfortran.
47
47
48
48
Choosing the fortran compiler
49
49
-----------------------------
@@ -59,77 +59,80 @@ To build with gfortran:
59
59
How to check the ABI of blas/lapack/atlas
60
60
-----------------------------------------
61
61
62
- One relatively simple and reliable way to check for the compiler used to build
63
- a library is to use ldd on the library. If libg2c.so is a dependency, this
64
- means that g77 has been used. If libgfortran.so is a dependency, gfortran has
65
- been used. If both are dependencies, this means both have been used, which is
66
- almost always a very bad idea.
62
+ One relatively simple and reliable way to check for the compiler used to
63
+ build a library is to use ldd on the library. If libg2c.so is a dependency,
64
+ this means that g77 has been used. If libgfortran.so is a dependency,
65
+ gfortran has been used. If both are dependencies, this means both have been
66
+ used, which is almost always a very bad idea.
67
67
68
68
Building with ATLAS support
69
69
===========================
70
70
71
71
Ubuntu 8.10 (Intrepid)
72
72
----------------------
73
73
74
- You can install the necessary packages for optimized ATLAS with this command:
74
+ You can install the necessary packages for optimized ATLAS with this
75
+ command:
75
76
76
77
sudo apt-get install libatlas-base-dev
77
78
78
79
If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should
79
- also install the corresponding package for optimal performance. For example,
80
- for SSE2:
80
+ also install the corresponding package for optimal performance. For
81
+ example, for SSE2:
81
82
82
83
sudo apt-get install libatlas3gf-sse2
83
84
84
85
*NOTE*: if you build your own atlas, Intrepid changed its default fortran
85
- compiler to gfortran. So you should rebuild everything from scratch, including
86
- lapack, to use it on Intrepid.
86
+ compiler to gfortran. So you should rebuild everything from scratch,
87
+ including lapack, to use it on Intrepid.
87
88
88
89
Ubuntu 8.04 and lower
89
90
---------------------
90
91
91
- You can install the necessary packages for optimized ATLAS with this command:
92
+ You can install the necessary packages for optimized ATLAS with this
93
+ command:
92
94
93
95
sudo apt-get install atlas3-base-dev
94
96
95
97
If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should
96
- also install the corresponding package for optimal performance. For example,
97
- for SSE2:
98
+ also install the corresponding package for optimal performance. For
99
+ example, for SSE2:
98
100
99
101
sudo apt-get install atlas3-sse2
100
102
101
103
Windows 64 bits notes
102
104
=====================
103
105
104
- Note: only AMD64 is supported (IA64 is not) - AMD64 is the version most people
105
- want.
106
+ Note: only AMD64 is supported (IA64 is not) - AMD64 is the version most
107
+ people want.
106
108
107
109
Free compilers (mingw-w64)
108
110
--------------------------
109
111
110
112
http://mingw-w64.sourceforge.net/
111
113
112
- To use the free compilers (mingw-w64), you need to build your own toolchain, as
113
- the mingw project only distribute cross-compilers (cross-compilation is not
114
- supported by numpy). Since this toolchain is still being worked on, serious
115
- compiler bugs can be expected. binutil 2.19 + gcc 4.3.3 + mingw-w64 runtime
116
- gives you a working C compiler (but the C++ is broken). gcc 4.4 will hopefully
117
- be able to run natively.
114
+ To use the free compilers (mingw-w64), you need to build your own
115
+ toolchain, as the mingw project only distribute cross-compilers
116
+ (cross-compilation is not supported by numpy). Since this toolchain is
117
+ still being worked on, serious compiler bugs can be expected. binutil 2.19
118
+ + gcc 4.3.3 + mingw-w64 runtime gives you a working C compiler (but the C++
119
+ is broken). gcc 4.4 will hopefully be able to run natively.
118
120
119
- This is the only tested way to get a numpy with a FULL blas/lapack (scipy does
120
- not work because of C++).
121
+ This is the only tested way to get a numpy with a FULL blas/lapack (scipy
122
+ does not work because of C++).
121
123
122
124
MS compilers
123
125
------------
124
126
125
- If you are familiar with MS tools, that's obviously the easiest path, and the
126
- compilers are hopefully more mature (although in my experience, they are quite
127
- fragile, and often segfault on invalid C code). The main drawback is that no
128
- fortran compiler + MS compiler combination has been tested - mingw-w64 gfortran
129
- + MS compiler does not work at all (it is unclear whether it ever will).
127
+ If you are familiar with MS tools, that's obviously the easiest path, and
128
+ the compilers are hopefully more mature (although in my experience, they
129
+ are quite fragile, and often segfault on invalid C code). The main drawback
130
+ is that no fortran compiler + MS compiler combination has been tested -
131
+ mingw-w64 gfortran + MS compiler does not work at all (it is unclear
132
+ whether it ever will).
130
133
131
134
For python 2.6, you need VS 2008. The freely available version does not
132
135
contains 64 bits compilers (you also need the PSDK, v6.1).
133
136
134
- It is * crucial* to use the right version: python 2.6 version 15. You can check
135
- the compiler version with cl.exe /?.
137
+ It is crucial to use the right MS compiler version. For python 2.6, you
138
+ must use version 15. You can check the compiler version with cl.exe /?.
0 commit comments