Software Archive
Read-only legacy content
17061 Discussions

Is cilk slower on Linux than on Windows?

EAnde4
Beginner
664 Views

Currently, I am getting decent results with Intel 15 Cilk on Windows. However, the results is not nearly as good on Linux. My feeling is the overhead of a spawn is bigger on Linux. Any suggestions/comments?

I had expected the opposite results i.e. better results on Linux. 

I am using fairly new hardware and have tried to disable hyperthreading. Disabling hypertreading improves the result a bit but not much.

 

0 Kudos
2 Replies
TimP
Honored Contributor III
664 Views

I don't see a consistent relationship between linux and Windows performance of cilk_for, on a Nehalem style CPU with HT disabled.  There are more cases where linux is faster, but a few where Windows is slightly faster consistently.  On a multiple CPU platform, if it happened that one OS was more consistent about preferring the same CPU, I would not be surprised to see a difference.

0 Kudos
EAnde4
Beginner
664 Views

It turns that a large part problems is caused by some locks/mutexes that cause the issue. For some reason the penalty with locks on Windows is small whereas on Linux the locks kills the performance. 

I first got Vtune up and running on Linux today and it helped me pinpoint the problem.

 

0 Kudos
Reply