ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

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

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
0

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

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
0

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

130s gravatar image

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

The thread #q368249 explains colcon's parallelization.

edit flag offensive delete link more

Question Tools

3 followers

Stats

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

Seen: 1,831 times

Last updated: Mar 23 '21