/* smpi_coll.c -- various optimized routing for collectives */
-/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
// Needed by the automatic selector weird implementation
std::vector<s_mpi_coll_description_t>* colls::get_smpi_coll_descriptions(const std::string& name)
{
- if (smpi_coll_descriptions.find(name) == smpi_coll_descriptions.end())
+ auto iter = smpi_coll_descriptions.find(name);
+ if (iter == smpi_coll_descriptions.end())
xbt_die("No collective named %s. This is a bug.", name.c_str());
- return &smpi_coll_descriptions[name];
+ return &iter->second;
}
static s_mpi_coll_description_t* find_coll_description(const std::string& collective, const std::string& algo)