Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MUSIC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mikael Djurfeldt
MUSIC
Commits
4ce74c90
Commit
4ce74c90
authored
7 years ago
by
Mikael Djurfeldt
Browse files
Options
Downloads
Patches
Plain Diff
Emit proper error message when not launched under MPI
parent
a9b72a47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/music.cc
+16
-2
16 additions, 2 deletions
utils/music.cc
with
16 additions
and
2 deletions
utils/music.cc
+
16
−
2
View file @
4ce74c90
/*
* This file is part of MUSIC.
* Copyright (C) 2007, 2008, 2009 INCF
* Copyright (C) 2007, 2008, 2009
, 2017
INCF
*
* MUSIC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -35,6 +35,12 @@ extern "C" {
}
using
std
::
string
;
/* The preprocessor macro MUSIC_HANDLE_MAP is currently used to disable
* broken functionality which previously tried to predict which ranks
* ran which applications. Such prediction can only be safely made using
* MPI. This could be implemented at a later date.
*/
void
usage
(
int
rank
)
{
...
...
@@ -43,9 +49,11 @@ usage (int rank)
std
::
cout
<<
"Usage: mpirun ... music [OPTION...] CONFIG"
<<
std
::
endl
<<
"`music' launches an application as part of a multi-simulation job."
<<
std
::
endl
<<
std
::
endl
<<
" -h, --help print this help message"
<<
std
::
endl
#ifdef MUSIC_HANDLE_MAP
<<
" -m, --map print application rank map"
<<
std
::
endl
// << " -f, --file-map creates a file with the list of environment variable of each application" << std::endl
// << " -e, --export-scripts export launcher scripts" << std::endl
#endif
<<
" -v, --version prints version of MUSIC library"
<<
std
::
endl
<<
std
::
endl
<<
"Report bugs to <music-bugs@incf.org>."
<<
std
::
endl
;
...
...
@@ -176,9 +184,11 @@ main (int argc, char *argv[])
static
struct
option
longOptions
[]
=
{
{
"help"
,
no_argument
,
0
,
'h'
},
#ifdef MUSIC_HANDLE_MAP
{
"map"
,
required_argument
,
0
,
'm'
},
// {"export-scripts", required_argument, 0, 'e'},
// {"file-map", required_argument, 0, 'f'},
#endif
{
"version"
,
no_argument
,
0
,
'v'
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -227,7 +237,10 @@ main (int argc, char *argv[])
MUSIC
::
Configuration
config
;
MUSIC
::
ApplicationMapper
mapper
(
&
config
);
mapper
.
map
(
configFile
,
rank
);
if
(
rank
>=
0
)
// Only try to map applications if rank prediction worked
mapper
.
map
(
configFile
,
rank
);
#ifdef MUSIC_HANDLE_MAP
if
(
do_print_map
)
{
if
(
rank
<=
0
)
...
...
@@ -247,6 +260,7 @@ main (int argc, char *argv[])
}*/
if
(
do_print_map
)
//|| do_export_scripts || do_export_map)
return
0
;
#endif
if
(
rank
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment