Archive for the ‘Linux’ Tag

New Release of Fractal Software   Leave a comment


Saturn and Titan 4.2.0 has been released, it has 4 new fractal types. In addition Neptune and Triton 1.1.0 has been released, it has 11 new fractal types.

Here are the new splash screens for Saturn and Neptune.

saturn-splash

neptune-splash

As usual versions for Linux and Windows are available.

Advertisements

Posted 15 September 2014 by element90 in Fractal, Software

Tagged with , , , ,

When is C++ long double not long double?   3 comments


When the compiler is Microsoft’s. The data type long double exists and can be used but there is no difference between long double and double.

Saturn and Titan have been developed on Linux using the g++ and clang++ compilers, long double occupies 128 bits (only 80 bits are used) and double occupies 64 bits. I used the long double datatype because it allowed deeper zooms than double before the generated picture degrades due to lack of precision. I introduced code to check the required precision to correctly generate fractals as the level of zoom increased, the initial shift from long double works most of the time, for some reason when long double is in fact double it doesn’t. Update: the example fractal illustrating the problem doesn’t shift to multi-precision because it is one of those fractals that the automatic mechanism doesn’t work, zooming in further with the Linux version exhibits the same problem it just does it later because of the greater precision of long doubles.

For Windows versions of Saturn and Titan the testing was cursory so I missed this problem which is present in all released versions of Saturn and Titan to date.

The problem is best illustrated using two screen shots of the yet to be released version 4.0.0 of Saturn, one running on Windows and the other on Linux.

Saturn 4.0.0 on Windows 7

Saturn 4.0.0 on Windows 7

Saturn 4.0.0 on Linux

Saturn 4.0.0 on Linux

So I now have to add code to Saturn and Titan to account for Microsoft defining long double as double.

Saturn and Titan Version 4.0.0 Release Delayed   Leave a comment


The release of the new versions of Saturn and Titan is delayed due to two issues, performance and my iMac 24″ (2008).

Here is an example picture to illustrate the performance issue:

Lyapunov 24

Lyapunov 24

While testing the new versions of Saturn I had been comparing completion times with version 3.0.1, which generally showed an improvement. There were some cases where there was no improvement and by the time Saturn and Titan 4.0.0 is ready to be released there will probably still be some cases where version 3.0.1 is still better. Out of interest I tried version 2.1.4 and discovered that it was much faster than version 3.0.1 and what will be version 4.0.0. The seed file (750×500) for the picture above took longer using version 4.0.0 than versions 3.0.1 and 2.1.4. Since version 3.0.0 there have been two calculation modes, “progressive” and “row-by-row” prior to that there was only progressive, the times (in seconds) for version 4.0.0 were about 95 (progressive) and 25 (row-by-row), for version 3.0.1 they were 90 and 35, finally the time for version 2.1.4 was 75. The times were obtained under heavy load i.e. 100% CPU usage, two long timescale runs (one of Saturn, one of Titan) were in progress, the CPU is a quad core i7 running at 3.4GHz and the operating system is Linux Mint 14.

For the default Mandelbrot with dimensions 750 by 500 I went back further, the following times were obtained by allowing Saturn as much CPU time as possible:

Saturn version progressive row-by-row
1.0.2 23.7 n/a
1.1 23.6 n/a
2.0.1 7.6 n/a
2.1.4 7.5 n/a
3.0.1 9.2 3.5
4.0.0 beta 12.7 1.9

Comparing the times on Windows and OS X were worse, OS X especially so. Clearly performance had to be addressed before releasing the new version. It has taken a while but on Linux performance has been improved.

For Lyapunov 24, under the same conditions as before:

Saturn version progressive row-by-row
3.0.1 93.7 35.5
4.0.0 beta 58.9 24.9

For the default Mandelbrot, 5000 iterations, 750×500 and the same conditions as Lyapunov 24:

Saturn version progressive row-by-row
3.0.1 38.1 13.7
4.0.0 beta 24.9 6.0

I was ready to try out the changes I made to Saturn on OS X and Windows, but before I could my iMac became relatively useless. The only way I have of preparing the Windows 7 version of Saturn and Titan is by way of a virtual machine running Windows 7 hosted by OS X, so the problem with the iMac currently prevents me from progressing with both the Window 7 and the OS X version.

