Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
47669360
Unverified
Commit
47669360
authored
3 years ago
by
Robin De Schepper
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add Makejobs arg to setup.py (#1673)
parent
11ad487f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/install/python.rst
+3
-2
3 additions, 2 deletions
doc/install/python.rst
setup.py
+17
-3
17 additions, 3 deletions
setup.py
with
20 additions
and
5 deletions
doc/install/python.rst
+
3
−
2
View file @
47669360
...
...
@@ -21,7 +21,7 @@ The easiest way to get Arbor is with
pip3 install arbor
.. note::
For other platforms, `pip` will build Arbor from source.
For other platforms, `pip` will build Arbor from source.
You will need to have some development packages installed in order to build Arbor this way.
* Ubuntu/Debian: `git cmake gcc python3-dev python3-pip libxml2-dev`
...
...
@@ -84,6 +84,7 @@ The following optional flags can be used to configure the installation:
See :ref:`install-architecture` for details.
* ``--arch``: CPU micro-architecture to target. The advised default is ``native``.
See `here <https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html>`_ for a full list of options.
* ``--makejobs``: Specify the amount of jobs to ``make`` the project with for faster build times on multicore systems. By default set to ``2``.
**Vanilla install** with no additional features enabled:
...
...
@@ -134,7 +135,7 @@ The following optional flags can be used to configure the installation:
it with the flags you need.
.. Note::
Detailed instructions on how to install using CMake are in the
Detailed instructions on how to install using CMake are in the
:ref:`Python configuration <install-python>` section of the :ref:`installation guide <in_build_install>`.
CMake is recommended if you need more control over compilation and installation, plan to use Arbor with C++,
or if you are integrating with package managers such as Spack and EasyBuild.
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
17
−
3
View file @
47669360
...
...
@@ -27,7 +27,8 @@ class CL_opt:
'
vec
'
:
False
,
'
arch
'
:
'
none
'
,
'
neuroml
'
:
True
,
'
bundled
'
:
True
}
'
bundled
'
:
True
,
'
makejobs
'
:
2
}
def
settings
(
self
):
return
CL_opt
.
instance
...
...
@@ -43,7 +44,8 @@ user_options_ = [
(
'
vec
'
,
None
,
'
enable vectorization
'
),
(
'
arch=
'
,
None
,
'
cpu architecture, e.g. haswell, skylake, armv8.2-a+sve, znver2 (default native).
'
),
(
'
neuroml
'
,
None
,
'
enable parsing neuroml morphologies in Arbor (requires libxml)
'
),
(
'
sysdeps
'
,
None
,
'
don
\'
t use bundled 3rd party C++ dependencies (pybind11 and json). This flag forces use of dependencies installed on the system.
'
)
(
'
sysdeps
'
,
None
,
'
don
\'
t use bundled 3rd party C++ dependencies (pybind11 and json). This flag forces use of dependencies installed on the system.
'
),
(
'
makejobs=
'
,
None
,
'
the amount of jobs to run `make` with.
'
)
]
# VERSION is in the same path as setup.py
...
...
@@ -98,9 +100,18 @@ class _command_template:
self
.
vec
=
None
self
.
neuroml
=
None
self
.
sysdeps
=
None
self
.
makejobs
=
2
def
finalize_options
(
self
):
super
().
finalize_options
()
try
:
self
.
makejobs
=
int
(
self
.
makejobs
)
except
ValueError
:
err
=
True
else
:
err
=
False
if
err
or
self
.
makejobs
<
1
:
raise
AssertionError
(
'
makejobs must be a strictly positive integer
'
)
def
run
(
self
):
# The options are stored in global variables:
...
...
@@ -118,6 +129,9 @@ class _command_template:
# bundled : use bundled/git-submoduled 3rd party libraries.
# By default use bundled libs.
opt
[
'
bundled
'
]
=
self
.
sysdeps
is
None
# makejobs : specify amount of jobs.
# By default 2.
opt
[
'
makejobs
'
]
=
int
(
self
.
makejobs
)
super
().
run
()
...
...
@@ -169,7 +183,7 @@ class cmake_build(build_ext):
build_args
=
[
'
--config
'
,
'
Release
'
]
# Assuming Makefiles
build_args
+=
[
'
--
'
,
'
-j
2
'
]
build_args
+=
[
'
--
'
,
f
'
-j
{
opt
[
"
makejobs
"
]
}
'
]
env
=
os
.
environ
.
copy
()
env
[
'
CXXFLAGS
'
]
=
'
{}
'
.
format
(
env
.
get
(
'
CXXFLAGS
'
,
''
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment