Commit 28eaf07f authored by Johannes Spazier's avatar Johannes Spazier

Added support for OpenMP within the build system.

parent ffe10ed6
......@@ -37,4 +37,8 @@ AC_MSG_NOTICE($cuda)
AC_PREFIX_DEFAULT([/usr/local/easywave])
AC_OPENMP
AC_SUBST(AM_CXXFLAGS,"$AM_CXXFLAGS $OPENMP_CXXFLAGS")
AC_OUTPUT
......@@ -35,8 +35,8 @@ easywave_SOURCES += ewCudaKernels.cu \
ewGpuNode.cuh \
EasyWaveGen.cu
easywave_LINK = $(NVCC) -O2 -o easywave
easywave_LINK = $(NVCC) -O2 -Xcompiler "$(OPENMP_CXXFLAGS)" -o easywave
else
easywave_SOURCES += EasyWave.cpp
easywave_LINK = $(CXX) $(CXXFLAGS) -o easywave
easywave_LINK = $(CXX) $(CXXFLAGS) $(OPENMP_CXXFLAGS) -o easywave
endif
......@@ -210,7 +210,7 @@ int ewStepCor( void )
CNode& Node = *gNode;
// sea floor topography (mass conservation)
#pragma omp parallel for default(shared) private(i,j,nod,absH)
#pragma omp parallel for default(shared) private(i,j,absH)
for( i=Imin; i<=Imax; i++ ) {
for( j=Jmin; j<=Jmax; j++ ) {
......@@ -279,7 +279,7 @@ int ewStepCor( void )
// moment conservation
// longitudial flux update
#pragma omp parallel for default(shared) private(i,j,nod,v1,v2)
#pragma omp parallel for default(shared) private(i,j,v1,v2)
for( i=Imin; i<=Imax; i++ ) {
for( j=Jmin; j<=Jmax; j++ ) {
......@@ -313,7 +313,7 @@ int ewStepCor( void )
}
// lattitudial flux update
#pragma omp parallel for default(shared) private(i,j,nod,v1,v2)
#pragma omp parallel for default(shared) private(i,j,v1,v2)
for( i=Imin; i<=Imax; i++ ) {
for( j=Jmin; j<=Jmax; j++ ) {
......
Markdown is supported
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