Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
421156f1
Commit
421156f1
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Formatting
parent
1f69a87c
No related branches found
No related tags found
2 merge requests
!136
Master
,
!72
Print information about the libraries used in the greeting message
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/version.c
+5
-2
5 additions, 2 deletions
src/version.c
with
5 additions
and
2 deletions
src/version.c
+
5
−
2
View file @
421156f1
...
...
@@ -141,16 +141,19 @@ const char *mpi_version(void) {
static
char
version
[
256
]
=
{
0
};
#ifdef WITH_MPI
int
len
,
std_version
,
std_subversion
;
/* Check that the library implements the version string routine */
#ifdef MPI_MAX_LIBRARY_VERSION_STRING
static
char
lib_version
[
MPI_MAX_LIBRARY_VERSION_STRING
]
=
{
0
};
MPI_Get_library_version
(
lib_version
,
&
len
);
/* Intel-MPI adds a tailing '\n' at the end of the string that looks ugly. */
if
(
lib_version
[
len
-
1
]
==
'\n'
)
lib_version
[
len
-
1
]
=
' '
;
#else
static
char
lib_version
[
256
]
=
{
0
};
sprintf
(
lib_version
,
"Unknow library"
);
#endif
MPI_Get_version
(
&
std_version
,
&
std_subversion
);
sprintf
(
version
,
"%s (standard v %i.%i)"
,
lib_version
,
std_version
,
std_subversion
);
sprintf
(
version
,
"%s (
implementing MPI
standard v %i.%i)"
,
lib_version
,
std_version
,
std_subversion
);
#else
sprintf
(
version
,
"Code was not compiled with MPI support"
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment