What is the difference between thread and core?

Hi, when i build my solver based on GUI, i found the
0758f74571770aeefb4ad59b3b1a253

What is the difference between thread and core? I have set the core to 2 4 1 in the three direction and give one thread. Is it reasonable?

another question, could GUI version can specify which node you are going to use in a workstation?

This is a little bit complicated because of hyper-threading: modern CPUs have both “physical” cores and “logical” cores. See “What is hyper-threading” for more. Hyperthreading means that one physical core can run two or more tasks (threads) at the same time, hence acting like multiple physical cores. Hyperthreading can be enabled/disabled in BIOS but we advise to keep it on.

In MFiX we use the term “core” to mean “logical” core or hyperthread. “64 cores available locally” means that you can run 64 tasks concurrently without creating processor wait states (not counting memory contention). The number of “threads” in the SMP options is the number of tasks MFiX will use on a single node. It can be greater than the number of cores available, but if so, MFiX will run very slowly so this is not recommended.

For DMP jobs, mpirun by default will only start as many tasks as PHYSICAL cores (no hyperthreading), so will not use your system to its fullest capacity. The --use-hwthread-cpus flag to mpirun makes it use LOGICAL cores instead (hyperthreading). We have this flag enabled by default but you can disable it if you have a reason to. More at https://stackoverflow.com/questions/48835603/unable-to-use-all-cores-with-mpirun

1 Like

I don’t understand this question. Do you mean which nodes in a cluster, for DMP jobs? This is all in the MPI configuration, not part of MFiX. I suggest you get help from your local systems group.

1 Like

Does it mean i should keep the thread number same with the sum of nodei node j nodek? Does a highe thread number is mostly favorable for efficiency or it is the same with DMP , by DMP, I mean two much physical cores lower the calculation efficiency due to communication cost)

No - the NODESI/NODESJ/NODESK numbers are for DMP (Distributed Memory Processing) and the “Threads” number is for SMP (Shared Memory Processing). SMP uses multiple cores on a single node, DMP uses cores across potentially multiple nodes. Typically one uses one or the other, although it is possible to have both enabled (this is non-standard).

See:
http://condor.cc.ku.edu/~grobe/docs/intro-MPI.shtml
https://hpc.llnl.gov/openmp-tutoria

DMP does not use threads - each DMP task is a single-threaded process and they communicate using network protocols.

SMP is based on threads - multiple streams of execution within the same process space, and accessing the same RAM.

1 Like