- Index
- » Developer
- » OpenModelica development
- » Building openmodelica on Ubuntu 11.04...
Building openmodelica on Ubuntu 11.04 and using all cores
Building openmodelica on Ubuntu 11.04 and using all cores
Hello,
I am currently compiling open modelica, using the following commands:
Code:
sudo apt-get install devscripts debhelper
mkdir ~/tmp
cd ~/tmp
sudo apt-get build-dep openmodelica
apt-get -b source openmodelica
sudo dpkg -i *.deb
This needs a lot of time, because only one core is used.
How can I do this in a way, that uses all cores of my CPU?
Best regards:
Uwe Fechner
Re: Building openmodelica on Ubuntu 11.04 and using all cores
The rules file (which is a makefile) uses e.g. $(MAKE) omc mosh omlibrary
I don't have a Linux machine in front of me, but I guess if you use MAKE="make -j2" apt-get -b source openmodelica it would compile in parallel (there should be no issues; macports uses parallel builds by default). If this does not work, I guess you would need to check the apt documentation for how to override the default make command.
- sjoelund.se
- 1700 Posts
Re: Building openmodelica on Ubuntu 11.04 and using all cores
Hi,
Thanks a lot for your quick response.
Some additional remarks:
If compile openmodelica in the documented way, than one library is missing.
To fix this error, type:
> cd /usr/lib/
> sudo cp i386-linux-gnu/libsqlite3.a .
Then compiling with the following command works fine, if you have four cores:
> time MAKE="make -j4" apt-get -b source openmodelica
In this way I needed only 7 minutes instead of 23 minutes on a 3.8 Ghz
machine .
Best regards:
Uwe Fechner
- Index
- » Developer
- » OpenModelica development
- » Building openmodelica on Ubuntu 11.04...