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
SWIFT
SWIFTsim
Commits
144739bd
Commit
144739bd
authored
Jan 07, 2016
by
Matthieu Schaller
Browse files
Properly handle old MPI libraries
parent
07f818be
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
144739bd
...
...
@@ -92,15 +92,16 @@ if test "$enable_mpi" = "yes"; then
*"Open MPI"*)
MPI_THREAD_LIBS=""
AC_MSG_RESULT([Open MPI])
# OpenMPI should be 1.8.6 or later, if not complain.
# Version is last word on first line of -version output.
revision=`mpirun -version 2>&1 | grep "Open MPI" | awk '{print $NF}'`
AX_COMPARE_VERSION( $revision, [ge], [1.8.6],,[good_mpi="no"] )
if test "$good_mpi" = "no"; then
AC_MSG_WARN([
Open MPI version should be at least 1.8.6 (is $revision)])
enable_mpi="yes (but with warning)"
fi
# # OpenMPI should be 1.8.6 or later, if not complain.
# # Version is last word on first line of -version output.
# revision=`mpirun -version 2>&1 | grep "Open MPI" | awk '{print $NF}'`
# AX_COMPARE_VERSION( $revision, [ge], [1.8.6],,[good_mpi="no"] )
# if test "$good_mpi" = "no"; then
# AC_MSG_WARN([
# Open MPI version should be at least 1.8.6 (is $revision)])
# enable_mpi="yes (but with warning)"
# good_mpi="yes"
# fi
;;
*)
MPI_THREAD_LIBS=""
...
...
src/version.c
View file @
144739bd
...
...
@@ -134,11 +134,16 @@ const char *compiler_version(void) {
const
char
*
mpi_version
(
void
)
{
static
char
version
[
256
]
=
{
0
};
#ifdef WITH_MPI
static
char
lib_version
[
MPI_MAX_LIBRARY_VERSION_STRING
]
=
{
0
};
int
len
,
std_version
,
std_subversion
;
MPI_Get_library_lib_version
(
version
,
&
len
);
#ifdef MPI_MAX_LIBRARY_VERSION_STRING
static
char
lib_version
[
MPI_MAX_LIBRARY_VERSION_STRING
]
=
{
0
};
MPI_Get_library_version
(
lib_version
,
&
len
);
#else
static
char
lib_version
[
256
]
=
{
0
};
sprintf
(
lib_version
,
"Unknow library"
);
#endif
MPI_Get_version
(
&
std_version
,
&
std_subversion
);
sprintf
(
"%s (standard v %i.%i)"
,
lib_version
,
std_version
,
std_subversion
);
sprintf
(
version
,
"%s (standard v %i.%i)"
,
lib_version
,
std_version
,
std_subversion
);
#else
sprintf
(
version
,
"Code was not compiled with MPI support"
);
#endif
...
...
Matthieu Schaller
@matthieu
mentioned in commit
40585317
·
Jan 07, 2016
mentioned in commit
40585317
mentioned in commit 4058531761f8fcbbe80259b8af7c22b018e75a96
Toggle commit list
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