A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of github.com:simgrid/simgrid
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_group.cpp
diff --git
a/src/smpi/mpi/smpi_group.cpp
b/src/smpi/mpi/smpi_group.cpp
index
89abd06
..
bce418b
100644
(file)
--- a/
src/smpi/mpi/smpi_group.cpp
+++ b/
src/smpi/mpi/smpi_group.cpp
@@
-73,10
+73,11
@@
int Group::rank(int index)
{
if (this == MPI_GROUP_EMPTY)
return MPI_UNDEFINED;
- if (index_to_rank_map_.find(index) == index_to_rank_map_.end())
- return MPI_UNDEFINED;
- else
+ try {
return index_to_rank_map_.at(index);
+ } catch (std::out_of_range& unfound) {
+ return MPI_UNDEFINED;
+ }
}
void Group::ref()