diff options
author | Sam Gross <sgross@fb.com> | 2016-03-31 23:42:01 +0300 |
---|---|---|
committer | Sam Gross <sgross@fb.com> | 2016-03-31 23:44:36 +0300 |
commit | 3d96ddaafa2d52639beb9bf2e1badcf218fd90b3 (patch) | |
tree | 00d60f7ee9dbbe64c15e840907660de3c0acf6e2 /Tester.lua | |
parent | db238cb76eecca7ff367cd6a1aac45093beeaffb (diff) |
Only require sys.colors from sys
Loading the sys package can cause a deadlock in some OpenBLAS
configurations when multiple Torch threads require sys (via the torch
package) at the same time.
Depends on torch/sys#8
Diffstat (limited to 'Tester.lua')
-rw-r--r-- | Tester.lua | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -377,14 +377,13 @@ end local NCOLS = 80 local coloured -local c = {} -local enable_colors = pcall(require, 'sys') +local enable_colors, c = pcall(require, 'sys.colors') if arg and enable_colors then -- have we been invoked from the commandline? - c = sys.COLORS coloured = function(str, colour) return colour .. str .. c.none end else + c = {} coloured = function(str) return str end |