Minor changes; loosened up parallel build for dwarf.

This commit is contained in:
Todd Gamblin 2013-02-21 19:27:27 -08:00
parent b39165b999
commit bd59689fdc
6 changed files with 11 additions and 11 deletions

View file

@ -21,6 +21,7 @@ parser = argparse.ArgumentParser(
description='Spack: the Supercomputing PACKage Manager.')
parser.add_argument('-V', '--version', action='version', version="%s" % spack.spack_version)
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose')
parser.add_argument('-d', '--debug', action='store_true', dest='debug')
# each command module implements a parser() function, to which we pass its
# subparser for setup.
@ -35,6 +36,7 @@ args = parser.parse_args()
# Set up environment based on args.
spack.verbose = args.verbose
spack.debug = args.debug
# Try to load the particular command asked for and run it
command = spack.cmd.get_command(args.command)

View file

@ -68,7 +68,8 @@ def __call__(self, *args, **kwargs):
disable_parallel = env_flag(SPACK_NO_PARALLEL_MAKE)
if parallel and not disable_parallel:
args += ("-j%d" % multiprocessing.cpu_count(),)
jobs = "-j%d" % multiprocessing.cpu_count()
args = (jobs,) + args
super(MakeExecutable, self).__call__(*args, **kwargs)

View file

@ -33,9 +33,6 @@
# Curl tool for fetching files.
curl = which("curl", required=True)
verbose = False
debug = False
# Whether to build in tmp space or directly in the stage_path.
# If this is true, then spack will make stage directories in
# a tmp filesystem, and it will symlink them into stage_path.

View file

@ -9,9 +9,6 @@ class Libdwarf(Package):
url = "http://reality.sgiweb.org/davea/libdwarf-20130207.tar.gz"
md5 = "64b42692e947d5180e162e46c689dfbf"
# There's some kind of race in the makefile
parallel = False
depends_on("libelf")
def clean(self):
@ -38,7 +35,10 @@ def install(self, prefix):
with working_dir('dwarfdump2'):
configure("--prefix=%s" % prefix)
make()
# This makefile has strings of copy commands that
# cause a race in parallel
make(parallel=False)
install('dwarfdump', bin)
install('dwarfdump.conf', lib)

View file

@ -37,8 +37,8 @@ def info(msg, *args, **kwargs):
print "{}==>{} {}".format(color, reset, str(msg))
for arg in args: print indent + str(arg)
def verbose(*args):
if spack.verbose: msg(*args, color=green)
def verbose(msg, *args):
if spack.verbose: info(msg, *args, color=green)
def debug(*args):
if spack.debug: msg(*args, color=red)

View file

@ -132,7 +132,7 @@ def __call__(self, *args, **kwargs):
"Quotes aren't needed because spack doesn't use a shell. Consider removing them")
cmd = self.exe + list(args)
tty.verbose(cmd)
tty.verbose(" ".join(cmd))
if return_output:
return subprocess.check_output(cmd)