A couple of day ago the iMac locked up and a few minutes later rebooted itself and then part way through booting OS X it displayed “You must restart your computer”. Not good. My iMac is set up to dual boot OS X and Linux. I tried booting from the various installation media, OS X Leopard and Snow Leopard discs and an OS X Lion USB stick, booting from either of the installation discs failed as part way through the boot process the aforementioned message was displayed, when booting from the USB stick it boots into Linux instead. Booting into Linux fails due to X windows not successfully running, the appearance of the screen varies depending on whether I boot the installed Linux or from a Linux installation dis, one of following happens: a grey screen a small black box, random coloured blocks or an image corrupted by thick horizontal lines. At one point a Linux boot breifly abandoned trying to run X windows and displayed a message about a faulty GPU before having an other go at running X windows. Later on booting from Linux installation discs just displayed a cursor in the top left hand corner.

Unfortunately the subversion repository for Saturn and Titan was in a Linux virtual machine hosted by OS X on the iMac and the backups for that and some other files are a little out of date. At was not lost however: disabling X windows on Linux allowed me to boot Linux to the command line and I copied all the files I needed onto an external disc. The VMware virtual machine containing Linux was easily converted to a VirtualBox virtual machine running on Linux so I now have access to the subversion repository, no such luck with the Windows, when the converted virtal machine is run it briefly produces the well known “blue screen of death” and then it states that Windows can’t boot and needs to repair and on completion of that process says it can’t boot and needs to be repaired. I suspect the VMware Windows virtual machine is OK provided it is run by VMware Fusion, which I only have on OS X.

To continue with Windows 7 I have to start afresh with a new install and then I need to find and install all the development tools I used to create a Windows installer for Saturn and Titan. For OS X the options are either repair or replace the iMac.

I haven’t lost anything in regard to development of Saturn and Titan except time. The release of Saturn and Titan version 4.0.0 is delayed and I’ve no idea how long that will be.

Posted 12 July 2013 by element90 in Development, Software

Tagged with , , , ,

Goodbye Ubuntu   Leave a comment


In the past, say 20 or years ago, releases of versions of operating systems were few and far between and the changes to the user interface were minor because the interface was text based. With the advent of operating systems with graphical user interfaces the pace of releases of operating systems accelerated, new versions of Windows were released at a relatively slow rate, Apple operating systems were released more quickly and accelerated with the advent of OS X and releases of Linux distributions settled down to about two releases a year with some exceptions (e.g. Debian).

I’ve been using Ubuntu since version 4.10 (October 2004). I had tried several other distributions and the other main free operating system, FreeBSD, most of those systems defaulted to KDE which I’ve never liked, Ubuntu 4.10 defaulted to Gnome 2 and was the first Linux distribution I was happy with once it had been installed as it required little or no tweaking. Over the years I tried each new release at six monthly intervals, Gnome 2 improved release after release until it reached version 2.32. I’ve been using Ubuntu 10.04 LTS (long term support) for development of my software since I released my software into the wild. I’ve tried out newer versions of Ubuntu and to my dismay Canonical decided to change the default Ubuntu desktop from Gnome 2 to Unity which I don’t like at all. To make matters worse Gnome 2 is no longer being developed and Gnome 3 has replaced it and I don’t like that either …

Gnome 2 allowed me to have a nice uncluttered desktop:

Gnome 2 on Ubuntu 10.04 LTS

Gnome 2 can be setup so that there are no icons on the desktop instead they can be added to the top panel. Also on the top panel is a useful system monitor applet. I’ve shown a Nautilus (file manager) window as I will have something to say about that later …

Gnome 3 is tied to the capabilities of the computer’s graphics card and if the minimum requirements are not met it reverts to “classic” mode, I mostly run Linux in virtual machines on OS X so “classic” mode is what I get, here is a Gnome 3 (classic) desktop:

Gnome 3 (classic) on Ubuntu 12.04

In classic mode we get the usual two panels one at top and one at the bottom. Unlike Gnome 2 you can’t right click on a panel to add program launchers or applets, having said that you can see that there is a single “screenshot” icon on the top panel, for some reason you can drag a icon from the menu to the panel, however, that is all can do, you can not move or or indeed remove it. The system monitor applet is not available, this is annoying as I find it very useful. Also shown is the new version of Nautilus which lacks a couple of features I’ve been using for several years and they are:

  • A background pattern or texture could be set which was displayed behind the folder and file icons.
  • Emblems could be displayed with folder and file icons, I used a couple of these to indicate that the file had been uploaded to DeviantArt or Red Bubble.

