Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Gross <sgross@fb.com>2016-03-31 23:42:01 +0300
committerSam Gross <sgross@fb.com>2016-03-31 23:44:36 +0300
commit3d96ddaafa2d52639beb9bf2e1badcf218fd90b3 (patch)
tree00d60f7ee9dbbe64c15e840907660de3c0acf6e2 /Tester.lua
parentdb238cb76eecca7ff367cd6a1aac45093beeaffb (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.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/Tester.lua b/Tester.lua
index c114bbf..c1b1a84 100644
--- a/Tester.lua
+++ b/Tester.lua
@@ -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