polishing
This commit is contained in:
parent
3697bdb06e
commit
5059b5ce2d
|
@ -79,20 +79,20 @@ try:
|
||||||
with open(configFile,'r') as f:
|
with open(configFile,'r') as f:
|
||||||
print('\n<<<<< reading default values from %s\n'%configFile)
|
print('\n<<<<< reading default values from %s\n'%configFile)
|
||||||
for line in f:
|
for line in f:
|
||||||
[key,value] = (re.split('[= ]',line)+[None,None])[:2]
|
line = line.strip()
|
||||||
value = value.rstrip()
|
if line.startswith('#') or line == '':
|
||||||
|
|
||||||
if (not line.strip() or key.startswith('#')):
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
[key,value] = (re.split('[= ]',line)+[None,None])[:2]
|
||||||
|
|
||||||
if key == 'DAMASK_NUM_THREADS':
|
if key == 'DAMASK_NUM_THREADS':
|
||||||
defaults['DAMASK_NUM_THREADS'] = int(value)
|
defaults['DAMASK_NUM_THREADS'] = int(value)
|
||||||
if key == 'DAMASK_BIN':
|
if key == 'DAMASK_BIN':
|
||||||
defaults['DAMASK_BIN'] = value
|
defaults['DAMASK_BIN'] = value
|
||||||
for theKey in ['F90','FFTW_ROOT','HDF5_ROOT','MSC_ROOT','spectralOptions']:
|
if key in ['F90','FFTW_ROOT','HDF5_ROOT','MSC_ROOT','spectralOptions']:
|
||||||
if key == theKey:
|
|
||||||
defaults[key] = value
|
defaults[key] = value
|
||||||
for theKey in reversed(BLAS_order):
|
for theKey in reversed(BLAS_order):
|
||||||
if key == theKey+'_ROOT' and (value != None or value != ''):
|
if key == theKey+'_ROOT' and value != None and value != '':
|
||||||
defaults['blasType'] = theKey
|
defaults['blasType'] = theKey
|
||||||
defaults['blasRoot'][theKey] = value
|
defaults['blasRoot'][theKey] = value
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|
Loading…
Reference in New Issue