Logo by mauxuam - 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 18, 2024, 09:21:19 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 5 ... 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 53537 times)
Description: success report
0 Members and 2 Guests are viewing this topic.
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #30 on: March 30, 2017, 02:57:27 PM »

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 that the crash is fixed.

I guess that problem is because the precision for re/im (and thus the view bounds, and reference too probably) is set based on re/im string length instead of being based on zoom depth as it should be - I don't know an easy fix, mainly because I don't know where all the places that view parameter strings are converted to view parameter bigfloats.
« Last Edit: March 30, 2017, 03:03:49 PM by claude, Reason: view bounds » Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #31 on: March 30, 2017, 04:02:35 PM »

Great that the crash is fixed.

I guess that problem is because the precision for re/im (and thus the view bounds, and reference too probably) is set based on re/im string length instead of being based on zoom depth as it should be - I don't know an easy fix, mainly because I don't know where all the places that view parameter strings are converted to view parameter bigfloats.

I used to set the precision in the SetPosition function, I think only the one with string parameters is important for precision
1. Check if there is an 'E' or 'e' - if it is, get the number of needed decimals from the followed number (plus some value)
2. Else, check if there is a dot, if it is, use the length to the dot as the needed decimals (plus some value)
3. Else, use the total string length
SetPosition with CFixedFloat input is used only when resetting to zoom=1, or the hidden function (Ctrl+V) that takes parameters from earlier programs I've made, which can be ignored.
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 #32 on: March 30, 2017, 09:49:46 PM »

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...
Follow the instructions on that site.  grin
The installer installs only msys2. You will need to install mingw (32 or 64 or both) and the libraries by invoking pacman from MSys2 shell (as shown in the web page).
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #33 on: April 03, 2017, 03:01:57 PM »

Finally, I've managed to compile it using Msys2/mingw64/gcc. The process was not straightforward as I expected though. I had a 2 years old msys2 installation with mingw. At the time mingw64 was installed just by following the instructions. It is not the case any more. I also couldn't compile fraktal-sft64 with it, maybe because of mingw headers issues (the compiler said so  cheesy).

So here is what I did (windows 7 OS):

1- remove the old Msys2.
2- Uploaded latest version of msys2 (msys2-x86_64-20161025.exe). This is the 64 bit version. msys2-i686-20161025.exe is the 32 bit version.
3- after running it, it installs msys2. At the end the msys2 shell is launched.
4- In the msys2 shell, invoke pacman:
Code:
pacman -Syuu
This have to be done until is says there is nothing to do anymore.
5- close the msys2 shell:
Code:
exit
6- reopen msys2 shell (from startup menu).
7- Install mingw/gcc 64 bit:
Code:
pacman -S mingw-w64-x86_64-toolchain
(one can also install 32 bit version by: pacman -S mingw-w64-i686-toolchain)
8- close msys2 shell then open "msys2 mingw 64 bit" shell (in order to have all the environment variables properly set)
9- change directory to the kalles fraktaler sources (where Makefile resides).
10- I had to modify Makefile:
line:
Code:
WINDRES := x86_64-w64-mingw32-windres
to:
Code:
WINDRES := windres
11- compile:
Code:
mingw32-make

voila!

On my PC I have to execute it this way from (msys2 mingw 64 bit) command line:
Code:
./fraktal_sft64
because it is linked dynamically to libwinpthread-1.dll. Copying this dll next to executable will make it run from the explorer.

 afro
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #34 on: April 03, 2017, 10:06:31 PM »

I used to set the precision in the SetPosition function, I think only the one with string parameters is important for precision

After this changeset the "easy deep zoom test" works now:
https://code.mathr.co.uk/kalles-fraktaler-2/commitdiff/ab17330796f2698774292ec515268c2e0dfb3325

Still trying to track down the bug about losing precision when zooming manually past e38 or so.  Where in the code do the coordinates get updated by mouse wheel zoom?  I tried inserting precision-increasing code in various places but no joy so far...

