Re: Lightening up GraphicsMagick

"Nguyen Vu Hung" <[email protected]> Fri, 31 Oct 2008 14:22:31 +0900
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Fri, Oct 31, 2008 at 1:36 PM, Bob Friesenhahn
<[email protected]> wrote:
> On Fri, 31 Oct 2008, Nguyen Vu Hung wrote:
>
>> Just take a look at the ChangeLog and I notice that the
>> openmpsupport in GM 1.3is a hightlight.
>
> Glad to hear from you. I was afraid that we lost you. :-)
>
> Yes, OpenMP/multi-core is clearly the focus of this release.  I have
> started the various test builds necessary to make sure that the
> software still works on a wide variety of systems and hardware.  It
> should not be terribly long (probably within a week) before release.
The feature I am interested in MG is color quantization.
Last I checked 1.3.020081028 there was no openMP support in magick/quantize.c
Do you have a plan making it openMP-aware?

>
>> I have a Pentium 4 3.GHz single CPU and a HP xw6200 xeon 3.8GHz dual
>> CPU.I am a openMP novice but if I know how to test openmp feature of
>> GM1.3, I will do.
>
> If your hardware is running modern Linux with GCC 4.2 or later, then
> it is really trivial to test GM with OpenMP because it just works.
> Otherwise the main challenge is to get the right compiler installed.
Installing gcc is not a problem for me. Actually I have gcc 4.2.4 installed
from source code and default gcc 4.1.2 on my CentOS 5.

> If you are using Windows then there is much more challenge since I
> have not built the software with OpenMP under Windows and maybe there
> will be issues due to Windows more heavy-weight threading model.  I
> think that a key issue is how quickly the OpenMP implementation is
> able to able to get started and to notice when a task is done.  AIX,
> Linux and Solaris are quite good at this.  Apple's OS-X is slower.  I
> am not sure about FreeBSD since I don't know if the poor performance I
> have observed is due to old hardware or the OS.
I can do some build tests but Windows XP and Linux x86 are the only OSes
that I have. Frankly, I am not familiar with Windows but the problem is.

However, IMO, you are coding and testing and you've done enough test
for GM 1.3 under Linux 86.

Have you test GM 1.3 on 64bit environement?

By "testing GM", I mean not only a simple build and sanity tests, but
some benchmark as well.

It will be useful if you can provide a/the script you'ved used to
create this speedup test:
http://www.graphicsmagick.org/OpenMP.html

Under CentOS 5, Pen 4 3.0Ghz single CPU gcc 4.2.4  1.3.020081028:

[vuhung@aoclife g++]$ for threads in 1 2 3 4; do   env
OMP_NUM_THREADS=$threads gm benchmark -duration 30 convert
    -size 2048x1080 pattern:granite -operator all divide 2.0 null:; done
Results: 198 iter 29.99s user 30.00s total 6.600 iter/s (6.602 iter/s cpu)
Results: 207 iter 58.83s user 30.08s total 6.882 iter/s (3.519 iter/s cpu)
Results: 206 iter 52.52s user 30.07s total 6.851 iter/s (3.922 iter/s cpu)
Results: 209 iter 57.52s user 30.11s total 6.941 iter/s (3.634 iter/s cpu)

As you can see, it is a single CPU box but we can observer ~2x speedup
thanks to hyper-threading in Pentium 4.


-- 
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype: vuhung16dg
A brief profile: http://www.hn.is.uec.ac.jp/~vuhung/Nguyen.Vu.Hung.html
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Graphicsmagick-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core