It is currently Sun Oct 11, 2026 3:30 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Wed Aug 28, 2013 11:56 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
No problem David. I like being a beta tester when I can do it :)

A question. Does the code is very different in each filter, regarding multi core support?

That must be a laborious task to do those modificacuiones in each filter.

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Wed Aug 28, 2013 12:11 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
YAFU : Well, I'm able to introduce parallelization in some filters quite quickly, because I've done a generic routine which simply divide an image in four quarters, and apply the filter on each of these four quarters simultaneously (in different threads). The resulting image is then recombined afterwards from these 4 processed quarters.
And this simple technique can be used in a lot of filters without much troubles.
By the way, it's not exactly perfect quarters as I allow some pixel overlapping between the processed quarters, so that filters needing neighboring pixel information can render something nice, without weird effects at the quarter borders.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Wed Aug 28, 2013 12:16 pm  (#23) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I tried with my laptop,Dual core, speed is not double but anyway is much faster

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Wed Aug 28, 2013 12:44 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12850
Ronounours wrote:
Arghh. Just found a bug when trying to parallelize the 'Rodilius' filter. Calls to the FFTW3 library functions are not thread-safe, and doing this simultaneously in multiple threads make the library crash. I've fixed it, but I'll need to recompile the binary packages to fix it definitely.
Sorry for people who installed the beta :) (but after all, this was a beta, so there are some risks to use it!).


Will disable the multi-process option when running Rodilius then until I can get a up to date compile. Definitely still appreciate your efforts on this David and look forward to the speed improvements as all presets gets this ability. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 11:15 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
I've updated the source and binary files for the 1.5.7.0 beta, Rodilius should now be able to run in parallel too.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 12:05 pm  (#26) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
I just updated the filters list and G'Mic now crashes when I try to run the Rodilius filter, I didn't actually get a chance to run it as the crash happens as soon as I hit on the Rodilius link in the filters list.
I tried a few of the other filters and it appears to run them okay, dream smoothing was one and smooth anisotropic was another.
Though it was best to post the results of my updated G'mic install.
Running Linux Mint 15.

Image

_________________
Image

DeviantArt gallery


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 12:09 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
I finally found time to install and test-run it.
Image size 3650X3296 RGBA
Filter Anisotropic Smoothing
Render times: single thread 00:01:19:96
multi-core, multi-thread 00:00:20:56

Stunning!!! 6x times faster!!!
Win 7 64-bit, i7-3770K @3.5GHz here


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 12:18 pm  (#28) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
Caz wrote:
I just updated the filters list and G'Mic now crashes when I try to run the Rodilius filter, I didn't actually get a chance to run it as the crash happens as soon as I hit on the Rodilius link in the filters list.

Worse results for me, as GIMP core dumps as soon as Rodilus is selected. Running Fedora 19 (x86_64).

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 1:33 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
gnutux : did you try to install the latest version (from today!).


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 1:38 pm  (#30) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
I'm using 1.5.7.0 Beta (x86_64). Perhaps the 64bit version has not been updated.

This is the error I get when I select rodilus..

Quote:
*** Error in `gimp-2.8/plug-ins/gmic_gimp': double free or corruption (fasttop): 0x00007f926c0780f0 ***
/.gimp-2.8/plug-ins/gmic_gimp: fatal error: Segmentation fault

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 1:49 pm  (#31) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
yes, the 64bits version of samj has not been updated today.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 1:50 pm  (#32) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
Ah, OK, that explains it. :bigthup

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 1:51 pm  (#33) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
I have compiled the new beta version to 64 bits. Rodilius is working well with parallelization.
Image

thanks!

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 2:06 pm  (#34) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Anyway the speed boost does not seem as good as it with smooth anisotropic filter.

Rodilius one core: 17sec
Rodilius Parallelization: 13sec

In the system monitor I can see that I have only two cores working at maximum at the same time. Is this filter limited to two cores?

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 2:08 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
The problem is that Rodilius uses some function of the FFTW library, which is *not* thread-safe. So basically, all FFTW operations are done sequentially, and you loose quite a lot of speed in doing that.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 2:11 pm  (#36) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Oh, I see

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Fri Aug 30, 2013 5:49 pm  (#37) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
I've noticed that the result in Rodilius is not the same with parallelization:
Image

Source:
Image

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Sat Aug 31, 2013 8:13 am  (#38) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

Update the G'MIC beta version for Win 64-bit - August 30, 2013
http://www.aljacom.com/~gmic/gmic-beta_ ... ts_win.zip


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Sat Aug 31, 2013 9:36 am  (#39) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12850
Just what I was waiting for Samj. The progress bar doesn't work, but the filters do and that's all that really matters to me. Thanks a heap. Do see a speedup in Rodillius; not much but still a speedup. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Parallelization in next G'MIC [1.5.7.0]
PostPosted: Mon Sep 02, 2013 10:25 am  (#40) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Updated filters to allow the use of up to 8 cores for parallelized filters.
Anyone able to check the speed gain, if any ? :D

Attachment:
gmic_8cores.png
gmic_8cores.png [ 273.58 KiB | Viewed 1633 times ]


Top
Post new topic Reply to topic  [ 81 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group