64bit and multi-threading

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

64bit and multi-threading

Post #1by Chuft-Captain » 28.03.2012, 22:03

Hi guys,

This subject may have been covered already, so my apologies if it's duplicated.

Firstly, I was wondering if it was now possible to build a 64bit version of Celestia to take advantage of the latest 64bit hardware and OS's (Windows 7 in particular).

More importantly, is there any motivation amongst the DEVs to make Celestia a multi-threading application?
IMO, at this point in time, this should be a priority over adding new features as the performance gains on multi-core processors could be quite spectacular.

I'm assuming that you could target certain parts of the code for multi-threading (computations that rely on the CPU rather than the GPU)... my guess would be script execution, reference frame / positional calculations, etc, might be areas that would benefit greatly from this.

For example, in my models. multiple objects are positioned using reference frames (many objects are often positioned relative to the same object), and the trajectories and orientations of many moving objects are computed by lua/celx scripts. There can end up being a huge number of computations to be done between render cycles, and being able to use all processor cores would I think improve frame-rates significantly in this type of scenario, as I suspect that the more objects you control with celx/lua scripting, the more likely you are to be CPU-bound, as all the computations for objects in the FOV must be completed between each rendered frame.

Regards
CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Re: 64bit and multi-threading

Post #2by ajtribick » 21.04.2012, 12:58

Qt (used for the user interface) currently does not provide a 32-bit version for Windows. A similar issue is present with gettext (used for the translations) - Visual Studio is no longer a supported compiler, you need to either use MinGW or Cygwin to build it and these environments are both 32-bit.

So at the moment there are no plans to go 64-bit on Windows.

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: 64bit and multi-threading

Post #3by John Van Vliet » 22.04.2012, 09:26

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 05:57, edited 1 time in total.

duds26
Posts: 328
Joined: 05.02.2007
Age: 34
With us: 17 years 9 months
Location: Europe

Re: 64bit and multi-threading

Post #4by duds26 » 11.05.2012, 15:36

64 bit is a more pressing issue since:
- conversion is possible so decently written, modern code can be compiled for 32 or 64 bit without recoding stuff.
- most people who buy a computer now have a 64 bit processor and a 64 bit version of Windows
- compatibility things like this should have a higher priority than the performance thing in this example.

Besides that I'm hoping to slowly but certainly go to 64 bit and only use 64 programs.

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Re: 64bit and multi-threading

Post #5by ajtribick » 12.05.2012, 07:15

duds26 wrote:64 bit is a more pressing issue since:
- conversion is possible so decently written, modern code can be compiled for 32 or 64 bit without recoding stuff.
- most people who buy a computer now have a 64 bit processor and a 64 bit version of Windows
- compatibility things like this should have a higher priority than the performance thing in this example.

Besides that I'm hoping to slowly but certainly go to 64 bit and only use 64 programs.
64-bit versions of Windows include WOW64 that enables 32-bit applications to run. I'm doing this with Celestia already, haven't had issues with it.

This is not a compatibility issue on Windows.

xyz
Posts: 43
Joined: 25.05.2002
With us: 22 years 5 months
Location: Montreal, Canada, Earth

Re: 64bit and multi-threading

Post #6by xyz » 14.06.2012, 17:11

Hello,
For the multi-threaded part of this post, I am playing around with openMP and Celestia:
Image
This is just a proof of concept, and so far I am just doing the loading in separate threads, but as you know that implies a lot of IO operations, and IOs are not very good for multi-threading.

For 64b build I was wondering if LLVM might be useful?

Cheers
Interesting Projects:
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD

duds26
Posts: 328
Joined: 05.02.2007
Age: 34
With us: 17 years 9 months
Location: Europe

Re: 64bit and multi-threading

Post #7by duds26 » 16.06.2012, 12:56

Interesting.

@xyz
What if you would make the record video functionality a separate thread?
you know, putting the encoding in a separate thread of execution.

duds26
Posts: 328
Joined: 05.02.2007
Age: 34
With us: 17 years 9 months
Location: Europe

Re: 64bit and multi-threading

Post #8by duds26 » 16.06.2012, 12:57

There is also mingw for 64 bit:
http://mingw-w64.sourceforge.net/

xyz
Posts: 43
Joined: 25.05.2002
With us: 22 years 5 months
Location: Montreal, Canada, Earth

Re: 64bit and multi-threading

Post #9by xyz » 16.06.2012, 14:46

duds26 wrote:Interesting.

@xyz
What if you would make the record video functionality a separate thread?
you know, putting the encoding in a separate thread of execution.
Sounds like a good idea although I don't think this is a good candidate for OpenMP.

duds26 wrote:There is also mingw for 64 bit:
http://mingw-w64.sourceforge.net/
Agree, but in the case of mingw the code needs to be "massaged" here and there to make it work. The nice thing with llvm is that it can take your c++ code and:
An easily retargettable code generator, which currently supports X86, X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, SystemZ, and XCore.

Cheers
Interesting Projects:
Celestia an open source space simulator.
EventGhost an open source PC remote control.
TA Spring
OpenTTD


Return to “Development”