Commit cde05e68 authored by Theo Steininger's avatar Theo Steininger

Added threads parameter (mainly for fftw)

parent 3c771b2f
...@@ -76,12 +76,19 @@ variable_harmonic_rg_base = keepers.Variable( ...@@ -76,12 +76,19 @@ variable_harmonic_rg_base = keepers.Variable(
lambda z: z in ['real', 'complex'], lambda z: z in ['real', 'complex'],
genus='str') genus='str')
variable_threads = keepers.Variable(
'threads',
[1],
lambda z: np.int(abs(z)) == z,
genus='int')
nifty_configuration = keepers.get_Configuration( nifty_configuration = keepers.get_Configuration(
name='NIFTy', name='NIFTy',
variables=[variable_fft_module, variables=[variable_fft_module,
variable_default_field_dtype, variable_default_field_dtype,
variable_default_distribution_strategy, variable_default_distribution_strategy,
variable_harmonic_rg_base], variable_harmonic_rg_base,
variable_threads],
file_name='NIFTy.conf', file_name='NIFTy.conf',
search_paths=[os.path.expanduser('~') + "/.config/nifty/", search_paths=[os.path.expanduser('~') + "/.config/nifty/",
os.path.expanduser('~') + "/.config/", os.path.expanduser('~') + "/.config/",
......
...@@ -23,6 +23,7 @@ import warnings ...@@ -23,6 +23,7 @@ import warnings
import numpy as np import numpy as np
from d2o import distributed_data_object, STRATEGIES from d2o import distributed_data_object, STRATEGIES
from ....config import dependency_injector as gdi from ....config import dependency_injector as gdi
from ....config import nifty_configuration as gc
from .... import nifty_utilities as utilities from .... import nifty_utilities as utilities
from keepers import Loggable from keepers import Loggable
...@@ -535,7 +536,8 @@ class FFTWMPITransfromInfo(FFTWTransformInfo): ...@@ -535,7 +536,8 @@ class FFTWMPITransfromInfo(FFTWTransformInfo):
input_dtype='complex128', input_dtype='complex128',
output_dtype='complex128', output_dtype='complex128',
direction='FFTW_FORWARD' if codomain.harmonic else 'FFTW_BACKWARD', direction='FFTW_FORWARD' if codomain.harmonic else 'FFTW_BACKWARD',
flags=["FFTW_ESTIMATE"], flags=['FFTW_ESTIMATE'],
threads=gc['threads'],
**kwargs **kwargs
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment