RE: make -j does not work on RedHat7.7 VM
Hello Smith, Thank you for the comments. I will carefully check our make file configurations. Merry Christmas! Mason -Original Message- From: Paul Smith Sent: Friday, December 24, 2021 12:52 AM To: Zhu, Mason ; bug-make@gnu.org Cc: Gelle, Sreenivasulu ; Zheng, Fred ; Bedalov, Matthew ; Foster, Casey ; Levan, Mark Subject: Re: make -j does not work on RedHat7.7 VM On Thu, 2021-12-23 at 12:49 +, Zhu, Mason wrote: > In GNU Make 3.82, it seems that -j option will be finally added if > Make determines my VM has the parallel build capability. It has never been the case that any version of GNU make has automatically enabled parallel builds by itself. It's always been required that the user request it via the -j option. If you are seeing parallelism in 3.82 then someone provided -j on the command line or in MAKEFLAGS before starting make. I don't believe that GNU make 3.82 allows -j to be added to MAKEFLAGS inside the makefile and take effect in the current invocation of make. > However in GNU Make 4.2.1, there is no parallel build if I does not > explicitly set -jN option. Does this mean that you discovered a way to make parallel builds work as expected using GNU make 4.2.1? Just by adding this argument? Exactly how did you do this? If so we'll need to fully understand how you are enabling parallel builds in GNU make 3.82 and what change you made to make it work in GNU make 4.2.1.
make -j does not work on RedHat7.7 VM
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