Hello,

I have a problem with make -j parallel execution in our project build.

My environment information
OS: Red Hat 7.7 virtual machine with 4 CPUs

lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 63
Model name:            Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz
Stepping:              2
CPU MHz:               2297.339
BogoMIPS:              4594.67
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              40960K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm 
constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc 
eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt 
tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 
invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 
invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities

GNU make:
/opt/rh/devtoolset-9/root/usr/bin/make  GNU Make 4.2.1
/usr/bin/make  GNU Make 3.82

gcc/g++: /opt/rh/devtoolset-9/root/usr/bin/gcc, 
/opt/rh/devtoolset-9/root/usr/bin/g++  gcc version 9.1.1 20190605 (Red Hat 
9.1.1-2) (GCC)

If I build our project with /opt/rh/devtoolset-9/root/usr/bin/make  -j 4, there 
is only on g++ process. In other words, -j 4 parallel execution option does not 
work here. The project build takes 75 minutes.

[cid:image001.png@01D7F681.ABE27C80]

If I build our project with /usr/bin/make   -j 4, I can see 4 g++ process. The 
project build takes only 25 minutes.

[cid:image002.png@01D7F681.ABE27C80]

I checked related GNU make document. It seems no additional configuration is 
required for -j option.

https://www.gnu.org/software/make/manual/html_node/Parallel.html

I need your help to make progress in this task. Could you help to look into it?
Is this a misconfiguration in my project build environment or a bug in GNU Make 
4.2.1?
Is there anyway to get it work?

Thanks,
Mason


Reply via email to