Prevent OpenBLAS from spawning worker threads. TNL-6456

The RLIMIT_NPROC limit is per-user so simultaneous student submissions
pile up and overflow the limit.  Setting this environment variable will
prevent spawning any threads (the 1 means only have one threads, the
already existing main thread).
This commit is contained in:
Ned Batchelder
2017-02-22 16:39:51 -05:00
parent 4e464ec658
commit 1ea92aa2d5

View File

@@ -14,6 +14,9 @@ import hashlib
CODE_PROLOG = """\
from __future__ import division
import os
os.environ["OPENBLAS_NUM_THREADS"] = "1" # See TNL-6456
import random as random_module
import sys
random = random_module.Random(%r)