Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Mar 2, 2017
1 parent a067d1b commit 7824df5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/006_multisession_drift/pipelines.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions packages/mountainsort2/algs/basic_sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
3 changes: 2 additions & 1 deletion packages/mountainsort2/src/mountainsort2_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
5 changes: 5 additions & 0 deletions packages/mountainsort2/src/p_bandpass_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}

0 comments on commit 7824df5

Please sign in to comment.