Hi Andrea --

>From here, our best guess is that when you say you have 4 cores, what you 
really have is 2 hardware cores that are hyperthreaded (so 2 physical 
cores x 2 hyperthreads = 4 logical cores).  By default Chapel uses 
parallelism proportional to the physical cores because, for most of our 
key benchmarks (though not all), that configuration performs better.

If this is the case, you can run in the other mode by setting an 
environment variable:

        export CHPL_RT_NUM_THREADS_PER_LOCALE=MAX_LOGICAL

(or, you can set this variable to any integer value that you like if you 
want to oversubscribe or undersubscribe your system).  For more details on 
this feature, see doc/README.tasks in the release.

----- If this guess is accurate, then you can stop reading here :) -----

The other possibility is that your /proc/cpuinfo file has a different 
format than we've seen before and we're not parsing it before.  To see 
what we're determining the number of logical and physical cores to be, you 
can compile and run the following Chapel program:

    extern proc chpl_getNumPhysicalCpus(accessible_only: bool): c_int;
    writeln(chpl_getNumPhysicalCpus(false), ' physical CPUs, ',
             chpl_getNumPhysicalCpus(true), ' accessible');

    extern proc chpl_getNumLogicalCpus(accessible_only: bool): c_int;
    writeln(chpl_getNumLogicalCpus(false), ' logical CPUs, ',
             chpl_getNumLogicalCpus(true), ' accessible');

And if you find our answers are incorrect for your system, please send us 
a copy of your /proc/cpuinfo file for reference.

Thanks,
-Brad




On Fri, 6 Mar 2015, Andrea Peruffo wrote:

> Hi Brad,
>
> a) I'm determining that is using only 2 cpus monitoring the activity of the
> process builded during execution and I can see from the top linux command a
> cpu usage of around  200% (on a maximum of 400%) for all the time(and it
> does never exceed 200%).
>
> b) running hello5-taskpar.chpl display me only 2 messages too...
>
> I have tested this also on another 4 cores i7 machine and looks the same.
>
> I have read the PERFORMANCE text and right now I'm compiling with this
> options:
> --fast-followers --fast -optimize --specialize --local --no-checks
> --no-debug --optimize-loop-iterators --optimize-on-clauses
>
>
> Hi Andrea --
>>
>> We're working towards a feature freeze deadline for the next release at
>> present, so it may be a bit before we're able to look at your code in
>> detail.  The "only using 2 CPUs" issue is surprising though.  I'm curious:
>>
>> a) How are you determining this?
>>
>> b) How many messages do you get if you compile and run
>>    examples/hello5-taskpar.chpl?
>>
>> If you haven't found it yet, be sure to read $CHPL_HOME/PERFORMANCE and,
>> if you aren't, to throw the --fast flag when compiling for performance runs.
>>
>> Hope to spend more time on this soon, but curious for your answers to
>> the above,
>> -Brad
>>
>>
>>
>> On Thu, 5 Mar 2015, Andrea Peruffo wrote:
>>
>>  Hi list,
>>> I'm pretty new to chapel and to take a taste of the language I implemented
>>> this:
>>>
>>> https://github.com/andreaTP/kmeans/tree/master/chapel
>>>
>>> I'm using chapel 1.10.0, but the overall performances are not great
>>> (around
>>> 1500 millis) and I think that the main problem is that I have a 4 cores i7
>>> laptop but I can see that only 2 CPUs are used by the program.
>>>
>>> Also my implementation can have any coding problem, due to ignorance on
>>> the
>>> language.
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to