Is it possible to declare data types for a cluster profile?

조회 수: 1 (최근 30일)
Steven Evans
Steven Evans 2015년 12월 26일
댓글: Steven Evans 2015년 12월 27일
I have an 8-core FX-8320E AMD processor. When I run the "parpool" command, it only creates a pool for 4 cores. I have learned that the processor has 8 integer cores and 4 floating-point cores. My algorithm doesn't have to work on floating-point numbers. Is there any way to create a profile that will allow me to create a pool that will use all 8 cores?
Thanks for your time, and for any input that anyone is willing to provide.

채택된 답변

Walter Roberson
Walter Roberson 2015년 12월 26일
You cannot declare datatypes for a cluster. You can change your code to relentlessly use integer operations, including enclosing all of the constants in appropriate casting, like
X = X + int32(1);
Note: integer division A./B is defined to have the same result as cast(double(A)./double(B), class(A)) which might require a floating point unit.
  댓글 수: 1
Steven Evans
Steven Evans 2015년 12월 27일
Thanks so much for your help, including the link which you've provided. It's exactly what I needed.
I knew that the number of cores could be specified, but I didn't think I could just specify 8 since the "parpool" command only showed 4. I also wasn't aware of the "feature('numcores')" command that gives more detail concerning the different types of cores that are available.
After setting the number of cores to 8 in the profile manager, my program runs well now with all 8 cores. I didn't even have to change my data types to integers.
So thanks, once again, for your tremendous help. It's exactly what I needed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by