diff --git a/examples/006_multisession_drift/pipelines.txt b/examples/006_multisession_drift/pipelines.txt index 365b1540..e8fb7af5 100644 --- a/examples/006_multisession_drift/pipelines.txt +++ b/examples/006_multisession_drift/pipelines.txt @@ -1 +1,2 @@ m2drift mountainsort2_drift_01.pipeline --num_time_segment_threads=20 --num_basic_sort_threads=2 +pip1 mountainsort2_drift_01.pipeline --num_time_segment_threads=1 --num_basic_sort_threads=1 diff --git a/packages/mountainsort2/algs/basic_sort.js b/packages/mountainsort2/algs/basic_sort.js index ebc9c6a9..1f2496e8 100644 --- a/packages/mountainsort2/algs/basic_sort.js +++ b/packages/mountainsort2/algs/basic_sort.js @@ -200,6 +200,7 @@ exports.run=function(opts,callback) { console.log('****** '+console_prefix+'BASIC SORT STEP '+(ii+1)+' of '+steps.length +' ******'); var timer=new Date(); step(function(result) { + if (!result) result={}; console.log ('Elapsed time ['+(result.processor_name||'')+'] (sec): '+get_elapsed_sec(timer)); cb(); }); diff --git a/packages/mountainsort2/src/mountainsort2_main.cpp b/packages/mountainsort2/src/mountainsort2_main.cpp index 7b0b93d6..88f32317 100644 --- a/packages/mountainsort2/src/mountainsort2_main.cpp +++ b/packages/mountainsort2/src/mountainsort2_main.cpp @@ -189,8 +189,9 @@ int main(int argc, char* argv[]) if (CLP.named_parameters.contains("_request_num_threads")) { int num_threads = CLP.named_parameters.value("_request_num_threads", 0).toInt(); - if (num_threads) + if (num_threads) { omp_set_num_threads(num_threads); + } } if (arg1 == "mountainsort.extract_neighborhood_timeseries") { diff --git a/packages/mountainsort2/src/p_bandpass_filter.cpp b/packages/mountainsort2/src/p_bandpass_filter.cpp index f1cc3b1d..fe9fc1ab 100644 --- a/packages/mountainsort2/src/p_bandpass_filter.cpp +++ b/packages/mountainsort2/src/p_bandpass_filter.cpp @@ -289,6 +289,7 @@ void define_kernel(int N, double* kernel, double samplefreq, double freq_min, do Mda32 bandpass_filter_kernel(Mda32& X, double samplerate, double freq_min, double freq_max, double freq_wid) { + QTime timer; timer.start(); long M = X.N1(); long N = X.N2(); long MN = M * N; @@ -309,6 +310,10 @@ Mda32 bandpass_filter_kernel(Mda32& X, double samplerate, double freq_min, doubl free(kernel0); free(Xhat); + double sec=timer.elapsed()*1.0/1000; + double rate=X.totalSize()/sec; + printf("bandpass filter rate: %g numbers/sec\n",rate); + return Y; } }