Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
8bdbf3fd
Commit
8bdbf3fd
authored
Jul 18, 2017
by
Pavel Kus
Browse files
single/double and real/complex unification
for mpi_allreduce in test_check_correctness
parent
dff0a8bb
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/shared/test_check_correctness_template.X90
View file @
8bdbf3fd
...
...
@@ -246,22 +246,7 @@
! Get maximum error norm over all processors
err
=
errmax
#ifdef WITH_MPI
#if REALCASE == 1
#ifdef DOUBLE_PRECISION_REAL
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL8
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL4
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef DOUBLE_PRECISION_COMPLEX
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL8
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL4
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#endif
#endif
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL_PRECISION
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else /* WITH_MPI */
errmax
=
err
#endif /* WITH_MPI */
...
...
@@ -361,23 +346,7 @@
! Get maximum error (max abs value in tmp1)
err
=
maxval
(
abs
(
tmp1
))
#ifdef WITH_MPI
#if REALCASE == 1
#ifdef DOUBLE_PRECISION_REAL
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL8
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL4
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef DOUBLE_PRECISION_COMPLEX
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL8
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL4
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#endif
#endif
call
mpi_allreduce
(
err
,
errmax
,
1
,
MPI_REAL_PRECISION
,
MPI_MAX
,
MPI_COMM_WORLD
,
mpierr
)
#else /* WITH_MPI */
errmax
=
err
#endif /* WITH_MPI */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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