Logo by simon.snake - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 19, 2024, 08:08:56 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 [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 53653 times)
Description: success report
0 Members and 2 Guests 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 96 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 Kalles Fraktaler « 1 2 ... 29 30 » Kalles Fraktaler 438 129646 Last post July 31, 2014, 12:29:56 AM
by cKleinhuis
Kalles Fraktaler 2.5.7 Kalles Fraktaler « 1 2 » Kalles Fraktaler 20 22808 Last post October 25, 2017, 07:26:34 PM
by Mrz00m
Kalles Fraktaler 2.7 Kalles Fraktaler « 1 2 3 » Kalles Fraktaler 35 32903 Last post October 13, 2014, 04:45:04 PM
by youhn
compiling Kalles Fraktaler 2.7.3 on Linux with mingw Kalles Fraktaler « 1 2 » claude 24 14726 Last post December 31, 2014, 12:42:33 PM
by Kalles Fraktaler
compiling Kalles Fraktaler with GCC Kalles Fraktaler 3dickulus 0 5390 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.192 seconds with 26 queries. (Pretty URLs adds 0.019s, 2q)