Software Archive
Read-only legacy content
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 토론

Set Worker on Windows with Intel Core i3

Tam_N_
초보자
871 조회수

Hi all,

I have used Cilk Plus to make my code computing parallel. But PC is installed Windows XP3, Intel Core i3, how many workers should I set to make the best performance for my code ?

Thanks of all,

Tam Nguyen

0 포인트
3 응답
Barry_T_Intel
직원
871 조회수

You're probably best off letting the Cilk runtime determine how many cores there are on the machine. By default it will create a worker per core.

Assuming that you've exposed enough parallelism, the workstealing scheduler should distribute the workload to the cores efficiently. A rough estimate is that there should be approximately 10*C tasks, where "C" is the number of cores on your system. But don't spend too much time tuning that. You probably want to have some extra tasks, so if you move your workload into a system with more cores, there is enough parallelism to keep that system busy too.

If you use a cilk_for loop, it will automatically break your range into approximately 8*C tasks, assuming your range is large enough.

   - Barry

0 포인트
Tam_N_
초보자
871 조회수

Hi Barry,

I control breaking my range by using #pragma grainsize = expression to set the grain size for one cilk_for loop,  but compiler throws  an error "It is a # pragma that can not be identified: warning # 161". How can I resolve it ?

Thanks and Best Regards,
Tam Nguyen

 

0 포인트
Barry_T_Intel
직원
871 조회수
0 포인트
응답