From d7eaeeccdee027a05651acad99309a650070a5f3 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Mon, 16 Sep 2019 13:26:45 +0200 Subject: [PATCH] get rid of this example we have its MSG counterpart in teshsuite --- MANIFEST.in | 2 - examples/s4u/CMakeLists.txt | 2 +- .../s4u/io-storage-raw/s4u-io-storage-raw.cpp | 58 ------------------- .../io-storage-raw/s4u-io-storage-raw.tesh | 12 ---- 4 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp delete mode 100644 examples/s4u/io-storage-raw/s4u-io-storage-raw.tesh diff --git a/MANIFEST.in b/MANIFEST.in index 5a4621f5c1..46022c76e7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -384,8 +384,6 @@ include examples/s4u/io-file-remote/s4u-io-file-remote.tesh include examples/s4u/io-file-remote/s4u-io-file-remote_d.xml include examples/s4u/io-file-system/s4u-io-file-system.cpp include examples/s4u/io-file-system/s4u-io-file-system.tesh -include examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp -include examples/s4u/io-storage-raw/s4u-io-storage-raw.tesh include examples/s4u/maestro-set/s4u-maestro-set.cpp include examples/s4u/maestro-set/s4u-maestro-set.tesh include examples/s4u/mc-failing-assert/s4u-mc-failing-assert.cpp diff --git a/examples/s4u/CMakeLists.txt b/examples/s4u/CMakeLists.txt index 5672278463..12a6e4cf10 100644 --- a/examples/s4u/CMakeLists.txt +++ b/examples/s4u/CMakeLists.txt @@ -10,7 +10,7 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill energy-exec energy-boot energy-link energy-vm engine-filtering exec-async exec-basic exec-dvfs exec-ptask exec-remote exec-waitany - io-async io-file-system io-file-remote io-storage-raw io-disk-raw + io-async io-file-system io-file-remote io-disk-raw platform-failures platform-profile platform-properties plugin-hostload replay-comm replay-storage diff --git a/examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp b/examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp deleted file mode 100644 index d076f87565..0000000000 --- a/examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2017-2019. 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. */ - -#include "simgrid/s4u.hpp" -#include -#include - -XBT_LOG_NEW_DEFAULT_CATEGORY(storage, "Messages specific for this simulation"); - -static void host() -{ - /* - Display information on the disks mounted by the current host */ - XBT_INFO("*** Storage info on %s ***", simgrid::s4u::Host::current()->get_cname()); - - /* - Retrieve all mount points of current host */ - std::unordered_map const& storage_list = - simgrid::s4u::Host::current()->get_mounted_storages(); - - /* - For each disk mounted on host, display disk name and mount point */ - for (auto const& kv : storage_list) - XBT_INFO("Storage name: %s, mount name: %s", kv.second->get_cname(), kv.first.c_str()); - - /* - Write 200,000 bytes on Disk4 */ - simgrid::s4u::Storage* storage = simgrid::s4u::Storage::by_name("Disk4"); - sg_size_t write = storage->write(200000); - XBT_INFO("Wrote %llu bytes on 'Disk4'", write); - - /* - Now read 200,000 bytes */ - sg_size_t read = storage->read(200000); - XBT_INFO("Read %llu bytes on 'Disk4'", read); - - /* - Attach some user data to disk1 */ - XBT_INFO("*** Get/set data for storage element: Disk4 ***"); - - std::string* data = static_cast(storage->get_data()); - - XBT_INFO("Get storage data: '%s'", data ? data->c_str() : "No user data"); - - storage->set_data(new std::string("Some user data")); - data = static_cast(storage->get_data()); - XBT_INFO("Set and get data: '%s'", data->c_str()); - delete data; -} - -int main(int argc, char** argv) -{ - simgrid::s4u::Engine e(&argc, argv); - e.load_platform(argv[1]); - - simgrid::s4u::Actor::create("", simgrid::s4u::Host::by_name("denise"), host); - - e.run(); - XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock()); - - return 0; -} diff --git a/examples/s4u/io-storage-raw/s4u-io-storage-raw.tesh b/examples/s4u/io-storage-raw/s4u-io-storage-raw.tesh deleted file mode 100644 index 2f507ce183..0000000000 --- a/examples/s4u/io-storage-raw/s4u-io-storage-raw.tesh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env tesh - -$ ${bindir}/s4u-io-storage-raw ${platfdir}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" -> [ 0.000000] (1:@denise) *** Storage info on denise *** -> [ 0.000000] (1:@denise) Storage name: Disk2, mount name: c: -> [ 0.000000] (1:@denise) Storage name: Disk4, mount name: /home -> [ 0.003333] (1:@denise) Wrote 200000 bytes on 'Disk4' -> [ 0.004333] (1:@denise) Read 200000 bytes on 'Disk4' -> [ 0.004333] (1:@denise) *** Get/set data for storage element: Disk4 *** -> [ 0.004333] (1:@denise) Get storage data: 'No user data' -> [ 0.004333] (1:@denise) Set and get data: 'Some user data' -> [ 0.004333] (0:maestro@) Simulated time: 0.00433333 -- 2.20.1