knighty I guess you compiled the 'claude' branch, any chance of instructions for the 'claude-gmp' branch too?  You need boost for the multiprecision wrappers (header-only afaik, at least I don't think I compiled boost) and GMP.  I'll update the Makefile to make it possible to set the windres program from the command line without editing.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #35 on: April 04, 2017, 12:41:47 AM »

Still trying to track down the bug about losing precision when zooming manually past e38 or so.  Where in the code do the coordinates get updated by mouse wheel zoom?  I tried inserting precision-increasing code in various places but no joy so far...
All manual zooming pass the CFraktalSFT::Zoom function.
However the actual precision controlling function is CFixedFloat::SetMaxSignificant and that is only setting the precision, globally, for the CFixedFloat class.
I always used full precision for CDecNumber (except for Newton-Raphson)
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 #36 on: April 04, 2017, 02:26:36 AM »

All manual zooming pass the CFraktalSFT::Zoom function.
However the actual precision controlling function is CFixedFloat::SetMaxSignificant and that is only setting the precision, globally, for the CFixedFloat class.
I always used full precision for CDecNumber (except for Newton-Raphson)


Good to know.  The fact that you used full precision for CDecNumber makes it more difficult to adapt the code, now that I removed the maximum precision limit.

In the GMP branch CDecNumber and CFixedFloat both wrap Boost's  mpfr_float<0>  (or similar, I forgot the exact syntax) with precision dynamic at runtime.  So I call mpfr_float<0>::default_precision(digits10)  when I want to change the global precision (shared by both types), wrapping it in a class so it resets automatically when the Precision object goes out of scope and is destructed.  I also sometimes call the .precision(digitis10) method of particular variables when I need to change it.  There is also a .precision() getter method on the Boost types.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #37 on: April 04, 2017, 12:51:13 PM »

knighty I guess you compiled the 'claude' branch, any chance of instructions for the 'claude-gmp' branch too?  You need boost for the multiprecision wrappers (header-only afaik, at least I don't think I compiled boost) and GMP.  I'll update the Makefile to make it possible to set the windres program from the command line without editing.

Yes, that was the 'claude' branch. I've just compiled the 'claude-gmp' branch without any problem. I just had to download boost:
Code:
pacman -S mingw-w64-x86_64-boost
from msys shell, then after closing msys shell and opening mingw64 shell, compile KF (from its sources directory):
Code:
cd <directory of 'claude-gmp-kf'>
mingw32-make WINDRES=windres
mingw32-make clean

There are only some warnings (as with 'claude' branch)

In order to execute it from the explorer one needs to copy libgmp-10.dll and libwinpthread-1.dll from msys64/mingw64/bin next to the generated executable (kf.exe).

BTW: The list of available mingw packages is here.
« Last Edit: April 04, 2017, 01:07:11 PM by knighty » Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #38 on: April 05, 2017, 03:37:23 PM »

I just found an embarrasing bug, that have been there all the time.
In the file main.cpp, the small "cross-hair" window is not updated if the cursor is above the cross-hair window itself.
Then the message procedure is exited, however this check is done after GDI resources are loaded, so by holding the cursor over the cross-hair window for a long time all resources eventually runs out.
Beginning on line 1754, please move the condition and return up to just after the call to GetCursorPos, like this:
Code:
...
else if(uMsg==WM_TIMER){
POINT p;
GetCursorPos(&p);
if(hWnd==WindowFromPoint(p) || hWnd==GetParent(WindowFromPoint(p)))
return 0;
...
Sorry for that...  embarrass
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 #39 on: April 05, 2017, 05:19:27 PM »

bug

Thanks for the fix!  I committed it to all 3 branches in my repository.
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #40 on: April 06, 2017, 01:32:18 PM »

I fixed some bugs (and Karl fixed one too).  And I made a page for the project, where you can download it: https://mathr.co.uk/kf/kf.html

This fix made it 90% faster for trivial zooms like the initial view: https://code.mathr.co.uk/kalles-fraktaler-2/commitdiff/d99f73c1cd4343dd2c2d627ef1d221dbfd916456
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #41 on: April 06, 2017, 06:05:15 PM »

I fixed some bugs (and Karl fixed one too).  And I made a page for the project, where you can download it: https://mathr.co.uk/kf/kf.html

This fix made it 90% faster for trivial zooms like the initial view: https://code.mathr.co.uk/kalles-fraktaler-2/commitdiff/d99f73c1cd4343dd2c2d627ef1d221dbfd916456
Cool, thanks!
I have put a link to your page in the top of my page, http://www.chillheimer.de/kallesfraktaler/
smiley  A Beer Cup  horsie riding
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
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #42 on: April 06, 2017, 07:58:03 PM »

This fix made it 90% faster for trivial zooms like the initial view: https://code.mathr.co.uk/kalles-fraktaler-2/commitdiff/d99f73c1cd4343dd2c2d627ef1d221dbfd916456
I don't understand what you fixed, is it about inflection?
That was an experiment I did, but it didn't get to work with perturbation.
I thought I had commented all of that away..?
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 #43 on: April 06, 2017, 09:16:46 PM »

I put the inflection stuff behind an if, otherwise with no inflections it was still converting from double to CFixedFloat and back again without doing anything to the coordinates.  Maybe is a version mismatch?  I recommend git for version control (other systems are available) - handy for keeping track of changes.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #44 on: May 04, 2017, 10:27:06 AM »

I made a comparison test.
I rendered stardust4ever's Magnum Opus Ex, http://stardust4ever.deviantart.com/art/Magnum-Opus-Ex-3132-6-Zooms-274474754, in 3200x3200.
My version of KF used 12m32s while your version used 3m37s, so the speed-up is 3.4 times, and amazingly more that 11,000 times faster than the original render by stardust!
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 5 ... 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 129210 Last post July 31, 2014, 12:29:56 AM
by cKleinhuis
Kalles Fraktaler 2.5.7 Kalles Fraktaler « 1 2 » Kalles Fraktaler 20 22736 Last post October 25, 2017, 07:26:34 PM
by Mrz00m
Kalles Fraktaler 2.7 Kalles Fraktaler « 1 2 3 » Kalles Fraktaler 35 32630 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 14715 Last post December 31, 2014, 12:42:33 PM
by Kalles Fraktaler
compiling Kalles Fraktaler with GCC Kalles Fraktaler 3dickulus 0 5388 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.18 seconds with 26 queries. (Pretty URLs adds 0.012s, 2q)