From 16cfa720f6202298d7587e72976c6e5e78eb904e Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 11 Feb 2019 14:25:43 -0500 Subject: [PATCH] [ENH] Limit tedana to one core (#215) * Add environment variables * Remove n_cores argument and add new environment variable. * Ignore certain linter errors. --- tedana/workflows/tedana.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tedana/workflows/tedana.py b/tedana/workflows/tedana.py index fb176646c..7f279ede6 100644 --- a/tedana/workflows/tedana.py +++ b/tedana/workflows/tedana.py @@ -2,6 +2,13 @@ Run the "canonical" TE-Dependent ANAlysis workflow. """ import os + +os.environ['MKL_NUM_THREADS'] = '1' +os.environ['NUMEXPR_NUM_THREADS'] = '1' +os.environ['OMP_NUM_THREADS'] = '1' +os.environ['VECLIB_MAXIMUM_THREADS'] = '1' +os.environ['OPENBLAS_NUM_THREADS'] = '1' + import os.path as op import shutil import logging @@ -12,8 +19,8 @@ import pandas as pd from scipy import stats -from tedana import decay, combine, decomposition, io, model, selection, utils from tedana.workflows.parser_utils import is_valid_file +from tedana import decay, combine, decomposition, io, model, selection, utils LGR = logging.getLogger(__name__)