Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Releasing U++ » mingw?
mingw? [message #21939] Thu, 11 June 2009 19:32 Go to next message
mirek is currently offline  mirek
Messages: 13136
Registered: November 2005
Ultimate Member
Well, looking through satistics, I think we should perhaps reintroduce mingw package. (Not that I like that... Smile

Anybody using mingw recently? What are actual versions working with U++?

Mirek
Re: mingw? [message #21948 is a reply to message #21939] Thu, 11 June 2009 23:11 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
i don't use it but i like the idea to have theide shipped with a preconfigured compiler

cocob
Re: mingw? [message #21949 is a reply to message #21948] Thu, 11 June 2009 23:27 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Ultimate Contributor
I vote yes for Mingw.
Re: mingw? [message #21951 is a reply to message #21949] Thu, 11 June 2009 23:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13136
Registered: November 2005
Ultimate Member
cbpporter wrote on Thu, 11 June 2009 17:27

I vote yes for Mingw.


Anybody ready to pick pieces? Or should we use previous config?

Mirek
Re: mingw? [message #21953 is a reply to message #21939] Fri, 12 June 2009 07:03 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
luzr wrote on Thu, 11 June 2009 19:32

Well, looking through satistics, I think we should perhaps reintroduce mingw package. (Not that I like that... :)

Anybody using mingw recently? What are actual versions working with U++?

Mirek

The 4.4.0 version from Twilight Dragon Media works fine for me, e.g. to compile TheIDE with MT build option, but doesn't work with SSE2 like MSC9 compiler.
Re: mingw? [message #21957 is a reply to message #21939] Fri, 12 June 2009 10:49 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
luzr wrote on Thu, 11 June 2009 19:32

Anybody using mingw recently? What are actual versions working with U++?

I use version 4.3.0 on WinXP and it works for the latest SVN version. I also use MT in one of my programs, didn't see any problem.

Matthias
Re: mingw? [message #22117 is a reply to message #21953] Thu, 18 June 2009 16:01 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Sender Ghost wrote on Fri, 12 June 2009 07:03

luzr wrote on Thu, 11 June 2009 19:32

Well, looking through satistics, I think we should perhaps reintroduce mingw package. (Not that I like that... Smile

Anybody using mingw recently? What are actual versions working with U++?

Mirek

The 4.4.0 version from Twilight Dragon Media works fine for me, e.g. to compile TheIDE with MT build option, but doesn't work with SSE2 like MSC9 compiler.


Oooh Crying or Very Sad

I thought it worked with SSE2!

Anyway I have seen good references from that "unnoficial" MinGW version so I will try it.

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22118 is a reply to message #21939] Thu, 18 June 2009 16:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello all

I have just simply deleted Upp\MinGW folder, I have installed there MinGW 4.4.0 version from Twilight Dragon Media, and compiled perfectly TheIde itself and other relatively big program. Nothing to change as the installer do its all.

Thank you Sender Ghost Smile

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22119 is a reply to message #22118] Thu, 18 June 2009 17:17 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello all

Just a benchmark. I have filled with random double numbers and multiplied two 2000x2000 matrices using SSE2 optimized code.

Compiled in console application with TheIde "Speed" option:

- Using MinGW bundled with Upp: 7.5 seconds
- Using MinGW TDM 4.4: 7.5 seconds
- Using MinGW TDM 4.4 with "-msse2" compiler option: 2.6 seconds
- Using MSC9: 17.3 seconds
- Using MSC9 with "/arch:SSE2" compiler option: 2.1 seconds

So Twilight Dragon really uses SSE2 Smile
And I would put by default in TheIde "-msse2" or "/arch:SSE2" in "Speed" option.

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22121 is a reply to message #22117] Thu, 18 June 2009 20:03 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
koldo wrote on Thu, 18 June 2009 16:01


Oooh :cry:

I thought it worked with SSE2!


Hello, Koldo.

I meant GUI MT SSE2 main package configuration flags, not just Streaming SIMD Extensions 2 instruction set. It compiles well (in Optimal mode), but will crash when started (at least in my configuration). Console applications works. I guess, the GUI and SSE2 flags in conflict for GCC Optimal mode.
Re: mingw? [message #22124 is a reply to message #22121] Thu, 18 June 2009 23:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Sender Ghost

I have put the little benchmark in Upp "Bombs" example and it worked well without and with -msse2 (with this it worked three times faster).

As I do not have any idea about SSE2 optimizations I cannot give you any suggestion. If you want you can send me some sample that crash in your computer and test it here.

Any way I suggest anybody to update MinGW as much as possible.

And it also would be good to:
- either add to "Speed" option more optimisations like "-msse2" or "/arch:SSE2"
- or add other option like "Max Speed" (or other name) to include maximum optimizations that are less reliable, like -msse2 in your computer.

I do not know if there are more configurations, but I have been very surprised. Look in MSC9 test: from 17.3 to 2.1 seconds Shocked

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22125 is a reply to message #22124] Fri, 19 June 2009 00:23 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Ok, I found the cause. This is O3 GCC compiler optimization option which set by default in Build methods.
void BuildMethods::NewBuilder()
{
	String b = ~builder;
	if(IsNull(speed_options)) {
		if(IsGccBuilder(b))
		#ifdef PLATFORM_WIN32
			speed_options <<= "-O3 -ffunction-sections";
		#else
			speed_options <<= "-O3";
		#endif
		else
			speed_options <<= "-O2";
	}

if(HasFlag("SSE2"))
	cc << " -msse2 -mfpmath=sse";

The O2 instead of O3 compiler option works without crashes with SSE2 flag in GUI applications.

Thank you Koldo for testing.
Re: mingw? [message #22148 is a reply to message #22124] Fri, 19 June 2009 16:31 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Fri, 19 June 2009 00:08

Hello Sender Ghost

I have put the little benchmark in Upp "Bombs" example and it worked well without and with -msse2 (with this it worked three times faster).

...........
Any way I suggest anybody to update MinGW as much as possible.

And it also would be good to:
- either add to "Speed" option more optimisations like "-msse2" or "/arch:SSE2"
- or add other option like "Max Speed" (or other name) to include maximum optimizations that are less reliable, like -msse2 in your computer.

I do not know if there are more configurations, but I have been very surprised. Look in MSC9 test: from 17.3 to 2.1 seconds Shocked

Best regards
Koldo


Very interesting things. I agree to add this option to "Speed" when autobuild (Automatic setup), do not need to add new option "Max Speed".

For me works fine and speed time is more faster. can you tell how to upgrade minGW for u++? is any specific configuration or is standard installation of minGW?
Re: mingw? [message #22151 is a reply to message #22148] Fri, 19 June 2009 21:38 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Ion

It is very easy to upgrade MinGW to GCC 4.4.0:

1. Delete your Upp/MinGW folder
2. Go to Twilight Dragon Media page: http://www.tdragon.net/recentgcc/
3. Get the last TDM-MinGW instaler, now in http://downloads.sourceforge.net/tdm-gcc/tdm-mingw-1.905.0-4 .4.0-2.exe
4. Install it in upp/MinGW and choose the options by default
5. That's all

Thank you Sender Ghost

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22152 is a reply to message #21939] Fri, 19 June 2009 21:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Sender Ghost

I do not understand it

if(HasFlag("SSE2"))
	cc << " -msse2 -mfpmath=sse";


It seems TheIde now automatically choose -msse2.

I promise you that this:

Quote:

I have put the little benchmark in Upp "Bombs" example and it worked well without and with -msse2 (with this it worked three times faster).

is absolutely true. Shocked

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22153 is a reply to message #21939] Fri, 19 June 2009 22:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello all

One thing I did not know:

- TheIde compiled with MSC can debug MinGW and MSC
- TheIde compiled with MinGW can debug MinGW but hungs trying to debug MSC.

In the last case TheIde outputs an Exclamation window with "Error invoking gdb !", strange as I am trying to compile with MSC.

This is in the file gdb.cpp:

bool Gdb::Create(One<Host> _host, const String& exefile, const String& cmdline)
{
	host = _host;
	dbg = host->StartProcess("gdb " + GetHostPath(exefile));
	if(!dbg) {
		Exclamation("Error invoking gdb !");
		return false;
	}


Gdb::Create is called in the same file in:
One<Debugger> GdbCreate(One<Host> host, const String& exefile, const String& cmdline)
{
	Gdb *dbg = new Gdb;
	if(!dbg->Create(host, exefile, cmdline)) {
		delete dbg;
		return NULL;
	}
	return dbg;
}


And GdbCreate is called in file Debug.cpp in:
void Ide::BuildAndDebug(bool runto)
{
...
#ifdef COMPILER_MSC
	debugger = builder == "GCC" ? GdbCreate(host, target, runarg) : PdbCreate(host, target, runarg);
#else
	debugger = GdbCreate(host, target, runarg);
#endif


So it seems the code forces to use Gdb although the compiler used is MSC. This could be the problem.

Best regards
Koldo


Best regards
Iñaki
Re: mingw? [message #22154 is a reply to message #22152] Fri, 19 June 2009 23:05 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Koldo.

TheIDE in Optimal mode will compile packages and selected files with "Optimize for speed" option using defined compiler string (by default: "-O3 -ffunction-sections") and other files with "Optimize for size" compiler string (by default: "-Os -finline-limit=20 -ffunction-sections") as installed in Build methods for GCC builder.
When we use SSE2 flag in main package configuration TheIDE will add "-msse2 -mfpmath=sse" string to compiler options (both for speed and size).
I suggested to use O2 compiler option instead of O3 when using SSE2. Because in my configuration, e.g. TheIDE and AddressBook, U++ GUI application crashes when started. The cause can exists in following areas:
- GCC compiler itself;
- U++ algorithms which used in GUI applications (area can be limited by "Opimize for speed" files);
- Operating system;
- Hardware configuration.

Yes, I can run Bombs U++ GUI application, but it crashes when I click on "Game" submenu.

[Updated on: Sat, 20 June 2009 09:25]

Report message to a moderator

Re: mingw? [message #22155 is a reply to message #22154] Sat, 20 June 2009 00:36 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello all

I have just recompiled again Bombs sample with code that multiplies two 2000x2000 matrices.

Main package configuration: "GUI"
Compiling option "Speed"
Compiler options and results:
- MinGW TDM 4.4.0 with -msse2: 2.43 seconds
- MinGW TDM 4.4.0 without -msse2: 9.37 seconds
- MSC9 with /arch:SSE2: 4.04 seconds
- MSC9 without /arch:SSE2: 26.06 seconds

In all cases Bombs menus have worked properly. No crash. And the only change between versions is the -msse2 or /arch:SSE2 compiler option.

I do not know anything about SSE2, but I know that I will choose it in programs that require all optimisations like in Image Processing.

Best regards
Koldo

PD. The matrix libraries I am using today are newer than yesterday so that MinGW gets now better results in comparison to MSC. I have done this test today in a slower computer.


Best regards
Iñaki
Re: mingw? [message #22157 is a reply to message #22155] Sat, 20 June 2009 12:10 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
koldo wrote on Sat, 20 June 2009 00:36


In all cases Bombs menus have worked properly. No crash. And the only change between versions is the -msse2 or /arch:SSE2 compiler option.


Ok, I just said about SSE2 build flag and O3 compiler option. Without SSE2 build flag (and with, but O2) all works fine.
The SSE2 build flag in TheIDE expanded by "-msse2 -mfpmath=sse" compiler options, not just "-msse2".
There is no issue.
Re: mingw? [message #22163 is a reply to message #22157] Sun, 21 June 2009 15:35 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Speed Ghost

It seems that there is something else ...
I have done more tests with changed Bombs example with SSE2 matrix code at the beginning, all with MinGW, SPEED and rebuilding it all every time:

Main Pack. Conf.  Compiler Opt         Test time  Problems? 
- GUI SSE2	  No option            2.3 sec    Crash
- GUI		  -msse2               2.4 sec    Ok
- GUI SSE2	  -msse2               2.3 sec    Crash
- GUI		  -msse2 -mfpmath=sse  2.3 sec    Ok
- GUI SSE2	  -msse2 -mfpmath=sse  2.3 sec    Crash

The crash was always using the menus and not in the initial matrix code.

Then I have recompiled TheIde changing this:
	if(HasFlag("SSE2"))
		cc << " -msse2";// -mfpmath=sse";

and:
Main Pack. Conf.  Compiler Opt         Test time  Problems? 
- GUI SSE2	  No option            2.4 sec    Crash

and I have recompiled again with:
	if(HasFlag("SSE2"))
		cc << " ";//-msse2";// -mfpmath=sse";

and:
Main Pack. Conf.  Compiler Opt         Test time  Problems? 
- GUI SSE2	  No option            9.5 sec    Ok


Conclussion:

There is a problem in some Upp GUI library that uses SSE2 caused by MinGW TDM 4.4.0 or by Upp

I have done the tests in Linux and there have been no crash.

Best regards
Koldo


Best regards
Iñaki
Previous Topic: Releases
Next Topic: Regular releases reactivated
Goto Forum:
  


Current Time: Tue Mar 02 17:57:40 CET 2021

Total time taken to generate the page: 0.02087 seconds