Activate multi-core

Just starting out? Need help? Post your questions and find answers here.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Activate multi-core

Post by IdeasVacuum »

Hi marcoagpinto

That still does not tell us what it is you are trying to do. If you are just trying to produce a stream of text, how could that possibly take 18-19 hours? You are wasting everyone's time! :shock:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
marcoagpinto
Addict
Addict
Posts: 940
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Activate multi-core

Post by marcoagpinto »

IdeasVacuum wrote:Hi marcoagpinto

That still does not tell us what it is you are trying to do. If you are just trying to produce a stream of text, how could that possibly take 18-19 hours? You are wasting everyone's time! :shock:
I can't get into many details since it is still classified until the defence day of the PhD.

What I can tell is that we have scenarios to simulate and a total time for them.

Imagine that I specify 9999 time units to it.

Every time unit will perform an insane number of calculations and will keep a log of everything, by each time unit.

Is it now better explained?

:D
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Activate multi-core

Post by IdeasVacuum »

Hi marcoagpinto

Not really..... when application performance is the issue, "the devil is in the detail".

Should this forum be coding your Ph.D. for you?

You know exactly what your app is supposed to do - you should be able to gather information on best practice for the necessary processes via web searches and work from there.

You could search this forum for advice on what can reduce application speed and how to write better code to improve speed. That might include using threads to take advantage of multi-core processors and there is plenty of advice (and code) on that subject on this forum. If your app is well structured using Procedures, those performing the 'heavy' work could be converted to threads.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
marcoagpinto
Addict
Addict
Posts: 940
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Activate multi-core

Post by marcoagpinto »

IdeasVacuum wrote:Hi marcoagpinto
Should this forum be coding your Ph.D. for you?
I am giving credit to PB and to the forum in my thesis.

:mrgreen:

I have the software ready and am now producing and analysing data with it.

However, I noticed it is too slow and was trying to find ways to optimise it.

Since I have dozens of scenarios to simulate, it will take months.

However, if Freddy implements the "fast strings" which someone suggested, I would get a massive speed up.

The software makes use of the Information Theory thus it is very complex... I was the first person to compute the Information Metric:
http://marcoagpinto.cidadevirtual.pt/about_marco.html

Thank you my friends for all the help in these three years.
User avatar
Fig
Enthusiast
Enthusiast
Posts: 351
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

Re: Activate multi-core

Post by Fig »

Are you sure every data fit in Ram ? Because the bottleneck may be disk access.
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
User avatar
marcoagpinto
Addict
Addict
Posts: 940
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Activate multi-core

Post by marcoagpinto »

Fig wrote:Are you sure every data fit in Ram ? Because the bottleneck may be disk access.
It doesn't fit in RAM, so I divided in multiple stages.

Later I will code something to unite the data produced (it will only take 20-30 minutes to code).
User avatar
Fig
Enthusiast
Enthusiast
Posts: 351
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

Re: Activate multi-core

Post by Fig »

Well if you manage to divide the data in one bench that fit in Ram, then you just have to divide this bench in 4 or 8 smaller parts
Then you launch at the same time, 4 or 8 programs that process each part of data.
That way you will work on 4-8 cores.

Else, you can do the same with one program and 4-8 multithread procedures. But if you are not at ease with read/write, semaphore and so on, try first solution.
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
User avatar
marcoagpinto
Addict
Addict
Posts: 940
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Activate multi-core

Post by marcoagpinto »

Fig wrote:Well if you manage to divide the data in one bench that fit in Ram, then you just have to divide this bench in 4 or 8 smaller parts
Then you launch at the same time, 4 or 8 programs that process each part of data.
That way you will work on 4-8 cores.

Else, you can do the same with one program and 4-8 multithread procedures. But if you are not at ease with read/write, semaphore and so on, try first solution.
Thank you!

:twisted: :evil: :D 8)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Activate multi-core

Post by IdeasVacuum »

Hi marcoagpinto

Looking at your online CV (which suggests to me that converting some existing Procedures to Threaded will not be difficult for you) - you could consider writing the most time-consuming code in Assembly (in-line).
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Activate multi-core

Post by IdeasVacuum »

Hi again marcoagpinto

This applies to Windows OS:
.....if your app is currently starved of RAM and is using the hard drive as virtual memory, make sure the Paging File Size is a fixed size (by default, it's dynamic) and at least the minimum the System recommends - an increased size can be set to suit your app so long as the drive has the space (recommended).

Also, set your defrag app to defrag the drive and the Paging File on PC start-up.

This tip is not a solution to your speed issue, but it should make a difference.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
marcoagpinto
Addict
Addict
Posts: 940
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: Activate multi-core

Post by marcoagpinto »

Thanks, my friends!

8)
Post Reply