We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52a0598 commit 0a39567Copy full SHA for 0a39567
setup.py
@@ -1,5 +1,6 @@
1
from distutils.core import setup
2
from distutils.extension import Extension
3
+import multiprocessing
4
# from Cython.Distutils import build_ext
5
from Cython.Build import cythonize
6
import numpy
@@ -294,7 +295,8 @@ def glob_cfiles(path, excludes):
294
295
),
296
)
297
-
298
+nthreads = multiprocessing.cpu_count()
299
+print('Building with {} threads'.format(nthreads))
300
setup(
301
name='fidimag',
302
version=version,
@@ -305,5 +307,5 @@ def glob_cfiles(path, excludes):
305
307
'fidimag.extensions',
306
308
'fidimag.common',
309
],
- ext_modules=cythonize(ext_modules),
310
+ ext_modules=cythonize(ext_modules, nthreads=nthreads),
311
0 commit comments