Can we multi-thread the TN-Grid wu's?
log in

Advanced search

Message boards : Number crunching : Can we multi-thread the TN-Grid wu's?

Author Message
mikey
Avatar
Send message
Joined: 28 Nov 16
Posts: 16
Credit: 10,381,285
RAC: 0
United States
Message 1488 - Posted: 26 Jan 2019, 14:39:30 UTC

Simple question can we multi-thread the TN-Grid wu's to make them run faster?

Jim1348
Send message
Joined: 29 Dec 16
Posts: 87
Credit: 21,013,002
RAC: 0
United States
Message 1489 - Posted: 26 Jan 2019, 20:54:18 UTC - in response to Message 1488.
Last modified: 26 Jan 2019, 20:57:27 UTC

I think the short answer is "no", but a developer could answer more fully. However, the usual reason is to save memory. Since the work units here use less than 60 MB, there is not much reason to. You might just as well run more of them. They take less than four hours on my i7-4790 anyway under Ubuntu, and almost as fast under Windows.

Profile adrianxw
Send message
Joined: 22 Dec 16
Posts: 34
Credit: 8,489,081
RAC: 0
Denmark
Message 1582 - Posted: 11 Jun 2019, 12:53:34 UTC
Last modified: 11 Jun 2019, 12:57:52 UTC

Multithreading is only practical for certain types of problem. Applied to the wrong system, it can cause an increase in run time.

An extremely crude example, suppose you have a task which does a loop, each iteration of the loop adds 1 to the total, you have to iterate the loop 10 times to get the answer. Simple enough to do, but how could you multi-thread that? Each time it goes through the loop, it needs to know the result of the last pass through the loop, so thread 2, can't start until thread 1 is finished, etc, until it is complete. The act of starting the threads, passing the data, recovering the results, all add to the run time.

The current units run in about three hours on my i7-6700 systems running Windows 8.1.
____________
Wave upon wave of demented avengers march cheerfully out of obscurity into the dream.

mikey
Avatar
Send message
Joined: 28 Nov 16
Posts: 16
Credit: 10,381,285
RAC: 0
United States
Message 1585 - Posted: 25 Jun 2019, 12:10:13 UTC - in response to Message 1582.

Multithreading is only practical for certain types of problem. Applied to the wrong system, it can cause an increase in run time.

An extremely crude example, suppose you have a task which does a loop, each iteration of the loop adds 1 to the total, you have to iterate the loop 10 times to get the answer. Simple enough to do, but how could you multi-thread that? Each time it goes through the loop, it needs to know the result of the last pass through the loop, so thread 2, can't start until thread 1 is finished, etc, until it is complete. The act of starting the threads, passing the data, recovering the results, all add to the run time.

The current units run in about three hours on my i7-6700 systems running Windows 8.1.


I don't understand any of that logic, sorry.

My older I7 laptop is taking 7 hours to run one wu is why I'm asking. I also have some older and MUCH slower desktops with 2 quad core Xeon cpu's in them that could put more cpu cores on a single wu. I have some faster desktops too, but I have several goals I'm trying to reach at the moment.
____________

Profile adrianxw
Send message
Joined: 22 Dec 16
Posts: 34
Credit: 8,489,081
RAC: 0
Denmark
Message 1587 - Posted: 27 Jun 2019, 14:46:41 UTC

The part you need to understand is :

>>> Multithreading is only practical for certain types of problem. Applied to the wrong system, it can cause an increase in run time.

I presented a stupid example of where multithreading a task can make it run slower.

My old website had a tutorial about multithreading, it uses a very silly program as the teaching tool, and I wrote it almost two decades ago, so some things might be different now. The way back machine has the tutorial here :

https://archive.org/web/web.php

...then ...

search for adrianxw.dk

...then ...

click the most recent date, 15th Feb then click "Enter software site". Parts 1, 2 and 3 of the basic tutorial are on the list there. Watch them in order.

I've not used that site for years, but it seems to work anyway.
____________
Wave upon wave of demented avengers march cheerfully out of obscurity into the dream.

Profile valterc
Project administrator
Project tester
Send message
Joined: 30 Oct 13
Posts: 616
Credit: 34,514,943
RAC: 395
Italy
Message 1588 - Posted: 28 Jun 2019, 9:09:31 UTC - in response to Message 1587.

Very briefly: some things are faster done while working in a serial way, others in a parallel way. I found a good explanation here: https://www.quora.com/If-parallel-programming-is-significantly-faster-why-arent-all-programming-problems-solved-using-that-technique. Being able to parallelize an algorithm (like making an efficient multi-threaded version) is usually the first step in the path to CUDA/OpenCL.

Profile adrianxw
Send message
Joined: 22 Dec 16
Posts: 34
Credit: 8,489,081
RAC: 0
Denmark
Message 1589 - Posted: 28 Jun 2019, 12:22:31 UTC - in response to Message 1588.

Errm, that is what I was trying to explain to him...
____________
Wave upon wave of demented avengers march cheerfully out of obscurity into the dream.


Post to thread

Message boards : Number crunching : Can we multi-thread the TN-Grid wu's?


Main page · Your account · Message boards


Copyright © 2024 CNR-TN & UniTN