An other feature I dislike is the way the scroll bar is handled (this is an Ubuntu feature not Gnome 3), there is a thin line at the right hand side and a couple of up and down buttons which only appear when the cursor is near, in addition, the position of the button changes if the widow is scrolled and the buttons are allowed to disappear. I find it much easier having a fixed location for the up and down buttons. An other problem I’ve had with Ubuntu 12.04 is that it is virtually impossible to resize windows as the special cursor indicating that window can be resized disappears as soon as the mouse button is pressed so the window can’t be resized.

Ubuntu 10.04 LTS is supported until April 2013 so a new version of Linux is required before then. Fortunately there is a solution and that is Linux Mint Debian Edition (LDME) which has Cinnamon and MATE as its desktops environments, Cinnamon works with Gnome 3 so that it is more like Gnome 2 and MATE is a fork of Gnome 2.

Here is the MATE 1.2 desktop:

MATE 1.2 on LMDE

MATE has renamed the old Gnome 2 applications that were shipped with Gnome 2, Nautilus is called Caja and was supposed to be based on the Gnome 2.32 version but is definitely based on the Gnome 3 version because it looks the same as the Gnome 3 version and lacks the two features I mentioned earlier. I looked at MATE when it was version 1.0 and it was definitely rough around the edges, the system monitor applet was missing, happily, it has reappeared with version 1.2. So the only issue I have with MATE 1.2 is that Caja is missing the two features that were formerly available with Nautilus on Gnome 2, I can put up with that.

As Cinnamon works with Gnome 3 is is only properly available when the minimum graphics card requirements are met. Cinnamon like Gnome 3 can’t be run in a virtual machine, I tried Gnome 3 out at the end of last year by installing it on the iMac’s main disc and running it natively to try out Cinnamon I had replace the old native Ubuntu 11.10 with LDME so I can only show a screenshot of Cinnamon and not a screenshot of Gnome 3.

Here is the Cinnamon desktop:

Cinnamon on LDME

It’s relatively early days for Cinnamon but is looking promising and is great improvement over Gnome 3. Unlike Gnome 3 Cinnamon provides a means of having the traditional 2 panel arrangement found with Gnome 2 AND program launchers and applets can be added (moved and removed) from the panels, as yet there is no system monitor applet (not available with the default install, more applets are available at the the Cinnamon website, see link below). There is a sight problem with the menu at the top left hand side and that is the word Menu is truncated when program launchers are added to panel which is why I’ve disabled its display.

LDME is a “rolling” release which means there never will be a release with a specific version number, there are pros and cons for using such a Linux distribution but from what I’ve seen I’ll be transferring development from Ubuntu 10.10 LTS to LDME before April 2013, hence “Goodbye Ubuntu”. There is a development issue that will have to be resolved and that is to do with the glade interface files, the Glade program I’m using on Ubuntu 10.10 is version 2.8 which has been superseded by version 2.10 unfortunately the XML files produced by version 2.10 are incompatible with Gtk 2.x libraries, so Saturn and Titan will have to converted to use Gtk 3.x libraries by April 2013.

Links:
LDME – is a rolling distribution based on Debian Testing.
Linux Mint Blog – self explanatory.
MATE – Gnome 2 continued under a new name, for those who don’t like Gnome 3.
Cinnamon – Linux Mint’s attempt to make Gnome 3 more like Gnome 2.

Posted 25 June 2012 by element90 in Fractal, Software

Tagged with , , ,

Delay to the release of Saturn & Titan version 2.1   Leave a comment


There is a delay to the release of Saturn & Titan version 2.1, the release package for Linux was completed and Saturn unexpectedly failed to build on Windows. The first issue is that C++ in Visual Studio Express 2010 doesn’t have asin, acos and atan for complex numbers, g++ version 4.6 used on Linux must have these otherwise I would’ve discovered this issue sooner.

Fortunately there is an easy solution and that is to use the definitions available in boost and as they are in the namespace boost::math:: I can use them without the need for conditional compilation.

The software would now build for Windows except for a change relating to the display of the splash window. I noticed that when only the default colour maps exist the splash window is displayed for so short a time that the question, “What was that?” immediately comes to mind. I added a delay of one second after loading the configuration and colour XML files before removing the splash window, the code used to implement the delay was not portable. A portable solution should be found quickly.

Once I’ve a solution for both problems I can prepare new packages. It shouldn’t take long.

Saturn and Titan version 1.1 – Released   Leave a comment


