Skip to content

Commit

Permalink
2d diff reac: temporarily omit openmp for python #73
Browse files Browse the repository at this point in the history
  • Loading branch information
fnrizzi committed Mar 30, 2022
1 parent edcf580 commit 252df0a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,19 @@ class EigenApp
jacobian_type * J) const
{

#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
#pragma omp parallel
{
#endif

#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
::pressiodemoapps::set_zero_omp(V);
#else
::pressiodemoapps::set_zero(V);
#endif

if (J){
#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
::pressiodemoapps::set_zero_omp(*J);
#else
::pressiodemoapps::set_zero(*J);
Expand All @@ -217,7 +217,7 @@ class EigenApp
assert(nonZerosCountBeforeComputing == J->nonZeros());
}

#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
}//end omp parallel
#endif

Expand All @@ -236,7 +236,7 @@ class EigenApp
m_ghostRight, m_ghostBack);

const auto & rowsBd = m_meshObj.graphRowsOfCellsNearBd();
#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
#pragma omp for schedule(static)
#endif
for (int it=0; it<rowsBd.size(); ++it){
Expand Down Expand Up @@ -283,7 +283,7 @@ class EigenApp
const auto diffDyInvSq = m_probA_diffusionCoeff*dyInvSq;

const auto & rows = m_meshObj.graphRowsOfCellsNearBd();
#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
#pragma omp for schedule(static)
#endif
for (std::size_t it=0; it<rows.size(); ++it)
Expand Down Expand Up @@ -366,7 +366,7 @@ class EigenApp
const auto diffDyInvSq = m_probA_diffusionCoeff*dyInvSq;

const auto & rows = m_meshObj.graphRowsOfCellsAwayFromBd();
#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
#pragma omp for schedule(static)
#endif
for (std::size_t it=0; it<rows.size(); ++it)
Expand Down Expand Up @@ -420,7 +420,7 @@ class EigenApp
const auto v_diffDyInvSq = m_gs_diffusionCoeff_v*dyInvSq;

const auto & graph = m_meshObj.graph();
#ifdef PRESSIODEMOAPPS_ENABLE_OPENMP
#if defined PRESSIODEMOAPPS_ENABLE_OPENMP && !defined PRESSIODEMOAPPS_ENABLE_BINDINGS
#pragma omp for schedule(static)
#endif

Expand Down

0 comments on commit 252df0a

Please sign in to comment.