There is more than one way to improve the performance of
your code.  Do you have a small snippet with input data and
expected output that represents your performance problem?

--Chris



On Fri, Mar 28, 2014 at 6:22 PM, vine xf <[email protected]> wrote:

> Well, Thanks! after try this:
>
> set_autopthread_targ(2);
> set_autopthread_size(0);
> perl.exe takes 60% CPU time now, its trying to make use of both core now.
> But total exec time is 52sec, 2 sec longer. I will look detial into
> ParallelCPU.
> html and Core.html a little later.. Maybe my code is not suitable for 2x
> accelerating?
> BTW is there any typical PDL sample code that is suitable for multicore
> accelerating?
>
> Xiaofang.
> On Fri, Mar 28, 2014 at 9:35 PM, Ingo Schmid <[email protected]> wrote:
>
>>
>> Hi,
>>
>> maybe you are looking for this?
>>
>> http://pdl.perl.org/PDLdocs/ParallelCPU.html
>>
>> Ingo
>>
>>
>> On 03/28/2014 02:07 PM, vine xf wrote:
>>
>>  Thanks, After modify perldl.conf and rebuilding, my PDL is linked with
>> pthread now.
>> The site/lib/auto/PDL/Core.dll is bigger and depends on pthreadVC2.dll.
>> But hopelessly,
>> my script is not any faster at all.  I'm using a laptop with ATOM N280
>> Cpu, 2 core. My
>> PDL perl scripts use to run up to  50% cpu load, i.e. using only one
>> core. After I shifted
>> to the new pthread version, it still runs still at 50% load, takes same
>> time to run. My script
>> is doing some image signal processing jobs, include Pdlpp inline code,
>> and apply to a
>> 2M-pixel matrix. Why after enalbing pthread, it still runs on single core?
>>
>> On Wed, Mar 26, 2014 at 4:28 PM, <[email protected]> wrote:
>>
>>>
>>> From: vine xf
>>>
>>>
>>> Thanks so much. For my ActiverPerl 5.16, since I installed it from AP516
>>>> source code using VC++6, I guess may be the pre-build pdl ppm is not a
>>>> choice in my case.
>>>>
>>>
>>> Yes - if you've built perl from source, then I don't think you'll have
>>> PPM.
>>> (We could probably track down a version of PPM that's usable for you if
>>> you wanted - for example, the version that ships with recent builds of
>>> Strawberry Perl is quite serviceable. But you're obviously fairly
>>> comfortable with VC++ 6.0, so why not see how far we can get using it.)
>>>
>>>
>>> So how to install PDL with pthread manually?
>>>> I found a pthread-win32 on http://sourceware.org/pthreads-win32/ What's
>>>> the correct way to setup all these pieces. I mean, whether shall I
>>>> reinstall active perl first, or just tweak with perldl.conf to enable
>>>> pthread features?
>>>>
>>>
>>> No need to rebuild perl - but you *will* need to rebuild PDL.
>>> And yes, if you tweak perldl.conf to point to the pthreads header and
>>> library, then that should build PDL with pthreads enabled.
>>> The 'perl Makefile.PL' step should tell you whether it's going to build
>>> PDL with or without pthreads - so keep an eye on that output. If it says
>>> it's not enabling pthreads, then that probably means that you haven't
>>> tweaked perldl.conf correctly.
>>>
>>> I haven't personally tried to build pthreads-enabled PDL using a
>>> Microsoft compiler.
>>> I've built PDL using a few Microsoft compilers (including VC++ 6.0), but
>>> not with pthreads support.
>>> Let us know if you strike trouble - we might be able to help you out (
>>> .... or might not ;-)
>>>
>>> Cheers,
>>> Rob
>>>
>>
>>
>>
>> _______________________________________________
>> Perldl mailing 
>> [email protected]http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>>
>>
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to