Skip to content

Commit

Permalink
[ENH] Limit tedana to one core (#215)
Browse files Browse the repository at this point in the history
* Add environment variables

* Remove n_cores argument and add new environment variable.

* Ignore certain linter errors.
  • Loading branch information
tsalo authored and emdupre committed Feb 11, 2019
1 parent e7106ed commit 16cfa72
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__)

Expand Down

0 comments on commit 16cfa72

Please sign in to comment.