Page 2 of 2
Re: Activate multi-core
Posted: Fri Apr 21, 2017 12:11 pm
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!

Re: Activate multi-core
Posted: Fri Apr 21, 2017 12:25 pm
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!

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?

Re: Activate multi-core
Posted: Fri Apr 21, 2017 1:09 pm
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.
Re: Activate multi-core
Posted: Fri Apr 21, 2017 1:57 pm
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.
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.
Re: Activate multi-core
Posted: Fri Apr 21, 2017 2:03 pm
by Fig
Are you sure every data fit in Ram ? Because the bottleneck may be disk access.
Re: Activate multi-core
Posted: Fri Apr 21, 2017 2:11 pm
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).
Re: Activate multi-core
Posted: Fri Apr 21, 2017 2:22 pm
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.
Re: Activate multi-core
Posted: Fri Apr 21, 2017 9:03 pm
by marcoagpinto
Re: Activate multi-core
Posted: Sat Apr 22, 2017 2:44 am
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).
Re: Activate multi-core
Posted: Sat Apr 22, 2017 3:00 am
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.
Re: Activate multi-core
Posted: Sat Apr 22, 2017 10:03 am
by marcoagpinto
Thanks, my friends!
