Skip to content
Snippets Groups Projects
Commit f66320df authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Merge branch 'lintao/build/fix-unlimited' into 'master'

Fix the build issue when ulimit -u is unlimited.

See merge request !156
parents 8b99fa94 ab6752ee
No related branches found
No related tags found
No related merge requests found
......@@ -92,8 +92,12 @@ function run-make() {
# following is IHEP specific hack due to the limitation of nthreads 150.
local nthreads=$(ulimit -u)
local factor=16
nthreads=$((nthreads/factor)) # assume it is safe to divide by scale factor.
if [ "$nthreads" = "unlimited" ]; then
nthreads=$njobs
else
local factor=16
nthreads=$((nthreads/factor)) # assume it is safe to divide by scale factor.
fi
# min(njobs, nthreads)
njobs=$((njobs<nthreads ? njobs: nthreads))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment