CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Running Fluent by Hyper-threading

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2014, 05:28
Question Running Fluent by Hyper-threading
  #1
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Hi,

My desktop has single CPU of 4 cores. Since it uses hyper-threading technology, the task manager shows 8 cores. When I start 8 Fluent one 'core' simulations at the same time, then every Fluent simulation get one 'core' (can be 'real' or 'fictious'). Then almost all the simulations become quite slow. I think that's because the corresponding real core and fictious core of each pair are used to run different simulation.

I'm wondering how to distribute the best combination of real cores and fictious cores to a Fluent simulation. For example, still with my desktop, supposing I need to run 4 Fluent simulations and each of them require 2 cores. How to make sure each of the 4 Fluent simulations get the right corresponding 2 cores (real and fictious cores)? Will Fluent select the right combinations to maximize its efficiency automatically?
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   August 13, 2014, 17:02
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I disable hyperthreading on all machines to avoid having this issue. That way, jobs are assigned only to physical cores. Usually with CFD there are rarely unused cpu cycles anyway and hyperthreading only slows performance.

Because of the way SMP is implemented, the distributing of tasks is up to the system job scheduler and there is nothing the user can do, sometimes the job scheduler can do nothing.

Take for example, the windows job scheduler. As far as I know, since Win7 the job scheduler is intelligent enough to prioritize physical cores before virtual cores. Before Win7 the tasks were randomly assigned and there was a possibility of a job landing landing on a physical virtual core pair and left other physical cores unloaded and idle.

I'm not sure how well linux job schedulers are in this aspect, but I think either way there's nothing users can do.
LuckyTran is offline   Reply With Quote

Old   August 13, 2014, 22:36
Question
  #3
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
I disable hyperthreading on all machines to avoid having this issue. That way, jobs are assigned only to physical cores. Usually with CFD there are rarely unused cpu cycles anyway and hyperthreading only slows performance.

Because of the way SMP is implemented, the distributing of tasks is up to the system job scheduler and there is nothing the user can do, sometimes the job scheduler can do nothing.

Take for example, the windows job scheduler. As far as I know, since Win7 the job scheduler is intelligent enough to prioritize physical cores before virtual cores. Before Win7 the tasks were randomly assigned and there was a possibility of a job landing landing on a physical virtual core pair and left other physical cores unloaded and idle.

I'm not sure how well linux job schedulers are in this aspect, but I think either way there's nothing users can do.

Does that mean I’d better also disable my hyper-threading even I’m using win7 system?

That’s quite strange. I remember that there was a IBM&Fluent paper telling that hyper threading could improve the Fluent calculation speed by 5% to 8%. It seems Fluent is somehow encouraging the usage of hyper-threading if the license is not the limit.

Btw, I have another workstation, which is also running with win7 system, has 4 Intel Xeon CPU and each CPU has 8 real cores (supposing I turn off all the fictitious cores and the 8 cores per CPU left are all the real cores). I’m wondering if I start an 8 cores Fluent simulation, will the 8 cores all from the same CPU? Using the cores from the same CPU can save the data transfer time between different CPUs in the motherboard. What I run two 4 cores Fluent jobs? How will the cores being used be distributed? Does Fluent or win7 has the intelligence to run simulation by using cores from the same CPU as much as possible?
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   August 14, 2014, 05:01
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Anna Tian View Post
Does that mean I’d better also disable my hyper-threading even I’m using win7 system?
Hyperthreading works if the CPU has available idle time and there are no other bottlenecks in the system. Given the size & scale of the jobs you're doing, I highly doubt that there is any idle time.

I still disable HT even on Win7 just to save the headaches. If any of the physical cores are sufficiently loaded when the job is scheduled (browsing a website that's playing an HD video, etc), then it's easy to get threads assigned to physical-virtual sibling cores and then you are stuck until the job is done because the threads cannot be rescheduled. Or you can get into the habit of unloading all the cores before you start Fluent (shut down all programs, etc).

Quote:
Originally Posted by Anna Tian View Post
Btw, I have another workstation, which is also running with win7 system, has 4 Intel Xeon CPU and each CPU has 8 real cores (supposing I turn off all the fictitious cores and the 8 cores per CPU left are all the real cores). I’m wondering if I start an 8 cores Fluent simulation, will the 8 cores all from the same CPU? Using the cores from the same CPU can save the data transfer time between different CPUs in the motherboard. What I run two 4 cores Fluent jobs? How will the cores being used be distributed? Does Fluent or win7 has the intelligence to run simulation by using cores from the same CPU as much as possible?
That is an interesting point. In the windows desktop environment I don't think there is a way to force it to run on the same CPU socket because the scheduler "intelligently" uses the best available cores (best = the cores currently doing the least work). In the windows server HPC environment which is used for clusters, it is possible by specifying the resources as a socket-level task so that all cores used will be on the same socket.
LuckyTran is offline   Reply With Quote

Old   August 14, 2014, 23:36
Default
  #5
Member
 
M. Nabi
Join Date: Jun 2009
Posts: 44
Rep Power: 16
mnabi is on a distinguished road
To force it to run on a specific core(s), open Task manager, go to Processes, right click and then choose "Set Affinity". There you can choose which cores you want to associate for that specific run.

From my experience, for the parallel computing (OpenMP), the multithread doesn't function with high efficiency. But as long as you have a single job, you can assign it to a specific core (real or virtual) and it works like a real core. Don't forget to don't put maximum 7 runs on 8 cores, otherwise the some runs get slow randomly.
mnabi is offline   Reply With Quote

Old   August 15, 2014, 00:29
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by mnabi View Post
To force it to run on a specific core(s), open Task manager, go to Processes, right click and then choose "Set Affinity". There you can choose which cores you want to associate for that specific run.
That's pretty helpful. You would have to set the affinity each time or setup a specific start-up script to take advantage of the process affinity.

But how would you determine which CPUs are physical or virtual, or which CPUs belong to which socket? As far as I know, the task manager does not have this capability and you must use some form of CPUID to detect if a cpu is physical or virtual and/or which socket.
LuckyTran is offline   Reply With Quote

Old   August 16, 2014, 05:21
Question
  #7
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
That's pretty helpful. You would have to set the affinity each time or setup a specific start-up script to take advantage of the process affinity.

But how would you determine which CPUs are physical or virtual, or which CPUs belong to which socket? As far as I know, the task manager does not have this capability and you must use some form of CPUID to detect if a cpu is physical or virtual and/or which socket.
In this way, people shall turn off hyperthreading for most of the cases if they use multi cores to run more than one simulations.
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   August 16, 2014, 18:21
Default
  #8
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26
ghost82 will become famous soon enough
I also recommend to turn off hyperthreading.
Hyperthreading must be disabled from bios.

I also read an Ansys document about increasing performances with ht, but my tests (on my cases) and many other users experiences show a not negligible increase in performances with ht off.
ghost82 is offline   Reply With Quote

Old   August 16, 2014, 22:24
Question
  #9
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Quote:
Originally Posted by ghost82 View Post
I also recommend to turn off hyperthreading.
Hyperthreading must be disabled from bios.

I also read an Ansys document about increasing performances with ht, but my tests (on my cases) and many other users experiences show a not negligible increase in performances with ht off.

If the system will always go for the most idle CPU to ask for more cores, could I do the following to avoid turning off hyper threading?

For my case, I have 32 real cores and 32 fictitious cores. What if I always use at most 32 cores to run the Fluent simulations? Then the system will only give the work to the 32 real cores, right? I will never let the simulation use more than 32 cores, then it will usually work at the maximum speed it can, right?
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   August 17, 2014, 03:31
Default
  #10
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26
ghost82 will become famous soon enough
Yes, I think so, I would turn off ht in each node.
This was my little test:

http://www.cfd-online.com/Forums/har...tml#post477571

As you can see if you set ht on but you set the number of threads equal to that of the physical cores you will end to a decrease in performances.
Best was to turn ht off from bios and set the number of threads to that of the physical cores.
The test was performed with a mesh of about 400000 cells, but similar results can be achieved with bigger meshes.

By monitoring the percentage of usage of the cores with ht turned on I could see that cpu0 worked near 90% (other cores at 99-100%).
With ht off all cores worked at 99-100%.
ghost82 is offline   Reply With Quote

Old   January 11, 2021, 12:03
Default
  #11
New Member
 
Spiros Kouzoupis
Join Date: Jan 2021
Posts: 10
Rep Power: 5
Spiros Kouzoupis is on a distinguished road
Quote:
Originally Posted by ghost82 View Post
Yes, I think so, I would turn off ht in each node.
This was my little test:

http://www.cfd-online.com/Forums/har...tml#post477571

As you can see if you set ht on but you set the number of threads equal to that of the physical cores you will end to a decrease in performances.
Best was to turn ht off from bios and set the number of threads to that of the physical cores.
The test was performed with a mesh of about 400000 cells, but similar results can be achieved with bigger meshes.

By monitoring the percentage of usage of the cores with ht turned on I could see that cpu0 worked near 90% (other cores at 99-100%).
With ht off all cores worked at 99-100%.
Hi,

I want to ask, i have an Intel i7 8700k 6 cores 12 threads running my cpu 100% when i do simulations ( in user interfaces i put 12 cores 1 gpu), would it run faster if i disabled ht (then ill put 6 cores 1 gpu on user interface) ? Also upgrading to i9 9900k 8 cores 16 threads will help run faster?
Spiros Kouzoupis is offline   Reply With Quote

Old   January 12, 2021, 21:48
Default
  #12
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
there are several threads about hyper threading on this forum.
As far as I know, it is not efficient for Fluent simulations. It is recommended to set physical number of core, you have, 6 in your case.
But I would set 5 in your case.
About GPU, most likely you don't have GPU suitable for Fluent simulations. You may find this information on ansys portal. Now I don't exactly remember names of GPU recommended by ansys.
upgrade to i9 may increase efficiency slightly. Think about xeon 2 processor workstations also, they have significant amount of cores.

You may always check effect of core numbers by your own, it may vary from case to case
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 13, 2021, 04:05
Default
  #13
New Member
 
Spiros Kouzoupis
Join Date: Jan 2021
Posts: 10
Rep Power: 5
Spiros Kouzoupis is on a distinguished road
Hi

Yes i have read the others about ht, but i wanted to be sure. Why 5 cores and not 6? I have rtx 2070,i have read about quadro nvidia. My socket is 1151 so only xeon e 2288 G is suitable but is not better than i9 as far as i have seen in markings. Also im thinking buying 64 gb ram.
Spiros Kouzoupis is offline   Reply With Quote

Old   January 13, 2021, 15:01
Default Cff files
  #14
New Member
 
Spiros Kouzoupis
Join Date: Jan 2021
Posts: 10
Rep Power: 5
Spiros Kouzoupis is on a distinguished road
Anyone knows how to save in cff format? Cause i cant find it in ansys 2020 r2
Spiros Kouzoupis is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The monitor is flashing when running ANSYS FLUENT nvtrieu ANSYS 0 May 3, 2013 03:02
Fluent can't run in parallel when hyper threading turning on. field FLUENT 0 May 5, 2011 07:41
running multiple Fluent parallel jobs Michael Bo Hansen FLUENT 8 June 7, 2006 08:52
PVM running of FLUENT Joe Yan FLUENT 0 February 27, 2006 03:48
FLUENT 5.2.3 running on PIII 733 Burley Wang FLUENT 7 April 19, 2000 06:03


All times are GMT -4. The time now is 14:33.