New versions of Saturn & Titan are now available and can be downloaded from the Download page (a subpage of the Software page).

In terms of functionality not much has changed, parts of the user interface have changed and some of the fractal types have been generalised. See the Release Notes (subpage of the Software page).

The most important aspect of this release is that the software in now available for Linux AND Windows 7.

Posted 31 January 2012 by element90 in Fractal, Software

Tagged with , , ,

Why Porting Software takes Time   2 comments


Saturn and Titan were developed on Linux for my my own use. The software was used to produce fractal images which I started to upload to DeviantArt and then to Red Bubble, after awhile I had periodic inquiries as to whether the software was available, I resisted making the software available for some time eventually relenting and making Saturn and Titan available as source packages for Linux. The toolkit I used to develop Saturn and Titan was the C++ version of GTK+ called Gtkmm, I knew that there were ports of this toolkit for Windows and OS X. This is all very well in theory, the state of the Gtkmm port for OS X seems to be incomplete and one of the libraries Saturn relies on is not available. The situation for Windows is better, I have some other programs written in C# using Gtk# developed on Linux, the executables for these programs could be copied to Windows and run successfully provided that the Windows also had the Gtk# libraries installed, however Saturn and Titan are written in C++ …

In my previous post I showed a picture of Titan running on Windows 7 which was built using Gtkmm, MinGW, MSYS and NetBeans, it successfully loaded and expanded a Saturn seed file. Then I attempted to build Saturn using Microsoft’s compiler and Visual Studio 2010 Express, this took a while to setup to build Saturn mainly due to unfamiliarity with Visual Studio 2010 Express, the last time I used Visual Studio was several years ago on Windows NT. Finally I got a 32-bit version of Saturn to build, I expected it fail to open Saturn’s glade file (an XML file containing the GUI definition) as the code still contained Unix style path delimiters / instead of \ that Windows uses, even though the path to the glade ended up having both Unix and Windows path delimiters the glade file was successfully opened then Saturn crashed. The crash was due to the following line:

Glib::ustring value_str = Glib::ustring::format(std::setprecision(std::numeric_limits<long double>::digits10), value);

When this line is executed an exception is thrown stating that conversion from WCHAR_T to UTF-8 is not supported. This is a problem as the are 128 occurrences of Glib::ustring::format in Saturn. So I tried building Saturn in the same way as did for Titan earlier. This resulted in …

Saturn running on Windows 7

Now that’s more like it, but … Note the the duration in square brackets beneath the Mandelbrot, it took over 56 seconds to generate a 750×500 image with 5000 iterations this is VERY slow, on Linux it takes 17 seconds. The times are for virtual machines running on an iMac with 4 Gigabytes of memory and an Intel Core 2 Duo @ 3.06 GHz processor, each virtual machine had 1280 Megabytes allocated. Note: Saturn is much slower than other fractal programs because of the way it displays the fractal image which is updated every 5 or 10 iterations depending on fractal type.

I then opened the fractal setting window which revealed two more problems:

Saturn's fractal setting window on Windows 7

The tab title Fractal has been truncated to Fracta, however that is a minor problem compared with value displayed for limit, it should be 16 and not minus zero which isn’t even a valid number. The incorrect value is produced by exactly the same line that causes the Visual Studio built version to crash. So clearly I can’t use Glib::ustring::format in Saturn so here’s is a work around:

std::stringstream str;
str << std::setprecision(std::numeric_limits<long double>::digits10) << value;
Glib::ustring value_str(str.str());

This code does produce the string “16” instead of “-0”, going back to the Visual Studio build and implementing the above work around just produces a different exception, this time due to inaccessible memory when calling the destructor for std::stringstream when str goes out of scope.

So far the problems encountered are with 32-bit builds of Saturn, I haven’t yet been able to make much progress with the 64-bit builds, Saturn fails to build with Visual Studio and fails to run with NetBeans. I don’t know why Saturn fails to run in NetBeans as I haven’t been able to get it to work with the 64-bit version of the gdb debugger, yet…

So, it’s going to take time to fix these problems, extensive testing of the Windows versions of Saturn and Titan is required. I don’t really won’t to spend so much time getting Version 1.0 sorted out for Windows so I’m going to start on version 1.1 which will be a minor update and will incorporate the necessary changes to get Saturn to run successfully on Windows. Hopefully Windows users won’t have to wait too long.

Posted 3 January 2012 by element90 in Fractal, Software

Tagged with , , , , , ,

%d bloggers like this: