ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How do I tell colcon to tell cmake to tell make --jobs?

asked 2021-03-22 16:59:40 -0500

rubicks gravatar image

Here's something that saturates all 12 of my available cores:

colcon build --parallel-workers=3

How do I tell colcon build to use at most three cores at any given time?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2021-03-23 08:09:41 -0500

rubicks gravatar image

Colcon doesn't do that. Or, rather, it does, but only in ways that sacrifice one of the two "independent dimensions of parallelization".

Here's the first way:

MAKEFLAGS=-j1 colcon build --parallel-workers=3

Here's the second way:

MAKEFLAGS=-j3 colcon build --executor sequential
edit flag offensive delete link more

answered 2021-03-22 20:43:34 -0500

130s gravatar image

updated 2021-03-22 20:44:16 -0500

The thread #q368249 explains colcon's parallelization.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-03-22 16:59:40 -0500

Seen: 505 times

Last updated: Mar 23 '21