Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
1d66354e
Commit
1d66354e
authored
Jul 04, 2017
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added flag ENABLE_MPI to cmake
parent
1f023756
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
AMDiS/cmake3/CMakeLists.txt
AMDiS/cmake3/CMakeLists.txt
+5
-0
AMDiS/src/Global.cc
AMDiS/src/Global.cc
+5
-5
AMDiS/src/Global.h
AMDiS/src/Global.h
+3
-3
No files found.
AMDiS/cmake3/CMakeLists.txt
View file @
1d66354e
...
...
@@ -179,6 +179,11 @@ add_library(amdis
${
SOURCE_DIR
}
/ProblemStatDbg.cc
)
if
(
ENABLE_MPI
)
target_enable_mpi
(
amdis_base INTERFACE
)
target_compile_definitions
(
amdis_base INTERFACE HAVE_MPI=1
)
endif
(
ENABLE_MPI
)
include
(
amdis_parallel
)
# adds sources to amdis
include
(
amdis_extensions
)
# -> target AMDiS::extensions
include
(
muparser
)
# -> target muparser
...
...
AMDiS/src/Global.cc
View file @
1d66354e
...
...
@@ -39,7 +39,7 @@ namespace AMDiS {
const
char
*
funcName
=
NULL
;
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
|| defined(HAVE_MPI)
bool
Msg
::
outputMainRank
=
true
;
#endif
...
...
@@ -132,7 +132,7 @@ namespace AMDiS {
void
Msg
::
print_funcname
(
const
char
*
funcName
)
{
#ifdef
HAVE_PARALLEL_DOMAIN_AMDIS
#if
def
ined(
HAVE_PARALLEL_DOMAIN_AMDIS
) || defined(HAVE_MPI)
if
(
outputMainRank
&&
MPI
::
COMM_WORLD
.
Get_rank
()
!=
0
)
return
;
#endif
...
...
@@ -227,7 +227,7 @@ namespace AMDiS {
const
char
*
file
,
int
line
)
{
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(NDEBUG)
#if
(
defined(HAVE_PARALLEL_DOMAIN_AMDIS)
|| defined(HAVE_MPI))
&& defined(NDEBUG)
if
(
outputMainRank
&&
MPI
::
COMM_WORLD
.
Get_rank
()
!=
0
)
return
;
#endif
...
...
@@ -265,7 +265,7 @@ namespace AMDiS {
void
Msg
::
print_warn
(
const
char
*
format
,
...)
{
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(NDEBUG)
#if
(
defined(HAVE_PARALLEL_DOMAIN_AMDIS)
|| defined(HAVE_MPI))
&& defined(NDEBUG)
if
(
outputMainRank
&&
MPI
::
COMM_WORLD
.
Get_rank
()
!=
0
)
return
;
#endif
...
...
@@ -289,7 +289,7 @@ namespace AMDiS {
void
Msg
::
print
(
const
char
*
format
,
...)
{
#ifndef SUPPRESS_OUTPUT
#ifdef
HAVE_PARALLEL_DOMAIN_AMDIS
#if
def
ined(
HAVE_PARALLEL_DOMAIN_AMDIS
) || defined(HAVE_MPI)
if
(
outputMainRank
&&
MPI
::
COMM_WORLD
.
Get_rank
()
!=
0
)
return
;
#endif
...
...
AMDiS/src/Global.h
View file @
1d66354e
...
...
@@ -53,7 +53,7 @@
#include <unistd.h>
#endif
#if HAVE_PARALLEL_DOMAIN_AMDIS
#if
defined(
HAVE_PARALLEL_DOMAIN_AMDIS
) || defined(HAVE_MPI)
#include <mpi.h>
#endif
...
...
@@ -131,7 +131,7 @@ namespace AMDiS {
#if SUPPRESS_OUTPUT
#define PRINT_LINE(stream, line)
#else
#if HAVE_PARALLEL_DOMAIN_AMDIS
#if
defined(
HAVE_PARALLEL_DOMAIN_AMDIS
) || defined(HAVE_MPI)
#define PRINT_LINE(stream, line) stream << "[" << MPI::COMM_WORLD.Get_rank() << "] " << line
#elif defined(HAVE_OPENMP)
#define PRINT_LINE(stream, line) stream << "[" << omp_get_thread_num() << "] " << line
...
...
@@ -333,7 +333,7 @@ namespace AMDiS {
}
public:
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
|| defined(HAVE_MPI)
/// In parallel computations, when this variable is true, only the 0 rank will
/// print messages to the output stream. Error messages and warnings are always
/// printed from all ranks.
...
...
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