Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
b995161d
Commit
b995161d
authored
Jan 19, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Debug Prints
Signed-off-by:
Gaurav Kukreja
<
gmkukreja@gmail.com
>
parent
4bcb6a60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
40 deletions
+14
-40
SWE_WavePropagationBlock.cpp
src/blocks/SWE_WavePropagationBlock.cpp
+14
-32
swe_mpi.cpp
src/examples/swe_mpi.cpp
+0
-8
No files found.
src/blocks/SWE_WavePropagationBlock.cpp
View file @
b995161d
...
...
@@ -430,8 +430,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_innerBlock ()
for
(
i
=
2
;
i
<
nx
;
i
++
)
{
j
;
//std::cout << __FILE__ << ": " << __LINE__ << endl;
#if WAVE_PROPAGATION_SOLVER==4 and defined VECTORIZE
// Vectorization is currently only possible for the FWaveVec solver
// Vectorize the inner loop
...
...
@@ -492,8 +490,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_innerBlock ()
//assert (j = ny + 2);
}
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
// vvvvv GKUKREJA : Fusing the loops for horizontal and vertical edges, adding this one extra iteration to avoid if looping.
{
...
...
@@ -509,27 +505,23 @@ SWE_WavePropagationBlock::computeNumericalFluxes_innerBlock ()
#pragma omp for schedule(static) nowait
#endif
for
(
j
=
2
;
j
<
end_ny_1_1
;
++
j
)
{
float
maxEdgeSpeed
;
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
wavePropagationSolver
.
computeNetUpdates
(
h
[
i
-
1
][
j
],
h
[
i
][
j
],
hu
[
i
-
1
][
j
],
hu
[
i
][
j
],
b
[
i
-
1
][
j
],
b
[
i
][
j
],
hNetUpdatesLeft
[
i
-
1
][
j
-
1
],
hNetUpdatesRight
[
i
-
1
][
j
-
1
],
huNetUpdatesLeft
[
i
-
1
][
j
-
1
],
huNetUpdatesRight
[
i
-
1
][
j
-
1
],
maxEdgeSpeed
);
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
float
maxEdgeSpeed
;
wavePropagationSolver
.
computeNetUpdates
(
h
[
i
-
1
][
j
],
h
[
i
][
j
],
hu
[
i
-
1
][
j
],
hu
[
i
][
j
],
b
[
i
-
1
][
j
],
b
[
i
][
j
],
hNetUpdatesLeft
[
i
-
1
][
j
-
1
],
hNetUpdatesRight
[
i
-
1
][
j
-
1
],
huNetUpdatesLeft
[
i
-
1
][
j
-
1
],
huNetUpdatesRight
[
i
-
1
][
j
-
1
],
maxEdgeSpeed
);
#ifdef LOOP_OPENMP
//update the thread-local maximum wave speed
l_maxWaveSpeed
=
std
::
max
(
l_maxWaveSpeed
,
maxEdgeSpeed
);
//update the thread-local maximum wave speed
l_maxWaveSpeed
=
std
::
max
(
l_maxWaveSpeed
,
maxEdgeSpeed
);
#else // LOOP_OPENMP
//update the maximum wave speed
maxWaveSpeed
=
std
::
max
(
maxWaveSpeed
,
maxEdgeSpeed
);
//update the maximum wave speed
maxWaveSpeed
=
std
::
max
(
maxWaveSpeed
,
maxEdgeSpeed
);
#endif // LOOP_OPENMP
}
}
...
...
@@ -570,8 +562,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_innerBlock ()
time_needed
+=
clock
()
-
time_begin
;
#endif
#endif
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
}
/**
...
...
@@ -597,8 +587,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_borders ()
// compute the loop limits
const
int
end_ny_1_1
=
ny
+
1
;
const
int
end_ny_1_2
=
ny
+
2
;
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
#ifdef LOOP_OPENMP
#pragma omp parallel
...
...
@@ -770,8 +758,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_borders ()
maxEdgeSpeed
);
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
wavePropagationSolver
.
computeNetUpdates
(
h
[
i
][
end_ny_1_2
-
2
],
h
[
i
][
end_ny_1_2
-
1
],
hv
[
i
][
end_ny_1_2
-
2
],
hv
[
i
][
end_ny_1_2
-
1
],
...
...
@@ -781,8 +767,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_borders ()
maxEdgeSpeed
);
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
#ifdef LOOP_OPENMP
//update the thread-local maximum wave speed
l_maxWaveSpeed
=
std
::
max
(
l_maxWaveSpeed
,
maxEdgeSpeed
);
...
...
@@ -827,8 +811,6 @@ SWE_WavePropagationBlock::computeNumericalFluxes_borders ()
time_needed
+=
clock
()
-
time_begin
;
#endif
#endif
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
}
/**
...
...
src/examples/swe_mpi.cpp
View file @
b995161d
...
...
@@ -394,8 +394,6 @@ int main( int argc, char** argv ) {
l_topNeighborRank
,
l_topInflow
,
l_topOutflow
,
l_mpiRow
);
std
::
cout
<<
"Exchanged Ghost Layers Initially
\n
"
;
// Init fancy progressbar
tools
::
ProgressBar
progressBar
(
l_endSimulation
,
l_mpiRank
);
...
...
@@ -473,18 +471,12 @@ int main( int argc, char** argv ) {
// compute numerical flux for inner edge
l_wavePropgationBlock
.
computeNumericalFluxes_innerBlock
();
// Only Inner Block
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
// checking if the borders have been exchanged
MPI_Wait
(
l_request
,
&
status
);
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
// compute numerical flux for the blocks
l_wavePropgationBlock
.
computeNumericalFluxes_borders
();
// Only Borders
std
::
cout
<<
__FILE__
<<
": "
<<
__LINE__
<<
endl
;
//! maximum allowed time step width within a block.
float
l_maxTimeStepWidth
=
l_wavePropgationBlock
.
getMaxTimestep
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment