Switch to ubuntu and parallel jobs
[platform/upstream/openblas.git] / Makefile.rule
1 #
2 #  Beginning of user configuration
3 #
4
5 # This library's version
6 VERSION = 0.3.7.dev
7
8 # If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
9 # and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
10 # is libopenblas_$(LIBNAMESUFFIX).so.0.
11 # LIBNAMESUFFIX = omp
12
13 # You can specify the target architecture, otherwise it's
14 # automatically detected.
15 # TARGET = PENRYN
16
17 # If you want to support multiple architecture in one binary
18 # DYNAMIC_ARCH = 1
19
20 # If you want the full list of x86_64 architectures supported in DYNAMIC_ARCH
21 # mode (including individual optimizied codes for PENRYN, DUNNINGTON, OPTERON,
22 # OPTERON_SSE3, ATOM and NANO rather than fallbacks to older architectures)
23 # DYNAMIC_OLDER = 1
24
25 # C compiler including binary type(32bit / 64bit). Default is gcc.
26 # Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
27 # CC = gcc
28
29 # Fortran compiler. Default is g77.
30 # FC = gfortran
31
32 # Even you can specify cross compiler. Meanwhile, please set HOSTCC.
33
34 # cross compiler for Windows
35 # CC = x86_64-w64-mingw32-gcc
36 # FC = x86_64-w64-mingw32-gfortran
37
38 # cross compiler for 32bit ARM
39 # CC = arm-linux-gnueabihf-gcc
40 # FC = arm-linux-gnueabihf-gfortran
41
42 # cross compiler for 64bit ARM
43 # CC = aarch64-linux-gnu-gcc
44 # FC = aarch64-linux-gnu-gfortran
45
46
47 # If you use the cross compiler, please set this host compiler.
48 # HOSTCC = gcc
49
50 # If you need 32bit binary, define BINARY=32, otherwise define BINARY=64
51 # Please note that AVX is not available on 32-bit.
52 # Setting BINARY=32 disables AVX/AVX2/AVX-512.
53 # BINARY=64
54
55 # About threaded BLAS. It will be automatically detected if you don't
56 # specify it.
57 # For force setting for single threaded, specify USE_THREAD = 0
58 # For force setting for multi  threaded, specify USE_THREAD = 1
59 # USE_THREAD = 0
60
61 # If you're going to use this library with OpenMP, please comment it in.
62 # This flag is always set for POWER8. Don't set USE_OPENMP = 0 if you're targeting POWER8.
63 # USE_OPENMP = 1
64
65 # The OpenMP scheduler to use - by default this is "static" and you
66 # will normally not want to change this unless you know that your main
67 # workload will involve tasks that have highly unbalanced running times
68 # for individual threads. Changing away from "static" may also adversely
69 # affect memory access locality in NUMA systems. Setting to "runtime" will
70 # allow you to select the scheduler from the environment variable OMP_SCHEDULE
71 # CCOMMON_OPT += -DOMP_SCHED=dynamic
72
73 # You can define the maximum number of threads. Basically it should be less
74 # than or equal to the number of CPU threads. If you don't specify one, it's
75 # automatically detected by the build system.
76 # If SMT (aka. HT) is enabled on the system, it may or may not be beneficial to 
77 # restrict NUM_THREADS to the number of physical cores. By default, the automatic 
78 # detection includes logical CPUs, thus allowing the use of SMT.
79 # Users may opt at runtime to use less than NUM_THREADS threads.
80 #
81 # Note for package maintainers: you can build OpenBLAS with a large NUM_THREADS
82 # value (eg. 32-256) if you expect your users to use that many threads. Due to the way
83 # some internal structures are allocated, using a large NUM_THREADS value has a RAM
84 # footprint penalty, even if users reduce the actual number of threads at runtime.
85 # NUM_THREADS = 24
86
87 # If you have enabled USE_OPENMP and your application would call
88 # OpenBLAS's calculation API from multiple threads, please comment this in.
89 # This flag defines how many instances of OpenBLAS's calculation API can actually
90 # run in parallel. If more than NUM_PARALLEL threads call OpenBLAS's calculation API,
91 # they need to wait for the preceding API calls to finish or risk data corruption.
92 # NUM_PARALLEL = 2
93
94 # If you don't need to install the static library, please comment this in.
95 # NO_STATIC = 1
96
97 # If you don't need to generate the shared library, please comment this in.
98 # NO_SHARED = 1
99
100 # If you don't need the CBLAS interface, please comment this in.
101 # NO_CBLAS = 1
102
103 # If you only want the CBLAS interface without installing a Fortran compiler,
104 # please comment this in.
105 # ONLY_CBLAS = 1
106
107 # If you don't need LAPACK, please comment this in.
108 # If you set NO_LAPACK=1, the build system automatically sets NO_LAPACKE=1.
109 # NO_LAPACK = 1
110
111 # If you don't need LAPACKE (C Interface to LAPACK), please comment this in.
112 # NO_LAPACKE = 1
113
114 # Build LAPACK Deprecated functions since LAPACK 3.6.0
115 BUILD_LAPACK_DEPRECATED = 1
116
117 # Build RecursiveLAPACK on top of LAPACK
118 # BUILD_RELAPACK = 1
119
120 # If you want to use the legacy threaded Level 3 implementation.
121 # USE_SIMPLE_THREADED_LEVEL3 = 1
122
123 # If you want to use the new, still somewhat experimental code that uses
124 # thread-local storage instead of a central memory buffer in memory.c
125 # Note that if your system uses GLIBC, it needs to have at least glibc 2.21
126 # for this to work.
127 # USE_TLS = 1
128
129 # If you want to drive whole 64bit region by BLAS. Not all Fortran
130 # compilers support this. It's safe to keep this commented out if you
131 # are not sure. (This is equivalent to the "-i8" ifort option).
132 # INTERFACE64 = 1
133
134 # Unfortunately most of kernel won't give us high quality buffer.
135 # BLAS tries to find the best region before entering main function,
136 # but it will consume time. If you don't like it, you can disable one.
137 NO_WARMUP = 1
138
139 # Comment this in if you want to disable OpenBLAS's CPU/Memory affinity handling.
140 # This feature is only implemented on Linux, and is always disabled on other platforms.
141 # Enabling affinity handling may improve performance, especially on NUMA systems, but 
142 # it may conflict with certain applications that also try to manage affinity.
143 # This conflict can result in threads of the application calling OpenBLAS ending up locked
144 # to the same core(s) as OpenBLAS, possibly binding all threads to a single core.
145 # For this reason, affinity handling is disabled by default. Can be safely enabled if nothing
146 # else modifies affinity settings.
147 # Note: enabling affinity has been known to cause problems with NumPy and R
148 NO_AFFINITY = 1
149
150 # If you are compiling for Linux and you have more than 16 numa nodes or more than 256 cpus
151 # BIGNUMA = 1
152
153 # Don't use AVX kernel on Sandy Bridge. It is compatible with old compilers
154 # and OS. However, the performance is low.
155 # NO_AVX = 1
156
157 # Don't use Haswell optimizations if binutils is too old (e.g. RHEL6)
158 # NO_AVX2 = 1
159
160 # Don't use parallel make.
161 # NO_PARALLEL_MAKE = 1
162
163 # Force number of make jobs. The default is the number of logical CPU of the host.
164 # This is particularly useful when using distcc.
165 # A negative value will disable adding a -j flag to make, allowing to use a parent
166 # make -j value. This is useful to call OpenBLAS make from an other project
167 # makefile
168 # MAKE_NB_JOBS = 2
169
170 # If you would like to know minute performance report of GotoBLAS.
171 # FUNCTION_PROFILE = 1
172
173 # Support for IEEE quad precision(it's *real* REAL*16)( under testing)
174 # This option should not be used - it is a holdover from unfinished code present
175 # in the original GotoBLAS2 library that may be usable as a starting point but
176 # is not even expected to compile in its present form.
177 # QUAD_PRECISION = 1
178
179 # Theads are still working for a while after finishing BLAS operation
180 # to reduce thread activate/deactivate overhead. You can determine
181 # time out to improve performance. This number should be from 4 to 30
182 # which corresponds to (1 << n) cycles. For example, if you set to 26,
183 # thread will be running for (1 << 26) cycles(about 25ms on 3.0GHz
184 # system). Also you can control this number by THREAD_TIMEOUT
185 # CCOMMON_OPT   += -DTHREAD_TIMEOUT=26
186
187 # Using special device driver for mapping physically contiguous memory
188 # to the user space. If bigphysarea is enabled, it will use it.
189 # DEVICEDRIVER_ALLOCATION = 1
190
191 # If you need to synchronize FP CSR between threads (for x86/x86_64 only).
192 # CONSISTENT_FPCSR = 1
193
194 # If any gemm argument m, n or k is less or equal this threshold, gemm will be execute
195 # with single thread. (Actually in recent versions this is a factor proportional to the
196 # number of floating point operations necessary for the given problem size, no longer
197 # an individual dimension). You can use this setting to avoid the overhead of multi-
198 # threading in small matrix sizes. The default value is 4, but values as high as 50 have 
199 # been reported to be optimal for certain workloads (50 is the recommended value for Julia).
200 # GEMM_MULTITHREAD_THRESHOLD = 4
201
202 # If you need sanity check by comparing results to reference BLAS. It'll be very
203 # slow (Not implemented yet).
204 # SANITY_CHECK = 1
205
206 # The installation directory.
207 # PREFIX = /opt/OpenBLAS
208
209 # Common Optimization Flag;
210 # The default -O2 is enough.
211 # Flags for POWER8 are defined in Makefile.power. Don't modify COMMON_OPT
212 # COMMON_OPT = -O2
213
214 # gfortran option for LAPACK to improve thread-safety
215 # It is enabled by default in Makefile.system for gfortran
216 # Flags for POWER8 are defined in Makefile.power. Don't modify FCOMMON_OPT
217 # FCOMMON_OPT = -frecursive
218
219 # Profiling flags
220 COMMON_PROF = -pg
221
222 # Build Debug version
223 # DEBUG = 1
224
225 # Set maximum stack allocation.
226 # The default value is 2048. 0 disable stack allocation a may reduce GER and GEMV
227 # performance. For details, https://github.com/xianyi/OpenBLAS/pull/482
228 #
229 # MAX_STACK_ALLOC = 0
230
231 # Add a prefix or suffix to all exported symbol names in the shared library.
232 # Avoid conflicts with other BLAS libraries, especially when using
233 # 64 bit integer interfaces in OpenBLAS.
234 # For details, https://github.com/xianyi/OpenBLAS/pull/459
235 #
236 # The same prefix and suffix are also added to the library name,
237 # i.e. you get lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX) rather than libopenblas
238 #
239 # SYMBOLPREFIX=
240 # SYMBOLSUFFIX=
241
242 #
243 #  End of user configuration
244 #