[Insight-users] Building ITK with multiple cores

Oleksandr Dzyubak adzyubak at gmail.com
Wed Oct 21 09:48:23 EDT 2009


Hi Bill,

I have 16 core Linux 64 bit machine with 128 GB memory.
Last time (about a year ago) I spent  some time on testing "multi-core" 
compilation and it failed
with errors like "cannot resolve" etc...
So I concluded that cmake is restricted to one core only and did not try 
"multi-cores" ever since.

Well, reading these emails, I was tempted to give it a try once again. 
So I did.
I downloaded InsightApplications-3.16.0 and to make it even harder,
I compiled it with "make -j". I was surprised very much.

Vesrus several hours, it was done in several minutes.
All 16 cores were 100% loaded all the time and it took about 20 GB of my 
memory.
Early days it always complained about "unresolved dependencies" but now
it just says "Waiting for unfinished jobs". Fantastic!

Thanks,

Alex


Bill Lorensen wrote:
> It should work. CMake should handle it, although I have seen
> intermittent problems with the intel compiler on linux.
>
> For the time being you can do:
>
> make -k -j3;make -k -j3;make -k -j3;make -k -j3;
>
> You can file a bug report, but this is a pretty low priority item.
>
> Bill
>
> On Tue, Oct 20, 2009 at 2:45 PM, David Doria <daviddoria+itk at gmail.com> wrote:
>   
>> Typically I build big projects with
>> make -j3
>>
>> to utilize my dual core machine for the build process.
>>
>> I tried building ITK today and I got this error:
>>
>> Linking CXX static library ../../../../bin/libitkvnl.a
>> [ 32%] Built target itkvnl
>> make: *** [all] Error 2
>>
>> where 'make' in a single thread worked just fine. I'm sure it is a
>> problem with something like "B depends on A so A must be built first"
>> - is there a way to specify these dependencies in the cmake file? Or
>> what (if anything) is typically done to allow these multi-thread
>> builds? Or do you guys just recommend not doing this and simply using
>> 'make'?
>>
>> Thanks,
>>
>> David
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>     
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>   



More information about the Insight-users mailing list