Skip to content

fix unit tests after changes in framework#769

Merged
boegel merged 4 commits intoeasybuilders:developfrom
boegel:fix_unit_tests
Mar 26, 2014
Merged

fix unit tests after changes in framework#769
boegel merged 4 commits intoeasybuilders:developfrom
boegel:fix_unit_tests

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Mar 24, 2014

@boegel boegel added this to the v1.12 milestone Mar 24, 2014
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 24, 2014

@stdweird: review this too please?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 24, 2014

Jenkins: test this please

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 25, 2014

@stdweird: figured out what is making the easyconfigs so slow: logging.

Here's a partial profile of a full unit test suite run (develop branch):

         5559624750 function calls (5554258361 primitive calls) in 3332.586 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.005    0.005 3332.693 3332.693 suite.py:32(<module>)
        1    0.000    0.000 3331.975 3331.975 runner.py:140(run)
      2/1    0.000    0.000 3331.975 3331.975 suite.py:69(__call__)
      2/1    0.094    0.047 3331.975 3331.975 suite.py:88(run)
     2366    0.026    0.000 3331.807    1.408 case.py:394(__call__)
     2366    0.133    0.000 3331.781    1.408 case.py:297(run)
   648797    0.944    0.000 2887.887    0.004 inspect.py:1052(stack)
   648797   21.644    0.000 2886.653    0.004 inspect.py:1025(getouterframes)
 16398805   87.317    0.000 2861.291    0.000 inspect.py:987(getframeinfo)
   558772    2.528    0.000 2707.442    0.005 __init__.py:1249(_log)
   558772    2.381    0.000 2589.094    0.005 fancylogger.py:177(makeRecord)
   558772    2.864    0.000 2582.499    0.005 fancylogger.py:154(__init__)
   558772    8.110    0.000 2563.293    0.005 fancylogger.py:359(_getCallingClassName)
     2363    0.301    0.000 2447.180    1.036 easyconfigs.py:180(template_easyconfig_test)
   451171    2.240    0.000 2066.104    0.005 __init__.py:1127(debug)
 16398805  104.832    0.000 2016.085    0.000 inspect.py:518(findsource)
     2363    0.304    0.000 1889.964    0.800 tools.py:243(process_easyconfig)
17117700/17117687  740.596    0.000 1727.006    0.000 inspect.py:472(getmodule)
32798039/32797832  156.905    0.000 1320.577    0.000 inspect.py:440(getsourcefile)
     2363    0.482    0.000 1086.021    0.460 easyconfig.py:77(__init__)
    59240    1.166    0.000  928.411    0.016 module_generator.py:266(det_full_module_name)
     2363    0.548    0.000  874.750    0.370 easyconfig.py:212(parse)
     4728    0.075    0.000  776.286    0.164 modules.py:798(modules_tool)
     4728    0.136    0.000  775.952    0.164 modules.py:135(__init__)
        2    0.000    0.000  682.440  341.220 easyconfigs.py:80(process_all_easyconfigs)
        2    0.899    0.450  682.146  341.073 tools.py:360(resolve_dependencies)
       22    1.494    0.068  680.799   30.945 tools.py:319(find_resolved_modules)
     4483    0.099    0.000  670.613    0.150 easyconfig.py:396(toolchain)
1157386644  362.352    0.000  568.027    0.000 inspect.py:51(ismodule)
     2363    0.049    0.000  508.128    0.215 compiler.py:125(__init__)
    14186    4.024    0.000  507.498    0.036 modules.py:396(run_module)
    82289    0.449    0.000  491.508    0.006 __init__.py:1139(info)
        1    0.000    0.000  458.879  458.879 easyconfigs.py:93(test_dep_graph)
     2363    0.192    0.000  437.244    0.185 easyblock.py:107(__init__)
        1    0.192    0.192  425.300  425.300 easyconfigs.py:113(test_conflicts)
     2025    0.044    0.000  414.194    0.205 mpi.py:73(__init__)
     2363    0.034    0.000  396.437    0.168 toolchain.py:69(__init__)
     4726    0.023    0.000  388.494    0.082 easyconfig.py:587(generate_template_values)
     9452    0.350    0.000  388.471    0.041 easyconfig.py:593(_generate_template_values)
     4728    1.333    0.000  378.354    0.080 modules.py:185(set_and_check_version)
     9452    0.498    0.000  377.139    0.040 templates.py:127(template_constant_dict)
    59240    0.652    0.000  362.148    0.006 module_generator.py:228(get_custom_module_naming_scheme)
    87647    0.756    0.000  336.631    0.004 fancylogger.py:323(getLogger)
     1925    0.016    0.000  324.828    0.169 linalg.py:78(__init__)
     1925    0.024    0.000  324.808    0.169 fft.py:47(__init__)
    87647    0.783    0.000  321.287    0.004 fancylogger.py:371(getRootLoggerName)
 49556313  107.429    0.000  320.669    0.000 inspect.py:398(getfile)
1593730365  305.153    0.000  305.153    0.000 {isinstance}
...

the makeRecord entry kind of gave it away... In the master branch, makeRecord only took ~40s of cumulative time with half of the amount of calls, so some recent change to the logging in vsc-base made makeRecord 130x slower... :|
@JensTimmerman: does this ring a bell for you?

disabling all logging in these unit tests (it's not needed at all here) speeds things up from 1744s (without profiling) to 346s on my laptop

@stdweird
Copy link
Copy Markdown
Contributor

it looks good

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 26, 2014

Jenkins: test this please

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 26, 2014

@stdweird: thanks for the review!

boegel added a commit that referenced this pull request Mar 26, 2014
fix unit tests after changes in framework
@boegel boegel merged commit a235897 into easybuilders:develop Mar 26, 2014
@boegel boegel deleted the fix_unit_tests branch March 26, 2014 07:49
@fgeorgatos
Copy link
Copy Markdown
Contributor

Test report by @fgeorgatos
SUCCESS
Build succeeded for 0 out of 0
Linux debian 6.0.9, Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz, Python 2.6.6
See https://gist.github.com/08a954e6ef9d52213655 for a full test report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants