-
Notifications
You must be signed in to change notification settings - Fork 2.4k
module refresh is really slow #15030
Copy link
Copy link
Closed
Labels
Description
I needed to refresh the modules for a software stack of ~1825 packages. There was duplication due to multiple compilers but the process took ~9.5 hours. I just ran a partial command with profiling for ~45 minutes. It had not even started writing any modules out, it was still examining what was installed.
$ spack --profile module tcl refresh
^C 6255707859 function calls (5568594494 primitive calls) in 2901.253 seconds
Ordered by: internal time
List reduced from 1992 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
452254289/73291968 829.039 0.000 1834.109 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:1210(traverse_edges)
148376441 186.856 0.000 336.033 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/dependency.py:20(canonical_deptype)
245188300/24739085 164.398 0.000 312.553 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/util/spack_json.py:40(_strify)
226395477/226360653 157.975 0.000 391.097 0.000 {built-in method builtins.sorted}
982257997/982257994 130.856 0.000 130.867 0.000 {built-in method builtins.isinstance}
217146188 99.705 0.000 152.105 0.000 /usr/lib64/python3.6/_collections_abc.py:742(__iter__)
908660893 89.024 0.000 89.024 0.000 {method 'get' of 'dict' objects}
146071994 54.300 0.000 54.300 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/dependency.py:38(<listcomp>)
292140702 45.898 0.000 45.898 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:1312(<genexpr>)
179115567/101182231 43.119 0.000 66.251 0.000 {built-in method builtins.len}
445122795 42.973 0.000 42.973 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:1265(validate)
114721390 42.512 0.000 226.188 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/util/spack_json.py:53(<genexpr>)
1088 42.154 0.039 354.705 0.326 /usr/lib64/python3.6/json/decoder.py:345(raw_decode)
73290070 38.356 0.000 1882.752 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:1195(traverse)
2306940/2306718 36.865 0.000 274.339 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:947(__init__)
4610542 35.896 0.000 39.798 0.000 /usr/lib64/python3.6/shlex.py:129(read_token)
146073045/146073033 33.023 0.000 56.179 0.000 {built-in method builtins.any}
71016687 32.613 0.000 45.062 0.000 /usr/lib64/python3.6/_collections_abc.py:676(items)
2301285 28.855 0.000 520.125 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/spec.py:1642(from_node_dict)
25189360 27.953 0.000 52.357 0.000 /opt/packages/gpjohnsn/spack/lib/spack/spack/util/spack_json.py:48(<listcomp>)
==> Error: Keyboard interrupt.Reactions are currently unavailable