Commit c01677d2 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added if(maxrecs>1) to omp parallel

parent d56b5744
...@@ -362,7 +362,7 @@ void *XTimstat(void *argument) ...@@ -362,7 +362,7 @@ void *XTimstat(void *argument)
if ( nsets == 0 ) if ( nsets == 0 )
{ {
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel for default(none) shared(maxrecs, recinfo, input_vars, vars1, samp1) #pragma omp parallel for default(none) shared(maxrecs, recinfo, input_vars, vars1, samp1) if(maxrecs>1)
#endif #endif
for ( int recID = 0; recID < maxrecs; recID++ ) for ( int recID = 0; recID < maxrecs; recID++ )
{ {
...@@ -390,7 +390,7 @@ void *XTimstat(void *argument) ...@@ -390,7 +390,7 @@ void *XTimstat(void *argument)
else else
{ {
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel for default(none) shared(lvarstd, nsets, maxrecs, recinfo, input_vars, vars1, samp1, vars2, operfunc) #pragma omp parallel for default(none) shared(lvarstd, nsets, maxrecs, recinfo, input_vars, vars1, samp1, vars2, operfunc) if(maxrecs>1)
#endif #endif
for ( int recID = 0; recID < maxrecs; recID++ ) for ( int recID = 0; recID < maxrecs; recID++ )
{ {
...@@ -446,7 +446,7 @@ void *XTimstat(void *argument) ...@@ -446,7 +446,7 @@ void *XTimstat(void *argument)
if ( lmean ) if ( lmean )
{ {
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel for default(none) shared(nsets, maxrecs, recinfo, vars1, samp1) #pragma omp parallel for default(none) shared(nsets, maxrecs, recinfo, vars1, samp1) if(maxrecs>1) if(maxrecs>1)
#endif #endif
for ( int recID = 0; recID < maxrecs; recID++ ) for ( int recID = 0; recID < maxrecs; recID++ )
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment