/* 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. */
/* 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. */
static int host(int argc, char* argv[])
{
simgrid::s4u::File file(argv[1], nullptr);
static int host(int argc, char* argv[])
{
simgrid::s4u::File file(argv[1], nullptr);
XBT_INFO("Opened file '%s'", filename);
XBT_INFO("Try to write %llu MiB to '%s'", remoteFile.size() / 1024, filename);
sg_size_t write = remoteFile.write(remoteFile.size() * 1024);
XBT_INFO("Opened file '%s'", filename);
XBT_INFO("Try to write %llu MiB to '%s'", remoteFile.size() / 1024, filename);
sg_size_t write = remoteFile.write(remoteFile.size() * 1024);
if (std::stoi(argv[5]) != 0) {
XBT_INFO("Move '%s' (of size %llu) from '%s' to '%s'", filename, remoteFile.size(),
simgrid::s4u::Host::current()->get_cname(), argv[3]);
if (std::stoi(argv[5]) != 0) {
XBT_INFO("Move '%s' (of size %llu) from '%s' to '%s'", filename, remoteFile.size(),
simgrid::s4u::Host::current()->get_cname(), argv[3]);
} else {
XBT_INFO("Copy '%s' (of size %llu) from '%s' to '%s'", filename, remoteFile.size(),
simgrid::s4u::Host::current()->get_cname(), argv[3]);
} else {
XBT_INFO("Copy '%s' (of size %llu) from '%s' to '%s'", filename, remoteFile.size(),
simgrid::s4u::Host::current()->get_cname(), argv[3]);
{
simgrid::s4u::Engine e(&argc, argv);
sg_storage_file_system_init();
{
simgrid::s4u::Engine e(&argc, argv);
sg_storage_file_system_init();
- e.loadPlatform(argv[1]);
- e.registerFunction("host", host);
- e.loadDeployment(argv[2]);
- std::vector<simgrid::s4u::Storage*> allStorages = e.getAllStorages();
+ e.load_platform(argv[1]);
+ e.register_function("host", host);
+ e.load_deployment(argv[2]);
+ std::vector<simgrid::s4u::Storage*> allStorages = e.get_all_storages();
for (auto const& s : allStorages) {
XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,
for (auto const& s : allStorages) {
XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,