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

Parallel compilation : does --jobs works ?

asked 2011-03-29 04:19:57 -0500

Willy Lambert gravatar image

updated 2011-03-29 04:42:17 -0500

tfoote gravatar image

Hi,

I have a debian installation of Diamondback and I did not succeed usung parallel compilation. I may build 2 packages at the same time using --threads, but when only building one package I can't ask it to build in parallel the exe. If I go into my package I can run make -j3 without any problem and it works.

Is it an issue in my CMakeLists or a rosmake issue ?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2011-03-29 07:05:34 -0500

Willy Lambert gravatar image

this is working : export ROS_PARALLEL_JOBS=-j3

but there is no way to make the --pjobs working. I have enougth with the former.

edit flag offensive delete link more

Comments

This is the actual correct answer. rosmake --pjobs=4 or --threads=4 doesn't work for me either. Neither does export ROS_PARALLEL_JOBS=-l3 (-l instead of -j) as mentioned at http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PARALLEL_JOBS
Felix Endres gravatar image Felix Endres  ( 2011-04-17 21:38:47 -0500 )edit
1

answered 2011-03-29 06:59:59 -0500

tfoote gravatar image

Assuming you are talking about --pjobs. It does work.

It simply overrides the ROS_PARALLEL_JOBS environment setting. If you are using a package with just a Makefile you will have to pass it through in that Makefile. For example the kdl Makefile does this.

If you use mk/cmake.mk, as the default Makefile does, it also uses ROS_PARALLEL_JOBS when executing the Makefile generated by cmake.

edit flag offensive delete link more

Comments

the kdl example helped. It thougth this was done automatically. So my projects with Makefile are now working with parallel build, and I think the cmakes one also. Thanks both !
Willy Lambert gravatar image Willy Lambert  ( 2011-03-29 07:10:07 -0500 )edit
If the kdl Makefile would have used `${MAKE}` instead of `make`, the extra `ROS_PARALLEL_JOBS` in its makefile wouldn't have been necessary, right?
Ruben Smits gravatar image Ruben Smits  ( 2011-03-29 18:53:09 -0500 )edit
0

answered 2011-03-29 06:10:34 -0500

I'm not entirely sure what's the problem?

Have you tried doing rosmake --pjobs=3 packag_name, or exporting ROS_PARALLEL_JOBS=-j3?

-- Ruben

edit flag offensive delete link more

Comments

I am trying to do rosmake --pjobs=3 at the moment
Willy Lambert gravatar image Willy Lambert  ( 2011-03-29 06:16:52 -0500 )edit
So you mean that `rosmake --pjobs=3` does not work? Did you already try exporting ROS_PARALLELL_JOBS?
Ruben Smits gravatar image Ruben Smits  ( 2011-03-29 06:32:26 -0500 )edit

Question Tools

Stats

Asked: 2011-03-29 04:19:57 -0500

Seen: 674 times

Last updated: Mar 29 '11