* @return netzone,router the created netzone and its router
*/
static std::pair<sg4::NetZone*, simgrid::kernel::routing::NetPoint*>
-create_cabinet(sg4::NetZone* root, const std::string& name, const std::vector<int>& radicals)
+create_cabinet(const sg4::NetZone* root, const std::string& name, const std::vector<int>& radicals)
{
auto* cluster = sg4::create_star_zone(name);
- std::string prefix = "griffon-", suffix = ".nancy.grid5000.fr";
+ std::string prefix = "griffon-";
+ std::string suffix = ".nancy.grid5000.fr";
cluster->set_parent(root);
/* create the backbone link */
for (const auto& id : radicals) {
std::string hostname = prefix + std::to_string(id) + suffix;
/* create host */
- sg4::Host* host = cluster->create_host(hostname, "286.087kf");
+ const sg4::Host* host = cluster->create_host(hostname, "286.087kf");
/* create UP/DOWN link */
sg4::Link* l_up = cluster->create_link(hostname + "_up", "125MBps")->set_latency("24us")->seal();
sg4::Link* l_down = cluster->create_link(hostname + "_down", "125MBps")->set_latency("24us")->seal();
/** @brief Programmatic version of griffon.xml */
extern "C" void load_platform(const sg4::Engine& e);
-void load_platform(const sg4::Engine& e)
+void load_platform(const sg4::Engine& /*e*/)
{
/**
* C++ version of griffon.xml
* @param host List of hostname inside the cluster
* @param single_link_host Hostname of "special" node
*/
-static void create_cluster(sg4::NetZone* root, const std::string& cluster_suffix, const std::vector<std::string>& hosts,
- const std::string& single_link_host)
+static void create_cluster(const sg4::NetZone* root, const std::string& cluster_suffix,
+ const std::vector<std::string>& hosts, const std::string& single_link_host)
{
auto* cluster = sg4::create_star_zone("cluster" + cluster_suffix);
cluster->set_parent(root);
/* create all hosts and connect them to outside world */
for (const auto& hostname : hosts) {
/* create host */
- sg4::Host* host = cluster->create_host(hostname, std::vector<double>{1e9});
+ const sg4::Host* host = cluster->create_host(hostname, std::vector<double>{1e9});
/* create UP link */
sg4::Link* l_up = cluster->create_link(hostname + "_up", std::vector<double>{1.25e8})->set_latency(0.0001)->seal();
/* create DOWN link, if needed */
#else
void* handle = dlopen(platf.c_str(), RTLD_LAZY);
xbt_assert(handle, "Impossible to open platform file: %s", platf.c_str());
- typedef void (*load_fct_t)(const Engine&);
+ using load_fct_t = void (*)(const Engine&);
dlerror();
- load_fct_t callable = (load_fct_t)dlsym(handle, "load_platform");
+ auto callable = (load_fct_t)dlsym(handle, "load_platform");
const char* dlsym_error = dlerror();
xbt_assert(not dlsym_error, "Error: %s", dlsym_error);
callable(*this);