Skip to content

Commit

Permalink
fftw_fix (gwastro#4418)
Browse files Browse the repository at this point in the history
* Allow pycbc inspiral to run with only numpy fft

* Remove Unneeded function from npfft.py

---------

Co-authored-by: Neeresh Kumar Perla <neereshkumarperla@Neereshs-MacBook-Pro.local>
  • Loading branch information
2 people authored and PRAVEEN-mnl committed Nov 3, 2023
1 parent 6a2fc81 commit cb841ff
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions bin/pycbc_inspiral
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,21 @@ def template_triggers(t_num):
return out_vals_all, tparam

with ctx:
# The following FFTW specific options needed to wait until
# we were inside the scheme context.
if opt.fft_backends == 'fftw':

# Import system wisdom.
if opt.fftw_import_system_wisdom:
fft.fftw.import_sys_wisdom()
# The following FFTW specific options needed to wait until
# we were inside the scheme context.

# Read specified user-provided wisdom files
if opt.fftw_input_float_wisdom_file is not None:
fft.fftw.import_single_wisdom_from_filename(opt.fftw_input_float_wisdom_file)
# Import system wisdom.
if opt.fftw_import_system_wisdom:
fft.fftw.import_sys_wisdom()

if opt.fftw_input_double_wisdom_file is not None:
fft.fftw.import_double_wisdom_from_filename(opt.fftw_input_double_wisdom_file)
# Read specified user-provided wisdom files
if opt.fftw_input_float_wisdom_file is not None:
fft.fftw.import_single_wisdom_from_filename(opt.fftw_input_float_wisdom_file)

if opt.fftw_input_double_wisdom_file is not None:
fft.fftw.import_double_wisdom_from_filename(opt.fftw_input_double_wisdom_file)

flow = opt.low_frequency_cutoff
flen = strain_segments.freq_len
Expand Down Expand Up @@ -499,10 +501,11 @@ event_mgr.save_performance(ncores, len(segments), len(bank), run_time, tsetup)
logging.info("Writing out triggers")
event_mgr.write_events(opt.output)

if opt.fftw_output_float_wisdom_file:
fft.fftw.export_single_wisdom_to_filename(opt.fftw_output_float_wisdom_file)
if opt.fft_backends == 'fftw':
if opt.fftw_output_float_wisdom_file:
fft.fftw.export_single_wisdom_to_filename(opt.fftw_output_float_wisdom_file)

if opt.fftw_output_double_wisdom_file:
fft.fftw.export_double_wisdom_to_filename(opt.fftw_output_double_wisdom_file)
if opt.fftw_output_double_wisdom_file:
fft.fftw.export_double_wisdom_to_filename(opt.fftw_output_double_wisdom_file)

logging.info("Finished")

0 comments on commit cb841ff

Please sign in to comment.