catkin_tools
catkin_tools copied to clipboard
The computer stops running while using catkin build.
Whenever I try to build my workspace and build new packages while using (catkin build) the computer stops working and I always restart it, so is there any solution for this problem. I was building the mavros package from this website https://dev.px4.io/en/ros/mavros_installation.html. I'm using Ubunto 16.04, and ROS kinetic.
catkin build -j2
EDIT: To elaborate a little more, this issue is caused by running more jobs than you have cores. If the jobs are too CPU-intensive, your computer freezes. The majority of processors are quad core (or fake-quad core, having 2 cores but 4 threads), so using half is a start. If it still freezes, catkin build -j1
should work, unless you're on a Pentium 4 or something.
@kmfrick That shouldn't be an issue. Catkin limits default jobs to the number of CPUs available using multiprocessing.cpu_count().
@SoftwareApe multiprocessing.cpu_count()
returns 4 on my dual-core CPU with HyperThreading, so this is an issue with such architectures (personally, I can confirm that as of June my computer would freeze when running catkin build
on certain environments and wouldn't when running catkin build -j2
on the same environment)
catkin build -j2
EDIT: To elaborate a little more, this issue is caused by running more jobs than you have cores. If the jobs are too CPU-intensive, your computer freezes. The majority of processors are quad core (or fake-quad core, having 2 cores but 4 threads), so using half is a start. If it still freezes,catkin build -j1
should work, unless you're on a Pentium 4 or something.
This worked for me thanks for the tip