Quantcast

[PCL-users] Minimizing compiler memory, package pcl_ros

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PCL-users] Minimizing compiler memory, package pcl_ros

futureignobel
Hi,

does anybody know, how to minimize the memory needed for gcc/g++ to
compile a particular package? I'm trying to compile the pcl_ros package
on a BeagleBoard-xM, but the compiler crashes each time because the
cc1plus process is being killed due to low memory (BB-xM has 500MB of
RAM). I've read a lot about this already, but found no solution. I've
already been able to compile openni and flann (which also caused errors).

The only thing I'd like to try out and wasn't still able to is adding a
"-finline-limit 600" (the number here may differ) compiler flag, as I
don't know how to use the rosbuild_add_compile_flags(target flag) macro
in case of flags with values.

Any help would be appreciated. I think being able to use Kinect on an
ARM based board would be great and the effort is well worth it. Among
small single board computers, ARM based boards cost 10 times less than,
for instance, the AscTec Atom with similar capabilities.

Also, if anyone out there has got a PandaBoard and would like to check
whether what I've found out so far works with it, please let know.

Cheers, Tom
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PCL-users] Minimizing compiler memory, package pcl_ros

futureignobel
I've also started a thread here:
http://answers.ros.org/question/154/minimizing-compiler-memory-pcl_ros

Please answer there, if you can.

W dniu 24.02.2011 14:22, futureignobel pisze:

> Hi,
>
> does anybody know, how to minimize the memory needed for gcc/g++ to
> compile a particular package? I'm trying to compile the pcl_ros
> package on a BeagleBoard-xM, but the compiler crashes each time
> because the cc1plus process is being killed due to low memory (BB-xM
> has 500MB of RAM). I've read a lot about this already, but found no
> solution. I've already been able to compile openni and flann (which
> also caused errors).
>
> The only thing I'd like to try out and wasn't still able to is adding
> a "-finline-limit 600" (the number here may differ) compiler flag, as
> I don't know how to use the rosbuild_add_compile_flags(target flag)
> macro in case of flags with values.
>
> Any help would be appreciated. I think being able to use Kinect on an
> ARM based board would be great and the effort is well worth it. Among
> small single board computers, ARM based boards cost 10 times less
> than, for instance, the AscTec Atom with similar capabilities.
>
> Also, if anyone out there has got a PandaBoard and would like to check
> whether what I've found out so far works with it, please let know.
>
> Cheers, Tom
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PCL-users] Minimizing compiler memory, package pcl_ros

Jochen Sprickerhof
In reply to this post by futureignobel
* futureignobel <[hidden email]> [2011-02-24 14:22]:
> Hi,

Hi Tom,

> does anybody know, how to minimize the memory needed for gcc/g++ to
> compile a particular package? I'm trying to compile the pcl_ros package
> on a BeagleBoard-xM, but the compiler crashes each time because the
> cc1plus process is being killed due to low memory (BB-xM has 500MB of
> RAM). I've read a lot about this already, but found no solution. I've
> already been able to compile openni and flann (which also caused errors).

why don't you cross compile it on your workstation?

> The only thing I'd like to try out and wasn't still able to is adding a
> "-finline-limit 600" (the number here may differ) compiler flag, as I
> don't know how to use the rosbuild_add_compile_flags(target flag) macro
> in case of flags with values.
>
> Any help would be appreciated. I think being able to use Kinect on an
> ARM based board would be great and the effort is well worth it. Among
> small single board computers, ARM based boards cost 10 times less than,
> for instance, the AscTec Atom with similar capabilities.
>
> Also, if anyone out there has got a PandaBoard and would like to check
> whether what I've found out so far works with it, please let know.
>
> Cheers, Tom

Cheers, Jochen
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PCL-users] Minimizing compiler memory, package pcl_ros

Nizar Khalifa Sallem
In reply to this post by futureignobel
At Thu, 24 Feb 2011 14:27:54 +0100,
futureignobel wrote:

>
> I've also started a thread here:
> http://answers.ros.org/question/154/minimizing-compiler-memory-pcl_ros
>
> Please answer there, if you can.
>
> W dniu 24.02.2011 14:22, futureignobel pisze:
> > Hi,
> >
> > does anybody know, how to minimize the memory needed for gcc/g++ to
> > compile a particular package? I'm trying to compile the pcl_ros
> > package on a BeagleBoard-xM, but the compiler crashes each time
> > because the cc1plus process is being killed due to low memory (BB-xM
> > has 500MB of RAM). I've read a lot about this already, but found no
> > solution. I've already been able to compile openni and flann (which
> > also caused errors).
> >
> > The only thing I'd like to try out and wasn't still able to is adding
> > a "-finline-limit 600" (the number here may differ) compiler flag, as
> > I don't know how to use the rosbuild_add_compile_flags(target flag)
> > macro in case of flags with values.
> >
> > Any help would be appreciated. I think being able to use Kinect on an
> > ARM based board would be great and the effort is well worth it. Among
> > small single board computers, ARM based boards cost 10 times less
> > than, for instance, the AscTec Atom with similar capabilities.
> >
> > Also, if anyone out there has got a PandaBoard and would like to check
> > whether what I've found out so far works with it, please let know.
> >
> > Cheers, Tom
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
You need the -O2 flag and desactivate all -O0 -ggdb or any other debug
flag. The simplest way, is to edit the CMakeLists.txt and edit the
line
set (ROS_BUILD_TYPE RelWithDebInfo) and move it to
set (ROS_BUILD_TYPE Release)
This should do the trick.

