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. June 18, 2018, 03:48:34 PM


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 [2] 3 4 ... 10   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: compiling Kalles Fraktaler with mingw  (Read 6221 times)
Description: success report
0 Members and 1 Guest are viewing this topic.
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #15 on: March 23, 2017, 01:25:06 PM »

claude, sorry for asking I have probably already asked this before, but...
Where can I get the GMP source code, so that I can complile the code you made?
Thanks 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
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #16 on: March 23, 2017, 04:10:34 PM »

https://gmplib.org/
http://www.mpfr.org/
Logged
jwm-art
Iterator
*
Posts: 171



WWW
« Reply #17 on: March 24, 2017, 01:14:32 AM »

GMP uses precisions which are multiples of 128 IIRC, whereas MPFR really is arbitrary.

Now here comes the anecdotal information:

When I was developing MDZ I didn't know if there would be any difference between images calculated using GMP or MPFR so I made it possible for the user to choose.

As a quick test I ran md5sum on two PNG images, 480x360 of the same location produced by GMP and MPFR respectively. At a coordinate beyond long-double precision (specifying 128bit precision), with fairly low detail, the checksums were identical, but at a coordinate with higher detail, there was a difference. Grain-extracting the two images shows 2 pixels differ.

Code:
cx -7.629452986011225709144911246318899918113e-1
cy 9.530800448400036754444994756219512453153e-2
size 2.508901897545227208260204484065216906272e-19

When I used to use MDZ, I alwasy used GMP as it was faster and given enough precision there was no perceptible difference.

Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #18 on: March 27, 2017, 11:29:34 AM »

Thanks
But it seems you are using "boost" since this include
#include <boost/multiprecision/mpfr.hpp>

So I downloaded boost, and in the file gmp.hpp the following line caused problems
#include <gmp.h>

The file gmp.h is not included in the boost download zip.
I found one on the internet, https://members.loria.fr/FSur/enseignement/coursCalea/gmp.h
This made me able to compile the project, however there are link error of unresolved externals:
__gmp_get_memory_functions
__gmpf_abs
__gmpf_add

I don't know where these functions are implemented, I cannot find them neither in boost or in the gmp download packages, I only find references to these functions...
Please help 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
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #19 on: March 27, 2017, 06:36:32 PM »

sorry for not mentioning the boost dep, but your issues are lower-level I think

afaik gmp.h is created when you compile gmp properly (I don't know how to do this on windows, cross-compiling from linux I just pass the right cross-compiler options to ./configure)
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #20 on: March 29, 2017, 09:40:24 AM »

sorry for not mentioning the boost dep, but your issues are lower-level I think

afaik gmp.h is created when you compile gmp properly (I don't know how to do this on windows, cross-compiling from linux I just pass the right cross-compiler options to ./configure)
Thanks.
GMP is neither supporting Windows nor Visual Studio, by purpose.
I found a pre-compiled library MPIR and I succeeded compiling the program.
However the speed is much slower with MPIR, a little slower than CFixedFloat at e1000, while your gcc-program is twice as fast.

Are you making updates on your KF version? There are some small bugs that I think you are aware of...
May I wish for unlimited precision, I think the only restriction currently is the ToText functions...?
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
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #21 on: March 29, 2017, 05:13:20 PM »

Thanks.
GMP is neither supporting Windows nor Visual Studio, by purpose.
I found a pre-compiled library MPIR and I succeeded compiling the program.
However the speed is much slower with MPIR, a little slower than CFixedFloat at e1000, while your gcc-program is twice as fast.

Are you making updates on your KF version? There are some small bugs that I think you are aware of...
May I wish for unlimited precision, I think the only restriction currently is the ToText functions...?

Maybe you can use MINGW/MSYS or similar to compile, instead of Visual Studio?  Afaik MPIR is for interval arithmetic, and will do at least twice the work as MPFR.

Yes I think precision is now only limited by the ToText static buffer - maybe would be a good time to switch to using std::string where appropriate, instead of raw char * pointers.

I'm not sure which other bugs you are referring to - I am making small changes from time to time but I have a lot of different projects to work on, haven't touched it for a few weeks I think.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #22 on: March 29, 2017, 08:02:49 PM »

Maybe you can use MINGW/MSYS or similar to compile, instead of Visual Studio?  Afaik MPIR is for interval arithmetic, and will do at least twice the work as MPFR.

Yes I think precision is now only limited by the ToText static buffer - maybe would be a good time to switch to using std::string where appropriate, instead of raw char * pointers.

I'm not sure which other bugs you are referring to - I am making small changes from time to time but I have a lot of different projects to work on, haven't touched it for a few weeks I think.

No bugs other than what you mentioned, about precision lost on manual zooming, which is not that critical anyway.

I think GMP wants to be installed by some Linux specific methods so I am not sure mingw on Windows would help.

Anyway, whenever you have the time 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
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #23 on: March 30, 2017, 03:24:59 AM »

New version, without limits on precision - note GMP has a high limit for precision (2^31-1 64bit limbs) and system RAM required to store precise numbers will also limit the reachable depth.

Downloads:

https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip (64bit Windows binary)
https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip.sig (signature)

Other changes:
- fixed the scientific notation bug that Dinkydau reported
- separate compilation (so make -j8 can use multiple cores, and small changes can recompile only the affected parts)
- deleted an operator new() that couldn't be made static and was causing strange issues
- reordered some nested loops for improved cache coherency
- fixed some "narrowing" warnings
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #24 on: March 30, 2017, 09:20:32 AM »

New version, without limits on precision - note GMP has a high limit for precision (2^31-1 64bit limbs) and system RAM required to store precise numbers will also limit the reachable depth.

Downloads:

https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip (64bit Windows binary)
https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip.sig (signature)

Other changes:
- fixed the scientific notation bug that Dinkydau reported
- separate compilation (so make -j8 can use multiple cores, and small changes can recompile only the affected parts)
- deleted an operator new() that couldn't be made static and was causing strange issues
- reordered some nested loops for improved cache coherency
- fixed some "narrowing" warnings

Thanks for this.
I'm sorry but it crash when I try to open some kfr files, example attached

* crash.kfr (7.92 KB - downloaded 17 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
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #25 on: March 30, 2017, 09:38:14 AM »

Thanks for this.
I'm sorry but it crash when I try to open some kfr files, example attached

Arrgh, you're right.  And worse, it doesn't crash 100% of the time (at least in my tests), so it's probably some race condition that will be hard to debug.  I have a hunch about what it might be, though, so will work on it today...
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #26 on: March 30, 2017, 10:26:21 AM »

Arrgh, you're right.  And worse, it doesn't crash 100% of the time (at least in my tests), so it's probably some race condition that will be hard to debug.  I have a hunch about what it might be, though, so will work on it today...

It also crash when I pass the e300 limit, where the scaling kicks in, it may be related.
I hope you find it worth solving, because the speed improvement you have achieved is really great 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
knighty
Fractal Iambus
***
Posts: 819


« Reply #27 on: March 30, 2017, 01:20:55 PM »

Great project!
I think GMP wants to be installed by some Linux specific methods so I am not sure mingw on Windows would help.
MSYS2 comes with prebuilt GMP and mpfr libraries (among lots of other libraries) so no need to compile them from sources.
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #28 on: March 30, 2017, 02:10:34 PM »

I think I fixed it:

https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.1.zip
https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.1.zip.sig

The problem I fixed was a buffer overflow - the CDecNumber::ToText() was writing '0' beyond the end of the string, a problem masked before because the buffer was very big.  I don't know what that code is doing, I hope I translated it to safe std::string operations correctly.  There may be other issues still, please test.

This build uses latest GMP release 6.1.2, I forgot which earlier version was used for previous builds.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #29 on: March 30, 2017, 02:50:37 PM »

I think I fixed it:

https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.1.zip
https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.1.zip.sig

The problem I fixed was a buffer overflow - the CDecNumber::ToText() was writing '0' beyond the end of the string, a problem masked before because the buffer was very big.  I don't know what that code is doing, I hope I translated it to safe std::string operations correctly.  There may be other issues still, please test.

This build uses latest GMP release 6.1.2, I forgot which earlier version was used for previous builds.

Crash-bug solved smiley
I have also found that there are some issues entering location parameters manually in the location dialog (Ctrl+L)
In particular the "easy deep zoom test", e.g. Re:-1.97, Im:0, Zoom:1e100

Great project!MSYS2 comes with prebuilt GMP and mpfr libraries (among lots of other libraries) so no need to compile them from sources.
I downloaded and installed MSYS2, but then what? There is a file called msys-gmp-10.dll but no gmp.h or any .lib files...
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
Pages: 1 [2] 3 4 ... 10   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Kalles Fraktaler 2.7.4 available Kalles Fraktaler Kalles Fraktaler 10 864 Last post November 30, 2014, 01:40:48 PM
by ratcat65
Kalles Fraktaler 2.7.6 available Kalles Fraktaler Kalles Fraktaler 14 2679 Last post December 15, 2014, 03:15:31 AM
by quaz0r
Kalles Fraktaler 2.7.7 available Kalles Fraktaler Kalles Fraktaler 7 1100 Last post January 23, 2015, 12:39:28 PM
by Chillheimer
compiling Kalles Fraktaler 2.7.3 on Linux with mingw Kalles Fraktaler « 1 2 » claude 24 1685 Last post December 31, 2014, 12:42:33 PM
by Kalles Fraktaler
compiling Kalles Fraktaler with GCC Kalles Fraktaler 3dickulus 0 543 Last post January 03, 2015, 09:13:24 PM
by 3dickulus

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.205 seconds with 28 queries. (Pretty URLs adds 0.018s, 2q)