Commit 5af4d1da authored by theos's avatar theos
Browse files

Removed deprecated entries from nifty/config/nifty_config.py

parent 8eea1f2d
...@@ -22,14 +22,6 @@ variable_fft_module = keepers.Variable( ...@@ -22,14 +22,6 @@ variable_fft_module = keepers.Variable(
'fft_module', 'fft_module',
['pyfftw', 'gfft', 'gfft_dummy'], ['pyfftw', 'gfft', 'gfft_dummy'],
lambda z: z in dependency_injector) lambda z: z in dependency_injector)
# gl_space needs libsharp
variable_lm2gl = keepers.Variable(
'lm2gl',
[True, False],
lambda z: (('libsharp_wrapper_gl' in
dependency_injector)
if z else True) and isinstance(z, bool),
genus='boolean')
def _healpy_validator(use_healpy): def _healpy_validator(use_healpy):
...@@ -59,11 +51,6 @@ variable_use_libsharp = keepers.Variable( ...@@ -59,11 +51,6 @@ variable_use_libsharp = keepers.Variable(
if z else True) and isinstance(z, bool), if z else True) and isinstance(z, bool),
genus='boolean') genus='boolean')
variable_verbosity = keepers.Variable('verbosity',
[1],
lambda z: z == abs(int(z)),
genus='int')
def _dtype_validator(dtype): def _dtype_validator(dtype):
try: try:
...@@ -86,41 +73,24 @@ variable_default_distribution_strategy = keepers.Variable( ...@@ -86,41 +73,24 @@ variable_default_distribution_strategy = keepers.Variable(
if z == 'fftw' else True), if z == 'fftw' else True),
genus='str') genus='str')
variable_default_comm = keepers.Variable(
'default_comm',
['COMM_WORLD'],
lambda z: hasattr(dependency_injector['MPI'], z))
nifty_configuration = keepers.get_Configuration( nifty_configuration = keepers.get_Configuration(
name='NIFTy', name='NIFTy',
variables=[variable_fft_module, variables=[variable_fft_module,
variable_lm2gl,
variable_use_healpy, variable_use_healpy,
variable_use_libsharp, variable_use_libsharp,
variable_verbosity,
variable_default_field_dtype, variable_default_field_dtype,
variable_default_distribution_strategy], variable_default_distribution_strategy,
variable_default_comm],
file_name='NIFTy.conf', file_name='NIFTy.conf',
search_pathes=[os.path.expanduser('~') + "/.config/nifty/", search_pathes=[os.path.expanduser('~') + "/.config/nifty/",
os.path.expanduser('~') + "/.config/", os.path.expanduser('~') + "/.config/",
'./']) './'])
########
### Compatibility variables
########
variable_mpi_module = keepers.Variable('mpi_module',
['MPI'],
lambda z: z in dependency_injector)
nifty_configuration.register(variable_mpi_module)
# register the default comm variable as the 'mpi_module' variable is now
# available
variable_default_comm = keepers.Variable(
'default_comm',
['COMM_WORLD'],
lambda z: hasattr(dependency_injector[
nifty_configuration['mpi_module']], z))
nifty_configuration.register(variable_default_comm)
######## ########
######## ########
......
...@@ -4,11 +4,9 @@ import numpy as np ...@@ -4,11 +4,9 @@ import numpy as np
from d2o import distributed_data_object,\ from d2o import distributed_data_object,\
STRATEGIES as DISTRIBUTION_STRATEGIES STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.config import nifty_configuration as gc,\ from nifty.config import dependency_injector as gdi
dependency_injector as gdi
MPI = gdi[gc['mpi_module']] MPI = gdi['MPI']
hp = gdi.get('healpy')
class PowerIndices(object): class PowerIndices(object):
......
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