--
Nizar

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PCL-users] Minimizing compiler memory, package pcl_ros

Nizar Khalifa Sallem
At Thu, 24 Feb 2011 14:47:30 +0100,
Nizar Khalifa Sallem wrote:

>
> At Thu, 24 Feb 2011 14:27:54 +0100,
> futureignobel wrote:
> >
> > I've also started a thread here:
> > http://answers.ros.org/question/154/minimizing-compiler-memory-pcl_ros
> >
> > Please answer there, if you can.
> >
> > W dniu 24.02.2011 14:22, futureignobel pisze:
> > > Hi,
> > >
> > > does anybody know, how to minimize the memory needed for gcc/g++ to
> > > compile a particular package? I'm trying to compile the pcl_ros
> > > package on a BeagleBoard-xM, but the compiler crashes each time
> > > because the cc1plus process is being killed due to low memory (BB-xM
> > > has 500MB of RAM). I've read a lot about this already, but found no
> > > solution. I've already been able to compile openni and flann (which
> > > also caused errors).
> > >
> > > The only thing I'd like to try out and wasn't still able to is adding
> > > a "-finline-limit 600" (the number here may differ) compiler flag, as
> > > I don't know how to use the rosbuild_add_compile_flags(target flag)
> > > macro in case of flags with values.
> > >
> > > Any help would be appreciated. I think being able to use Kinect on an
> > > ARM based board would be great and the effort is well worth it. Among
> > > small single board computers, ARM based boards cost 10 times less
> > > than, for instance, the AscTec Atom with similar capabilities.
> > >
> > > Also, if anyone out there has got a PandaBoard and would like to check
> > > whether what I've found out so far works with it, please let know.
> > >
> > > Cheers, Tom
> > _______________________________________________
> > [hidden email] / http://pointclouds.org
> > https://code.ros.org/mailman/listinfo/pcl-users
> You need the -O2 flag and desactivate all -O0 -ggdb or any other debug
> flag. The simplest way, is to edit the CMakeLists.txt and edit the
> line
> set (ROS_BUILD_TYPE RelWithDebInfo) and move it to
> set (ROS_BUILD_TYPE Release)
> This should do the trick.
>
> --
> Nizar
>
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
PS: this can also be done from the cmake command line :
cmake -DYOUR_HABITUAL_FLAGS_TO_BUILD -DROS_BUILD_TYPE=Release,
antother interesting build type could be : MinSizeRel for minimal size
release but, personaly, I've never tested.

--
Nizar
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PCL-users] Minimizing compiler memory, package pcl_ros

rusu
Administrator
In reply to this post by Jochen Sprickerhof
Tom,


On 02/24/2011 05:33 AM, Jochen Sprickerhof wrote:
> * futureignobel<[hidden email]>  [2011-02-24 14:22]:
>> does anybody know, how to minimize the memory needed for gcc/g++ to
>> compile a particular package? I'm trying to compile the pcl_ros package
>> on a BeagleBoard-xM, but the compiler crashes each time because the
>> cc1plus process is being killed due to low memory (BB-xM has 500MB of
>> RAM). I've read a lot about this already, but found no solution. I've
>> already been able to compile openni and flann (which also caused errors).
>
> why don't you cross compile it on your workstation?

Jochen's solution is definitely the _right way_ to do this, imho.

PCL is a templated library and it might take up to 500MB / GCC translation unit to compile in release + optimizations
mode. This is unavoidable at the moment. In general, development workstations should be different than the ones you want
to deploy your code on.

PCL_ROS is using a variety of hardcore ROS concepts and PCL, and is super heavy on compile time at the moment. We've
identified a few critical parts of ROS that we will be working on improving with respect to this issue, but that might
take some time (https://code.ros.org/trac/ros/ticket/3362 for example).


We're going to start a discussion about PCL2.x and ways of improving compile time performance soon. Hopefully you can
join us! :)

PS. As usual, [hidden email] is the right forum for PCL related questions. Thanks!

Cheers,
Radu.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Loading...