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 » Community » U++ community news and announcements » 2020.1 officially released
Re: 2020.1 officially released [message #54088 is a reply to message #54086] Sat, 30 May 2020 22:52 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
Problem is solved. I was able to reproduce this crash on Linux.
Clang is crashing in a third-party library, which requires C++17, but the code was compiled with -std=c++14.
Instead of reporting an error Clang just crashes.

Life is going on.


Regards,
Novo
Re: 2020.1 officially released [message #54096 is a reply to message #54088] Sun, 31 May 2020 23:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Novo wrote on Sat, 30 May 2020 22:52
Problem is solved. I was able to reproduce this crash on Linux.
Clang is crashing in a third-party library, which requires C++17, but the code was compiled with -std=c++14.
Instead of reporting an error Clang just crashes.

Life is going on.


What about those compile times?
Re: 2020.1 officially released [message #54098 is a reply to message #54096] Mon, 01 June 2020 00:36 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
mirek wrote on Sun, 31 May 2020 17:13

What about those compile times?

Nothing has changed.
The worst case I've seen is reference/Eigen_demo. I never saw end of compilation in Debug conf. Release compiles in 1.5 minutes.
I cannot check compilation speed at the moment because your last commit broke compilation of reference/EscApp with Clang on Windows.


Regards,
Novo

[Updated on: Mon, 01 June 2020 00:37]

Report message to a moderator

Re: 2020.1 officially released [message #54103 is a reply to message #54098] Mon, 01 June 2020 10:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Novo wrote on Mon, 01 June 2020 00:36
mirek wrote on Sun, 31 May 2020 17:13

What about those compile times?

Nothing has changed.
The worst case I've seen is reference/Eigen_demo. I never saw end of compilation in Debug conf. Release compiles in 1.5 minutes.
I cannot check compilation speed at the moment because your last commit broke compilation of reference/EscApp with Clang on Windows.


Fixed...

Well, in Win32 it works more or less fine:

----- Core ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 4)
----- plugin/Eigen ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 4)
----- plugin/z ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 4)
----- Eigen_demo ( MAIN CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 4)
eigen_demo.cpp
non-linear.cpp
fft.cpp
Eigen_demo: 3 file(s) built in (0:26.75), 8916 msecs / file
Linking...
C:\upp\out\reference\CLANGx64.Debug.Debug_Full\Eigen_demo.ex e (6641664 B) linked in (0:00.85)

OK. (0:28.09)

It however seems to take a bit longer to compile fft.cpp...
Re: 2020.1 officially released [message #54104 is a reply to message #54103] Mon, 01 June 2020 10:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
OK, eigen_demo.cpp alone (Alt+F7) takes 24s to compile with CLANGx64. That's a lot.

However, if I use Visual C++, it takes to compile.... 24s. So perhaps it is simply the complexity of eigen...

Mirek
Re: 2020.1 officially released [message #54109 is a reply to message #54104] Mon, 01 June 2020 14:17 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3372
Registered: August 2008
Senior Veteran
Yes, Eigen uses template metaprogramming to optimize speed handling SSE2 and Altivec. The cost of it is longer compiling time.
Just a simple vector sum like u = v + w, has some black magic inside.
This is explined here.


Best regards
IƱaki

[Updated on: Mon, 01 June 2020 14:19]

Report message to a moderator

Re: 2020.1 officially released [message #54113 is a reply to message #54109] Mon, 01 June 2020 21:35 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
There is another unexpected problem with Clang on Windows.
If I add "-std=c++17" to cpp options, then in case of GUI app (example: tutorial/Gui01) in Debug configuration I get this (Release is fine):
Linking...
lld-link: error: duplicate symbol: std::__throw_bad_alloc()
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:315
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator new(unsigned long long)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:301
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator new(unsigned long long, std::nothrow_t const&)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:307
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator new[](unsigned long long)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:304
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator new[](unsigned long long, std::nothrow_t const&)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:310
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator delete(void*)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:302
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator delete(void*, std::nothrow_t const&)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:308
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator delete[](void*)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:305
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)

lld-link: error: duplicate symbol: operator delete[](void*, std::nothrow_t const&)
>>> defined at c:\local\apps\upp\uppsrc\Core\heap.cpp:311
>>>            c:/local/apps/upp/out/tutorial/Core/CLANGx64cpp17.Debug.Debug_Full.Gui\heap.o
>>> defined at libc++.a(new.cpp.obj)
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)

Because STD_NEWDELETE is defined, and it gets defined in config.h here:
#ifdef  flagCLR
#define flagUSEMALLOC
#define STD_NEWDELETE
#endif

I have no idea where flagCLR is coming from ...
wine umk tutorial Gui01 CLANGx64cpp17 -bu



Regards,
Novo
Re: 2020.1 officially released [message #54114 is a reply to message #54104] Mon, 01 June 2020 21:41 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
mirek wrote on Mon, 01 June 2020 04:23
OK, eigen_demo.cpp alone (Alt+F7) takes 24s to compile with CLANGx64. That's a lot.

However, if I use Visual C++, it takes to compile.... 24s. So perhaps it is simply the complexity of eigen...

Mirek

In my case it takes 1.5 minutes to compile plugins/sqlite3. IMHO, this is unacceptable ...
P.S. I compile with BLITZ enabled even in Release.


Regards,
Novo
Re: 2020.1 officially released [message #54115 is a reply to message #54114] Mon, 01 June 2020 21:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Novo wrote on Mon, 01 June 2020 21:41
mirek wrote on Mon, 01 June 2020 04:23
OK, eigen_demo.cpp alone (Alt+F7) takes 24s to compile with CLANGx64. That's a lot.

However, if I use Visual C++, it takes to compile.... 24s. So perhaps it is simply the complexity of eigen...

Mirek

In my case it takes 1.5 minutes to compile plugins/sqlite3. IMHO, this is unacceptable ...
P.S. I compile with BLITZ enabled even in Release.


OK, indeed release with blitz, it is 1 minute. Interesting... That said, I do not see what we can do here...
Re: 2020.1 officially released [message #54116 is a reply to message #54115] Mon, 01 June 2020 21:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
The problematic file is plugin/sqlite3/lib.c. It definitely depends on O level

O1 15s
O2 42s
O3 55s

It is 200K lines file. Maybe the issue is that clang is trying to perform some global optimisations that go exponential with the file size?

[Updated on: Mon, 01 June 2020 21:54]

Report message to a moderator

Re: 2020.1 officially released [message #54117 is a reply to message #54116] Mon, 01 June 2020 22:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
I have just checked linux clang and gcc (different machine).

Linux clang compiles sqlite3 lib.c in 50s, gcc in 30s.

Mirek
Re: 2020.1 officially released [message #54118 is a reply to message #54117] Mon, 01 June 2020 22:40 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
I managed to compile Eigen_demo in Debug ... Smile

$ wine umk reference Eigen_demo CLANGx64 -bu
----- Core ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 4)
----- plugin/Eigen ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 4)
----- plugin/z ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 4)
----- Eigen_demo ( MAIN CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 4)
BLITZ: eigen_demo.cpp non-linear.cpp fft.cpp
Eigen_demo: 3 file(s) built in (37:40.15), 753384 msecs / file
Linking...
Z:\home\ssg\.local\soft\bb-worker\worker\wine-upp\build\.cache\upp.out\CLANGx64.Debug.Debug_Full\Eigen_demo.exe (6637568 B) linked in (0:01.46)

OK. (37:42.11)

Less than 40 minutes Smile


Regards,
Novo
Re: 2020.1 officially released [message #54119 is a reply to message #54118] Mon, 01 June 2020 23:07 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
It takes only 23 sec. to compile the same code in Linux using same version of Clang.
----- Eigen_demo ( MAIN GCC DEBUG SHARED DEBUG_FULL BLITZ POSIX LINUX ) (3 / 3)
BLITZ: eigen_demo.cpp non-linear.cpp fft.cpp
Core: 68 file(s) built in (0:02.42), 35 msecs / file
plugin/Eigen: 1 file(s) built in (0:03.34), 3346 msecs / file
Eigen_demo: 3 file(s) built in (0:22.95), 7651 msecs / file
Linking...
/home/ssg/.local/soft/bb-worker/worker/l-upp/build/.cache/upp.out/CLANG.Debug.Debug_Full.Shared/Eigen_demo (78994008 B) linked in (0:02.03)

OK. (0:31.83)

$ ./umk reference Eigen_demo CLANG -busa

IMHO, something isn't right with the Clang bundled with Upp.
It, probably, has been compiled differently ...


Regards,
Novo
Re: 2020.1 officially released [message #54120 is a reply to message #54118] Mon, 01 June 2020 23:10 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
Novo wrote on Mon, 01 June 2020 16:40
I managed to compile Eigen_demo in Debug ... Smile

$ wine umk reference Eigen_demo CLANGx64 -bu
----- Core ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 4)
----- plugin/Eigen ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 4)
----- plugin/z ( CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 4)
----- Eigen_demo ( MAIN CLANG DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 4)
BLITZ: eigen_demo.cpp non-linear.cpp fft.cpp
Eigen_demo: 3 file(s) built in (37:40.15), 753384 msecs / file
Linking...
Z:\home\ssg\.local\soft\bb-worker\worker\wine-upp\build\.cache\upp.out\CLANGx64.Debug.Debug_Full\Eigen_demo.exe (6637568 B) linked in (0:01.46)

OK. (37:42.11)

Less than 40 minutes Smile

Without BLITZ it takes only 20 minutes Smile
----- Eigen_demo ( MAIN CLANG DEBUG DEBUG_FULL WIN32 ) (4 / 4)
eigen_demo.cpp
non-linear.cpp
fft.cpp
Eigen_demo: 3 file(s) built in (20:14.75), 404918 msecs / file
Linking...
Z:\home\ssg\.local\soft\bb-worker\worker\wine-upp\build\.cache\upp.out\CLANGx64.Debug.Debug_Full.Noblitz\Eigen_demo.exe (6253568 B) linked in (0:01.40)

OK. (21:47.23)



Regards,
Novo
Re: 2020.1 officially released [message #54121 is a reply to message #54120] Mon, 01 June 2020 23:27 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
I'm afraid it is wine to blame in my case.
Clang-10 spends ~75% of its time calling one function in ntdll.dll.so


Regards,
Novo
Re: 2020.1 officially released [message #54122 is a reply to message #54113] Mon, 01 June 2020 23:31 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
Novo wrote on Mon, 01 June 2020 15:35
I have no idea where flagCLR is coming from ...
wine umk tutorial Gui01 CLANGx64cpp17 -bu


It would be great to get this fixed ...


Regards,
Novo
Re: 2020.1 officially released [message #54123 is a reply to message #54121] Mon, 01 June 2020 23:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Maybe you can try cross-compilation.

https://github.com/mstorsjo/llvm-mingw/releases

If you do not have ubuntu 18.04, building llvm-mingw for you linux distro should be relatively simple....

It could be interesting experiment. Actually, we can even add a simple support in ide / umake to prepend binary with "wine" for execution... Smile

Mirek
Re: 2020.1 officially released [message #54124 is a reply to message #54122] Mon, 01 June 2020 23:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Novo wrote on Mon, 01 June 2020 23:31
Novo wrote on Mon, 01 June 2020 15:35
I have no idea where flagCLR is coming from ...
wine umk tutorial Gui01 CLANGx64cpp17 -bu


It would be great to get this fixed ...


I will ASAP, but not today. For now in RM. If it is not fixed by the end of week, please ping me.
Re: 2020.1 officially released [message #54125 is a reply to message #54121] Tue, 02 June 2020 10:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Novo wrote on Mon, 01 June 2020 23:27
I'm afraid it is wine to blame in my case.
Clang-10 spends ~75% of its time calling one function in ntdll.dll.so


BTW, which function is that? Maybe there could be done something about it...

Mirek
Re: 2020.1 officially released [message #54129 is a reply to message #54125] Tue, 02 June 2020 16:24 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
mirek wrote on Tue, 02 June 2020 04:31
Novo wrote on Mon, 01 June 2020 23:27
I'm afraid it is wine to blame in my case.
Clang-10 spends ~75% of its time calling one function in ntdll.dll.so


BTW, which function is that? Maybe there could be done something about it...

Mirek

I cannot tell that. There is no debug information in wine.
What I can see is just an address.


Regards,
Novo
Previous Topic: get_i
Next Topic: theide: New Threads tab in PDB debugger
Goto Forum:
  


Current Time: Thu Jun 13 08:47:31 CEST 2024

Total time taken to generate the page: 0.01957 seconds