How to decide the number of the threads of running lammps

Hi There,
As said in this page http://rpm.lammps.org/windows.html ,I should set **"OMP_NUM_THREADS=m". **And I was told that I should run lammps via “mpiexec -np n -localonly lmp_mpi -in in.filename”.

The question is how should I decide the value of “m” and “n”.

Here is the information of my cpu

Processors

Number of processors 1
Number of threads 8

APICs

Processor 0
– Core 0
– Thread 0 0
– Thread 1 1
– Core 1
– Thread 0 2
– Thread 1 3
– Core 2
– Thread 0 4
– Thread 1 5
– Core 3
– Thread 0 6
– Thread 1 7

Processors Information

Processor 1 ID = 0
Number of cores 4 (max 8)
Number of threads 8 (max 16)
Name Intel Core i7 4790
Codename Haswell
Specification Intel® Core™ i7-4790 CPU @ 3.60GHz
Package (platform ID) Socket 1150 LGA (0x1)
CPUID 6.C.3
Extended CPUID 6.3C
Core Stepping C0
Technology 22 nm
TDP Limit 84.0 Watts
Tjmax 100.0 癈
Core Speed 3990.5 MHz
Multiplier x Bus Speed 40.0 x 99.8 MHz
Stock frequency 3600 MHz
Instructions sets MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, EM64T, VT-x, AES, AVX, AVX2, FMA3
L1 Data cache 4 x 32 KBytes, 8-way set associative, 64-byte line size
L1 Instruction cache 4 x 32 KBytes, 8-way set associative, 64-byte line size
L2 cache 4 x 256 KBytes, 8-way set associative, 64-byte line size
L3 cache 8 MBytes, 16-way set associative, 64-byte line size
FID/VID Control yes

Turbo Mode supported, enabled
Max non-turbo ratio 36x
Max turbo ratio 40x
Max efficiency ratio 8x
O/C bins none
Ratio 1 core 40x
Ratio 2 cores 40x
Ratio 3 cores 39x
Ratio 4 cores 38x
TSC 3592.2 MHz
APERF 3906.3 MHz
MPERF 3592.0 MHz
IA Voltage Mode PCU adaptive
IA Voltage Offset 0 mV
GT Voltage Mode PCU adaptive
GT Voltage Offset 0 mV
LLC/Ring Voltage Mode PCU adaptive
LLC/Ring Voltage Offset 0 mV
Agent Voltage Mode PCU adaptive
Agent Voltage Offset 0 mV

Temperature 0 31癈 (87癋) [0x45] (Core #0)
Temperature 1 34癈 (93癋) [0x42] (Package)
Power 0 7.41 W (Package)
Power 1 2.63 W (IA Cores)
Power 2 n.a. (GT)
Power 3 4.79 W (Uncore)
Power 4 2.05 W (DRAM)
Voltage 0 1.16 Volts (VID)
Voltage 1 +0.00 Volts (IA Offset)
Voltage 2 +0.00 Volts (GT Offset)
Voltage 3 +0.00 Volts (LLC/Ring Offset)
Voltage 4 +0.00 Volts (System Agent Offset)

Sincerely,
Charles

Hi There,
As said in this page http://rpm.lammps.org/windows.html ,I should set *"OMP_NUM_THREADS=m".
*And I was told that I should run lammps via "mpiexec -np n -localonly
lmp_mpi -in in.filename".

The question is how should I decide the value of "m" and "n".

​choose the combination that gives you the best performance. that may be
different for different inputs, so you have to determine it empirically.

axel.