Skip to content
Snippets Groups Projects
Commit 487d0cf0 authored by carlocamilloni's avatar carlocamilloni
Browse files

Merge branch 'v2.3' into v2.4

parents e6d4c24e 0a82d573
No related branches found
No related tags found
No related merge requests found
...@@ -265,7 +265,7 @@ void ActionWithVessel::runAllTasks() { ...@@ -265,7 +265,7 @@ void ActionWithVessel::runAllTasks() {
// Get number of threads for OpenMP // Get number of threads for OpenMP
unsigned nt=OpenMP::getNumThreads(); unsigned nt=OpenMP::getNumThreads();
if( nt*stride*10>nactive_tasks || !threadSafe()) nt=1; if( nt*stride*2>nactive_tasks || !threadSafe()) nt=1;
// Get size for buffer // Get size for buffer
unsigned bsize=0, bufsize=getSizeOfBuffer( bsize ); unsigned bsize=0, bufsize=getSizeOfBuffer( bsize );
...@@ -275,7 +275,7 @@ void ActionWithVessel::runAllTasks() { ...@@ -275,7 +275,7 @@ void ActionWithVessel::runAllTasks() {
if( dertime_can_be_off ) dertime=false; if( dertime_can_be_off ) dertime=false;
if(timers) stopwatch.start("2 Loop over tasks"); if(timers) stopwatch.start("2 Loop over tasks");
#pragma omp parallel num_threads(nt) #pragma omp parallel num_threads(nt) schedule(dynamic)
{ {
std::vector<double> omp_buffer; std::vector<double> omp_buffer;
if( nt>1 ) omp_buffer.resize( bufsize, 0.0 ); if( nt>1 ) omp_buffer.resize( bufsize, 0.0 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment