Fix python header include etc

Former-commit-id: f14e9673df8781be76d86df81394aacee7f557db
This commit is contained in:
Marek Nečada 2017-05-03 08:43:29 +03:00
parent 975e4c7162
commit 205c1316f3
3 changed files with 9 additions and 3 deletions

View File

@ -29,6 +29,7 @@ parser.add_argument('--sparse', action='store', type=int, help='Skip frequencies
parser.add_argument('--eVmax', action='store', type=float, help='Skip frequencies above this value') parser.add_argument('--eVmax', action='store', type=float, help='Skip frequencies above this value')
parser.add_argument('--eVmin', action='store', type=float, help='Skip frequencies below this value') parser.add_argument('--eVmin', action='store', type=float, help='Skip frequencies below this value')
parser.add_argument('--kdensity', action='store', type=int, default=66, help='Number of k-points per x-axis segment') parser.add_argument('--kdensity', action='store', type=int, default=66, help='Number of k-points per x-axis segment')
parser.add_argument('--lMax', action='store', type=int, help='Override lMax from the TMatrix file')
#TODO some more sophisticated x axis definitions #TODO some more sophisticated x axis definitions
parser.add_argument('--gaussian', action='store', type=float, metavar='σ', help='Use a gaussian envelope for weighting the interaction matrix contributions (depending on the distance), measured in unit cell lengths (?) FIxME).') parser.add_argument('--gaussian', action='store', type=float, metavar='σ', help='Use a gaussian envelope for weighting the interaction matrix contributions (depending on the distance), measured in unit cell lengths (?) FIxME).')
popgrp=parser.add_argument_group(title='Operations') popgrp=parser.add_argument_group(title='Operations')
@ -127,9 +128,13 @@ pdf = PdfPages(pdfout)
# specifikace T-matice zde # specifikace T-matice zde
cdn = c/ math.sqrt(epsilon_b) cdn = c/ math.sqrt(epsilon_b)
TMatrices_orig, freqs_orig, freqs_weirdunits_orig, lMax = qpms.loadScuffTMatrices(TMatrix_file) TMatrices_orig, freqs_orig, freqs_weirdunits_orig, lMaxTM = qpms.loadScuffTMatrices(TMatrix_file)
if pargs.lMax:
lMax = pargs.lMax if pargs.lMax else lMaxTM
my, ny = qpms.get_mn_y(lMax) my, ny = qpms.get_mn_y(lMax)
nelem = len(my) nelem = len(my)
if pargs.lMax: #force commandline specified lMax
TMatrices_orig = TMatrices_orig[...,0:nelem,:,0:nelem]
ž = np.arange(2*nelem) ž = np.arange(2*nelem)
= ž // nelem = ž // nelem

View File

@ -80,7 +80,7 @@ int qpms_trans_calculator_get_AB_arrays_ext(const qpms_trans_calculator *c,
int r_ge_d, int J); int r_ge_d, int J);
#ifdef QPMS_COMPILE_PYTHON_EXTENSIONS #ifdef QPMS_COMPILE_PYTHON_EXTENSIONS
#include <python3.4m/Python.h> #include <Python.h>
#include <numpy/npy_common.h> #include <numpy/npy_common.h>
int qpms_cython_trans_calculator_get_AB_arrays_loop( int qpms_cython_trans_calculator_get_AB_arrays_loop(
const qpms_trans_calculator *c, qpms_bessel_t J, const int resnd, const qpms_trans_calculator *c, qpms_bessel_t J, const int resnd,

View File

@ -27,7 +27,8 @@ qpms_c = Extension('qpms_c',
'-DDISABLE_NDEBUG', # uncomment to enable assertions in the modules '-DDISABLE_NDEBUG', # uncomment to enable assertions in the modules
#'-fopenmp', #'-fopenmp',
], ],
libraries=['gsl', 'blas', 'omp'], libraries=['gsl', 'blas', #'omp'
],
runtime_library_dirs=os.environ['LD_LIBRARY_PATH'].split(':') if 'LD_LIBRARY_PATH' in os.environ else [] runtime_library_dirs=os.environ['LD_LIBRARY_PATH'].split(':') if 'LD_LIBRARY_PATH' in os.environ else []
) )