Logo by HPDZ - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 18, 2024, 07:59:09 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 10 11 [12] 13 14 ... 22   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Mandel Machine  (Read 44777 times)
Description: A highly efficient Mandelbrot set explorer
0 Members and 1 Guest are viewing this topic.
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #165 on: May 21, 2014, 02:28:01 AM »

That sounds amazing!  shocked

The location has minimum 377372 and maximum 378486 iterations.
The difference is 1114, so I guess you need to calculate at least that amount?

KF can skip 310508 iterations, but renders this in 640x360 in 6 minutes, which is "only" 150 times faster than FX, not considering hardware... smiley
Long double is used for this location, which breaks KF if the maximum number of iterations is set lower than 310508

Here are my measurements for this location in 640x360, using different levels of SA:

Number of terms |Skipped iterations |Time to initialize SA |Time to calculate iterations |Total time (including overheads & reference calculation)
6310504118 ms9066 ms11030 ms
10339736246 ms2620 ms4684 ms
18359880697 ms862 ms3401 ms
343689682257 ms466 ms4536 ms
663729528465 ms340 ms10667 ms
13037352035856 ms422 ms37687 ms
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #166 on: May 21, 2014, 02:38:55 AM »

Amazing speedup! grin What do you mean only the iterations after series approximation are kept in memory? I thought the amount of iterations you can skip with SA varies from pixel to pixel. Or do you set some minimum threshold of iterations to skip with SA, and if SA is not effective enough for a pixel, you try a new reference point?

The number of iterations skipped with SA is constant for the whole image. No per-pixel evaluation is done currently. The memory savings come from the fact that if N iterations will be skipped (for all pixels), there is no need to store the first N values of the reference orbit. (Although this is not yet implemented in the current beta version.)
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #167 on: May 21, 2014, 10:04:44 AM »

I got the attached error.
When clicked, the browser takes me to a Java download page.
However even after I downloaded and installed the latest version of Java, the same error pops up...


* err.png (3.12 KB, 371x126 - viewed 429 times.)
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #168 on: May 21, 2014, 11:00:01 AM »

Did you download the 64-bit version? The installed version can be verified with this command:
java -version

You should see something like this:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)


It is also possible to have multiple JREs installed, both 32 and 64-bit. In this case you have to check the presence of the 64-bit version in the Program Files folder. 64-bit JREs should be under Program Files\jre, 32-bit JREs under Program Files (x86)\jre.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
hapf
Fractal Lover
**
Posts: 219


« Reply #169 on: May 21, 2014, 11:00:44 AM »

Are you storing the coefficients with arbitrary precision? Do you compute the start value with skip with arbitrary precision?
Logged
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #170 on: May 21, 2014, 11:22:25 AM »

Are you storing the coefficients with arbitrary precision? Do you compute the start value with skip with arbitrary precision?

I use an own class called ASFloat (arbitrary scale float). It is similar to Kalle's floatexp type. It stores numbers in mantissa*2exponent format, where mantissa is a normalized double value (1<=mantissa<2) and exponent is an integer. The precision of this type is the same as that of double (52 bits), but the scale is much larger (32 bits compared to 11 bits of double or 15 bits of extended precision). All calculations related to SA coefficients are done using ASFloats, and the resulting coefficients are also stored in ASFloats.

MM can also be forced to calculate iterations using ASFloats by setting the Scale to 2000000000 (ASFloat) and Pixel grouping to 1 in the Computation box.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
hapf
Fractal Lover
**
Posts: 219


« Reply #171 on: May 21, 2014, 11:54:42 AM »

Are there somewhere descriptions how to implement +/-/*/square with such types using hardware double and integer operations in C?
Logged
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #172 on: May 21, 2014, 12:42:21 PM »

I don't know about such descriptions. The basic operations are pretty straightforward. Multiplication is done by multiplying the mantissas and adding the exponents. Addition and subtraction is done by rescaling the smaller term to match the exponent of the larger one, and then adding/subtracting the mantissas (the exponents remain unchanged). Some additional logic has to be implemented to handle zero values (which have no meaningful exponent), and the results have to be normalized every now and then to avoid over/underflow of the mantissas.

You could also look up the details in the source code of Kalles Fraktaler.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #173 on: May 21, 2014, 01:14:09 PM »

You could also look up the details in the source code of Kalles Fraktaler.
Thanks for that, and you've done amazing improvements on it, since it is about 10 times faster than mine?
And indeed much faster than using long double!
SIMD, no C++ operations, normalization only when needed, assembler, etc?

I got the 64-bit Java environment installed now, found it on http://java.com/en/download/manual.jsp
I found some issues with the location that was given by simon.snake, zoomed further a little bit to 1448.
The approximation breaks and it get very slow when it is changed, fewer terms makes it a little better but it is distorted unless approximation is turned off completely.
I don't quite follow your description on how you determine how many iterations you can skip.
In KF I simply use a couple of reference pixels, in the corners, calculated with perturbation starting from iteration 0, and compare how many iterations that get correct within a given tolerance, about 0.1%.

Did you remove all auto-glitch correction? Anyway, if you implement Pauldelbrot's method your program will be super! smiley
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #174 on: May 21, 2014, 02:17:01 PM »

Thanks for that, and you've done amazing improvements on it, since it is about 10 times faster than mine?
And indeed much faster than using long double!
SIMD, no C++ operations, normalization only when needed, assembler, etc?

At what location and zoom level did you measure the 10x difference? MM uses automatic scale reduction whenever possible, and this makes comparisons a little trickier. The basic idea is the following: when calculating a perturbed orbit, the magnitude of its absolute value grows steadily (with some small jumps up/downwards and some bigger jumps downwards) from delta0 to the bailout value. The rate of the growth is also increasing as we approach the bailout.

In the classical algorithm without SA, if |delta0| < 10-308, long double must be used to avoid underflow. But if SA can skip N iterations where N is large enough (more than 90% of the length of the reference orbit), the approximated value will likely be in the range of doubles: |deltaN| > 10-308. If "Ignore small addends" is turned on, delta0 is no longer added to the calculated deltai (since delta0 is tens or hundreds of magnitudes smaller), and all the iterations can be calculated using doubles*. This also enables the use of SIMD codepaths, resulting in a further 2x-8x speedup.

* There is one more thing to check: the previously mentioned bigger downward jumps in log|deltai| are caused by sudden drops in the magnitude of the reference orbit (|Zm|). So we have to be sure that minValue = |deltaN| * minm>N|Zm| > 10-308

This method can also be taken one step further: if minValue > 10-38, the remaining iterations can be calculated using floats instead of doubles, increasing the speed further by up to 2x when using SIMD. (This is not yet enabled in the current beta.) And also in the opposite direction: if minValue is between 10-600 and 10-308, scaled doubles can be used, which are a little slower than ordinary doubles, but much faster than long doubles.

I found some issues with the location that was given by simon.snake, zoomed further a little bit to 1448.
The approximation breaks and it get very slow when it is changed, fewer terms makes it a little better but it is distorted unless approximation is turned off completely.

I will have to check this. Maybe the normalization has to be done more frequently.

I don't quite follow your description on how you determine how many iterations you can skip.
In KF I simply use a couple of reference pixels, in the corners, calculated with perturbation starting from iteration 0, and compare how many iterations that get correct within a given tolerance, about 0.1%.

I found that checking the corners only is not always enough. In fact, when the image is centered on a julia, there are some cases when the borders are rendered correctly but the center is corrupted due to the SA skipping too many iterations. Evaluating the skippable iterations on small regions locally might help, but it would also be more costly.

Did you remove all auto-glitch correction? Anyway, if you implement Pauldelbrot's method your program will be super! smiley

Yes, I had to disable glitch correction, as I mentioned under Known issues in the changelog. I started to implement Pauldelbrot's method, but the whole thing is in an intermediate state now, and neither the old nor the new method works correctly.
« Last Edit: May 21, 2014, 05:41:31 PM by Botond Kósa » Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #175 on: May 21, 2014, 03:13:14 PM »

At what location and zoom level did you measure the 10x difference?
This was on the Magnum-Opus location.
With pixel grouping=1 and SA=6 terms, which is comparable with KF, MM calculates this in 43 seconds and KF in 6 minutes.
Is MM using long double or ASFloat for this?

I found that checking the corners only is not always enough. In fact, when the image is centered on a julia, there are some cases when the borders are rendered correctly but the center is corrupted due to the SA skipping too many iterations.

Yeah, I also found that corners is not enough and I have added pixels on the middle top, bottom, right and left, in total 8 test pixels, in the eventual next version of KF. If one of them fails the tolerance, that's where the limit is set.
But my problem were locations at the <-2,0i> spike and not at embedded julias. I never had problems with that the borders but not the center were rendered correctly.
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #176 on: May 21, 2014, 03:48:18 PM »

This was on the Magnum-Opus location.
With pixel grouping=1 and SA=6 terms, which is comparable with KF, MM calculates this in 43 seconds and KF in 6 minutes.
Is MM using long double or ASFloat for this?

It is using long double or ordinary double, but definitely not ASFloat. It should use ordinary double because at that location scale reduction is possible, but I am not sure I implemented it when pixel grouping is 1. But you can disable scale reduction and force the program to use long doubles by changing Scale (in the Computation box) from Automatic to Extended. (You can also force it to use ASFloat, by the way.)

My extended routines are written in ASM, but no SIMD is used (SIMD instructions work on floats and doubles only). You mentioned that you used DevC++ to implement the long double calculations, since MS VC++ does not support long doubles in 64-bit mode. I also tried DevC++ a few years ago (albeit for a different purpose) and found that the code produced by its compiler was quite slow.

According to my measurements on my dual-core Ivy Bridge laptop, the throughput of KF using long doubles is about 70 million iterations/second. This is comparable to MM using ASFloats (which also depends on the JRE used, since ASFloat is pure Java for the time being). The throughput of MM using long doubles is above 500 million iterations/second.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
hapf
Fractal Lover
**
Posts: 219


« Reply #177 on: May 21, 2014, 05:35:18 PM »

Yeah, I also found that corners is not enough and I have added pixels on the middle top, bottom, right and left, in total 8 test pixels, in the eventual next version of KF. If one of them fails the tolerance, that's where the limit is set.
But my problem were locations at the <-2,0i> spike and not at embedded julias. I never had problems with that the borders but not the center were rendered correctly.
I always subsample the whole image to decide what skipping is acceptable.
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #178 on: May 21, 2014, 11:29:45 PM »

In the previous version of Mandel Machine I was having this glitch. It appears when 0 or 6 terms are being used for the series approximation. Note that it happens even with 0 terms! 10 terms (or any more than that) now gives the correct result.



The parameter file is attached to the post as .txt for reference.

Interesting: as I zoom deeper, I now need more and more terms for the render to be correct.

* Star_deformed.txt (1.5 KB - downloaded 97 times.)
« Last Edit: May 22, 2014, 12:07:58 AM by Dinkydau » Logged

Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #179 on: May 22, 2014, 06:15:13 PM »

In the previous version of Mandel Machine I was having this glitch. It appears when 0 or 6 terms are being used for the series approximation. Note that it happens even with 0 terms! 10 terms (or any more than that) now gives the correct result.

I tried your location and found no glitches when no SA was used.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Pages: 1 ... 10 11 [12] 13 14 ... 22   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandel FractalForums.com Banner Logos fractalwizz 0 1974 Last post October 13, 2009, 08:08:07 PM
by fractalwizz
Mandel Machine - some questions Others simon.snake 4 3632 Last post April 21, 2014, 08:14:13 PM
by simon.snake
Mandel Machine Zoom Test 2^278. Movies Showcase (Rate My Movie) SeryZone 6 2356 Last post December 01, 2014, 06:41:16 PM
by SeryZone
Mandel Machine storing thousands of items in history folder. Mandel Machine stardust4ever 0 1507 Last post March 20, 2016, 12:37:17 PM
by stardust4ever
Whither Mandel Machine Mandel Machine Pauldelbrot 2 3257 Last post January 04, 2017, 02:52:02 PM
by Kalles Fraktaler

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.236 seconds with 30 queries. (Pretty URLs adds 0.008s, 2q)