Conversation
25b48fa to
055cd22
Compare
055cd22 to
26048c0
Compare
|
Oh cool! I'll have to try that out once this is merged. |
|
I like making Spack run faster. But I'd like to make sure that there is a way to bootstrap a Spack-installed cYaml if the system doesn't provide one. We can't count on system cYaml being available, or the user being able to install it if it is; and once a few of these "improvements" pile up, it will become increasingly necessary to use them to experience Spack as it is intended. |
|
We just need to add libyaml to spack and then it's easy to bootstrap. |
|
@tgamblin Do you think this is worth a new row in the test matrix (one in which we |
|
I think we should test by On Fri, Oct 14, 2016 at 5:39 AM, Massimiliano Culpo <
|
|
Let me submit a PR and see if it affects the timing at all. |
|
Sounds reasonable. On Fri, Oct 14, 2016 at 11:25 AM, Adam J. Stewart [email protected]
|
|
@alalazo I think that's a good idea. I was going to say that YAML is really stable -- 3.11 came out in 2014, but new versions of pyyaml and libyaml actually just came out. So I think it would be useful to test. |
|
@tgamblin : After this merge, on bluegene-q system I see following: $ ./bin/spack --version
Traceback (most recent call last):
File "./bin/spack", line 98, in <module>
import spack
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/__init__.py", line 74, in <module>
repo = spack.repository.RepoPath()
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/repository.py", line 131, in __init__
repo_dirs = spack.config.get_config('repos')
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py", line 403, in get_config
data = scope.get_section(section)
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py", line 248, in get_section
data = _read_config_file(path, schema)
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/config.py", line 323, in _read_config_file
data = syaml.load(f)
File "/home/kumbhar/tmp_tk/spack/lib/spack/spack/util/spack_yaml.py", line 213, in load
return yaml.load(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/usr/lib64/python2.6/site-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "_yaml.pyx", line 702, in _yaml.CParser.get_single_node (ext/_yaml.c:7647)
File "_yaml.pyx", line 905, in _yaml.CParser._parse_next_event (ext/_yaml.c:10396)
yaml.reader.ReaderError: unacceptable character #x0000: control characters are not allowed
in "/home/kumbhar/tmp_tk/spack/etc/spack/defaults/repos.yaml", position 546If I go to the commit previous to this merge, it works fine: $ git checkout b27f4e3aebf6c1ecbefffc22a9a27a4fe9ce0ab3
$ ./bin/spack --version
0.9.1(note that this happens on one of the three bg-q system where I am trying) |
|
Can you attach /home/kumbhar/tmp_tk/spack/etc/spack/repos.yaml? |
$ ll spack/etc/spack/repos.yaml
ls: cannot access spack/etc/spack/repos.yaml: No such file or directorydo you mean spack/etc/spack/defaults/repos.yaml? (its unmodified, i cloned new repo for testing). |
This reverts commit d861a52.
Spack can make use of the faster c-implementation for yaml parsing: spack/spack#2010 Hence, we should install it prior to installing with spack as parsing yaml files is a huge bottleneck. Change-Id: Ief8b0c5fd6cfd91ea84120d639ab43f6629495a5
I threw this together working on #1562, and thought I'd just get it merged.
Spack ships with its own
PyYAMLmodule inlib/spack/external/yaml, but it doesn't use the Clibyamlbecause we don't want to require compiling anything -- Spack must run out of the box.cYAML is pretty fast, though, and with things like #1015 and #1535 the main bottleneck to operations like
spack findis YAML parsing.This patch makes Spack use an already-installed PyYAML and the
CParserandCLoaderfromlibyamlif they're available. It makes aspack findon @adamjstewart's 400+ installed packages from #1562 run 3x faster (1s vs 3s) on my laptop.@alalazo @davydden @adamjstewart @citibeth