#include <simgrid/s4u/Activity.hpp>
#include <simgrid/s4u/Actor.hpp>
+#include <simgrid/s4u/Engine.hpp>
+#include <simgrid/s4u/Host.hpp>
#include <simgrid/s4u/Mailbox.hpp>
-#include <simgrid/s4u/engine.hpp>
-#include <simgrid/s4u/host.hpp>
+#include <simgrid/s4u/Comm.hpp>
#include <simgrid/s4u/ConditionVariable.hpp>
#include <simgrid/s4u/Mutex.hpp>
-#include <simgrid/s4u/comm.hpp>
-#include <simgrid/s4u/storage.hpp>
-#include <simgrid/s4u/file.hpp>
+#include <simgrid/s4u/File.hpp>
+#include <simgrid/s4u/Storage.hpp>
#endif /* SIMGRID_S4U_S4U_H */
#include <xbt/base.h>
+#include <simgrid/forward.h>
#include <simgrid/s4u/Activity.hpp>
#include <simgrid/s4u/forward.hpp>
-#include <simgrid/forward.h>
-
namespace simgrid {
namespace s4u {
-
/** @brief Communication async
*
* Represents all asynchronous communications, that you can test or wait onto.
*/
-XBT_PUBLIC_CLASS Comm : public Activity {
+XBT_PUBLIC_CLASS Comm : public Activity
+{
Comm() : Activity() {}
public:
~Comm() override;
- /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an iterator on the finished Comms. */
- template<class I> static
- I wait_any(I first, I last)
+ /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an
+ * iterator on the finished Comms. */
+ template <class I> static I wait_any(I first, I last)
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
- for(I iter = first; iter != last; iter++) {
+ for (I iter = first; iter != last; iter++) {
Comm& comm = **iter;
if (comm.state_ == inited)
comm.start();
if (idx == -1)
return last;
// Lift the index to the corresponding iterator:
- auto res = std::next(first, idx);
+ auto res = std::next(first, idx);
(*res)->state_ = finished;
return res;
}
/*! Same as wait_any, but with a timeout. If wait_any_for return because of the timeout last is returned.*/
- template<class I> static
- I wait_any_for(I first, I last, double timeout)
+ template <class I> static I wait_any_for(I first, I last, double timeout)
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
- for(I iter = first; iter != last; iter++) {
+ for (I iter = first; iter != last; iter++) {
Comm& comm = **iter;
if (comm.state_ == inited)
comm.start();
if (idx == -1)
return last;
// Lift the index to the corresponding iterator:
- auto res = std::next(first, idx);
+ auto res = std::next(first, idx);
(*res)->state_ = finished;
return res;
}
/** Creates (but don't start) an async send to the mailbox @p dest */
- static Comm &send_init(MailboxPtr dest);
+ static Comm& send_init(MailboxPtr dest);
/** Creates and start an async send to the mailbox @p dest */
- static Comm &send_async(MailboxPtr dest, void *data, int simulatedByteAmount);
- /** Creates (but don't start) an async recv onto the mailbox @p from */
- static Comm &recv_init(MailboxPtr from);
+ static Comm& send_async(MailboxPtr dest, void* data, int simulatedByteAmount);
+ /** Creates (but don't start) an async recv onto the mailbox @p from */
+ static Comm& recv_init(MailboxPtr from);
/** Creates and start an async recv to the mailbox @p from */
- static Comm &recv_async(MailboxPtr from, void **data);
+ static Comm& recv_async(MailboxPtr from, void** data);
void start() override;
void wait() override;
void setRate(double rate);
/** Specify the data to send */
- void setSrcData(void * buff);
+ void setSrcData(void* buff);
/** Specify the size of the data to send */
void setSrcDataSize(size_t size);
/** Specify the data to send and its size */
- void setSrcData(void * buff, size_t size);
+ void setSrcData(void* buff, size_t size);
/** Specify where to receive the data */
- void setDstData(void ** buff);
+ void setDstData(void** buff);
/** Specify the buffer in which the data should be received */
- void setDstData(void ** buff, size_t size);
+ void setDstData(void** buff, size_t size);
/** Retrieve the size of the received data */
size_t getDstDataSize();
bool test();
-
private:
- double rate_ = -1;
- void *dstBuff_ = nullptr;
+ double rate_ = -1;
+ void* dstBuff_ = nullptr;
size_t dstBuffSize_ = 0;
- void *srcBuff_ = nullptr;
+ void* srcBuff_ = nullptr;
size_t srcBuffSize_ = sizeof(void*);
/* FIXME: expose these elements in the API */
int detached_ = 0;
- int (*matchFunction_)(void *, void *, smx_activity_t) = nullptr;
- void (*cleanFunction_)(void *) = nullptr;
+ int (*matchFunction_)(void*, void*, smx_activity_t) = nullptr;
+ void (*cleanFunction_)(void*) = nullptr;
void (*copyDataFunction_)(smx_activity_t, void*, size_t) = nullptr;
- smx_actor_t sender_ = nullptr;
+ smx_actor_t sender_ = nullptr;
smx_actor_t receiver_ = nullptr;
- MailboxPtr mailbox_ = nullptr;
+ MailboxPtr mailbox_ = nullptr;
};
-
-}} // namespace simgrid::s4u
+}
+} // namespace simgrid::s4u
#endif /* SIMGRID_S4U_COMM_HPP */
*
* This class is an interface to the simulation engine.
*/
-XBT_PUBLIC_CLASS Engine {
+XBT_PUBLIC_CLASS Engine
+{
private:
~Engine();
public:
/** Constructor, taking the command line parameters of your main function */
- Engine(int *argc, char **argv);
+ Engine(int* argc, char** argv);
/** Finalize the default engine and all its dependencies */
static void shutdown();
* The environment is either a XML file following the simgrid.dtd formalism, or a lua file.
* Some examples can be found in the directory examples/platforms.
*/
- void loadPlatform(const char *platf);
+ void loadPlatform(const char* platf);
/** Registers the main function of an actor that will be launched from the deployment file */
- void registerFunction(const char*name, int (*code)(int,char**));
+ void registerFunction(const char* name, int (*code)(int, char**));
/** Registers a function as the default main function of actors
*
* It will be used as fallback when the function requested from the deployment file was not registered.
* It is used for trace-based simulations (see examples/msg/actions).
*/
- void registerDefault(int (*code)(int,char**));
+ void registerDefault(int (*code)(int, char**));
/** @brief Load a deployment file and launch the actors that it contains */
- void loadDeployment(const char *deploy);
+ void loadDeployment(const char* deploy);
size_t hostCount();
void hostList(std::vector<Host*> * whereTo);
/** @brief Retrieve the simulation time */
static double getClock();
-
+
/** @brief Retrieve the engine singleton */
- static s4u::Engine *instance();
+ static s4u::Engine* instance();
/** @brief Retrieve the root netzone, containing all others */
simgrid::s4u::NetZone* netRoot();
void netpointRegister(simgrid::kernel::routing::NetPoint * card);
void netpointUnregister(simgrid::kernel::routing::NetPoint * card);
- template<class F>
- void registerFunction(const char* name)
+ template <class F> void registerFunction(const char* name)
{
- simgrid::simix::registerFunction(name, [](std::vector<std::string> args){
+ simgrid::simix::registerFunction(name, [](std::vector<std::string> args) {
return simgrid::simix::ActorCode([args] {
F code(std::move(args));
code();
});
}
- template<class F>
- void registerFunction(const char* name, F code)
+ template <class F> void registerFunction(const char* name, F code)
{
- simgrid::simix::registerFunction(name, [code](std::vector<std::string> args){
- return simgrid::simix::ActorCode([code,args] {
- code(std::move(args));
- });
+ simgrid::simix::registerFunction(name, [code](std::vector<std::string> args) {
+ return simgrid::simix::ActorCode([code, args] { code(std::move(args)); });
});
}
simgrid::kernel::EngineImpl* pimpl;
private:
- static s4u::Engine *instance_;
+ static s4u::Engine* instance_;
};
/** Callback fired when the platform is created (ie, the xml file parsed),
/** Callback fired when the time jumps into the future */
extern XBT_PRIVATE xbt::signal<void(double)> onTimeAdvance;
-}} // namespace simgrid::s4u
+}
+} // namespace simgrid::s4u
#endif /* SIMGRID_S4U_ENGINE_HPP */
*
* Used to simulate the time it takes to access to a file, but does not really store any information.
*
- * They are located on @ref simgrid::s4u::Storage that are accessed from a given @ref simgrid::s4u::Host through mountpoints.
+ * They are located on @ref simgrid::s4u::Storage that are accessed from a given @ref simgrid::s4u::Host through
+ * mountpoints.
* For now, you cannot change the mountpoints programatically, and must declare them from your platform file.
*/
-XBT_PUBLIC_CLASS File {
+XBT_PUBLIC_CLASS File
+{
public:
- File(const char *fullpath, void* userdata);
+ File(const char* fullpath, void* userdata);
~File();
/** Retrieves the path to the file */
- const char *path() { return path_;}
+ const char* path() { return path_; }
/** Simulates a read action. Returns the size of data actually read
*
sg_size_t write(sg_size_t size);
/** Allows to store user data on that host */
- void setUserdata(void *data) {userdata_ = data;}
+ void setUserdata(void* data) { userdata_ = data; }
/** Retrieves the previously stored data */
- void* userdata() {return userdata_;}
+ void* userdata() { return userdata_; }
/** Retrieve the datasize */
sg_size_t size();
/** Rename a file
*
* WARNING: It is forbidden to move the file to another mount point */
- void move(const char*fullpath);
+ void move(const char* fullpath);
/** Remove a file from disk */
void unlink();
private:
smx_file_t pimpl_ = nullptr;
- const char *path_ = nullptr;
- void *userdata_ = nullptr;
+ const char* path_ = nullptr;
+ void* userdata_ = nullptr;
};
-
-}} // namespace simgrid::s4u
+}
+} // namespace simgrid::s4u
#endif /* SIMGRID_S4U_HOST_HPP */
namespace simgrid {
namespace xbt {
- extern template class XBT_PUBLIC() Extendable<simgrid::s4u::Host>;
+extern template class XBT_PUBLIC() Extendable<simgrid::s4u::Host>;
}
namespace s4u {
/** @ingroup s4u_api
*
- * @tableofcontents
+ * @tableofcontents
*
* An host represents some physical resource with computing and networking capabilities.
*
* You can retrieve a particular host using simgrid::s4u::Host::byName()
* and actors can retrieve the host on which they run using simgrid::s4u::Host::current().
*/
-XBT_PUBLIC_CLASS Host :
- public simgrid::xbt::Extendable<Host> {
+XBT_PUBLIC_CLASS Host : public simgrid::xbt::Extendable<Host>
+{
public:
- explicit Host(const char *name);
+ explicit Host(const char* name);
/** Host destruction logic */
protected:
private:
bool currentlyDestroying_ = false;
+
public:
void destroy();
// No copy/move
/** Retrieves an host from its name, or return nullptr */
static Host* by_name_or_null(std::string name);
/** Retrieves an host from its name, or die */
- static s4u::Host *by_name(std::string name);
+ static s4u::Host* by_name(std::string name);
/** Retrieves the host on which the current actor is running */
- static s4u::Host *current();
+ static s4u::Host* current();
simgrid::xbt::string const& name() const { return name_; }
const char* cname() { return name_.c_str(); }
double speed();
int coreCount();
xbt_dict_t properties();
- const char*property(const char*key);
- void setProperty(const char*key, const char *value);
- void processes(std::vector<ActorPtr>* list);
+ const char* property(const char* key);
+ void setProperty(const char* key, const char* value);
+ void processes(std::vector<ActorPtr> * list);
double getPstateSpeed(int pstate_index);
int pstatesCount() const;
void setPstate(int pstate_index);
*
* This is defined in the platform file, and cannot be modified programatically (yet).
*/
- boost::unordered_map<std::string, Storage*> const &mountedStorages();
+ boost::unordered_map<std::string, Storage*> const& mountedStorages();
void routeTo(Host * dest, std::vector<Link*> * links, double* latency);
void routeTo(Host * dest, std::vector<surf::LinkImpl*> * links, double* latency);
private:
simgrid::xbt::string name_ = "noname";
- boost::unordered_map<std::string, Storage*> *mounts = nullptr; // caching
+ boost::unordered_map<std::string, Storage*>* mounts = nullptr; // caching
public:
// TODO, this could be a unique_ptr
surf::HostImpl* pimpl_ = nullptr;
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
- surf::Cpu *pimpl_cpu = nullptr;
+ surf::Cpu* pimpl_cpu = nullptr;
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
kernel::routing::NetPoint* pimpl_netpoint = nullptr;
* (either because of a pstate switch or because of an external load event coming from the profile) */
static simgrid::xbt::signal<void(Host&)> onSpeedChange;
};
-
-}} // namespace simgrid::s4u
+}
+} // namespace simgrid::s4u
extern int USER_HOST_LEVEL;
public native int getLoad();
-}
+}
#endif
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2017. 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. */
namespace simgrid {
namespace s4u {
-XBT_PUBLIC_CLASS Storage {
+XBT_PUBLIC_CLASS Storage
+{
friend s4u::Engine;
Storage(std::string name, smx_storage_t inferior);
Storage() = default;
virtual ~Storage();
/** Retrieve a Storage by its name. It must exist in the platform file */
- static Storage &byName(const char* name);
- const char *name();
+ static Storage& byName(const char* name);
+ const char* name();
const char* host();
sg_size_t sizeFree();
sg_size_t sizeUsed();
smx_storage_t inferior();
public:
- void setUserdata(void *data) {userdata_ = data;}
- void *userdata() {return userdata_;}
-
+ void setUserdata(void* data) { userdata_ = data; }
+ void* userdata() { return userdata_; }
+
private:
static std::unordered_map<std::string, Storage*>* storages_;
-/* Copyright (c) 2015-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2017. 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. */
#define SIMGRID_S4U_VM_HPP
#include "simgrid/datatypes.h"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/forward.hpp"
-#include "simgrid/s4u/host.hpp"
typedef enum {
SURF_VM_STATE_CREATED, /**< created, but not yet started */
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. 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/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
-#include <xbt/dict.h>
-#include <xbt/lib.h>
-#include <xbt/log.h>
-
-#include <surf/surf.h>
-#include <surf/surf_routing.h>
+#include "surf/surf.h"
#include "src/instr/instr_private.h"
-/* Copyright (c) 2010-2016. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. 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 "xbt/asserts.h"
#include "simgrid/jedule/jedule_sd_binding.h"
-#include "simgrid/forward.h"
-
-#include "../../simdag/simdag_private.hpp"
#include "simgrid/jedule/jedule.hpp"
+#include "src/simdag/simdag_private.hpp"
+
+#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "simgrid/s4u/engine.hpp"
#if HAVE_JEDULE
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/EngineImpl.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/kernel/routing/NetZoneImpl.hpp"
-#include <simgrid/s4u/host.hpp>
namespace simgrid {
namespace kernel {
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. 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/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/activity/SynchroExec.hpp"
#include "src/surf/surf_interface.hpp"
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. 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 <xbt/log.h>
-
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/context/Context.hpp"
#include "src/kernel/activity/SynchroSleep.hpp"
-/* Copyright (c) 2009-2011, 2013-2016. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2009-2017. 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 "src/kernel/routing/NetPoint.hpp"
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "surf/surf_routing.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
-/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "src/kernel/routing/NetZoneImpl.hpp"
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2017. 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 <boost/algorithm/string.hpp>
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/kernel/routing/VivaldiZone.hpp"
/* 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 <cassert>
-#include <cstddef>
-#include <cstdlib>
+#include "simgrid/s4u/Host.hpp"
-#include <memory>
-#include <type_traits>
-#include <utility>
-#include <vector>
-
-#include <xbt/log.h>
-#include <xbt/str.h>
-#include <xbt/swag.h>
-
-#include <simgrid/s4u/host.hpp>
-
-#include "src/simix/smx_private.h"
#include "src/mc/mc_smx.h"
#include "src/mc/ModelChecker.hpp"
-/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010, 2012-2017. 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/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/instr/instr_private.h"
#include "src/msg/msg_private.h"
#include "src/simix/ActorImpl.hpp"
-/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. 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/Engine.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "simgrid/s4u/engine.hpp"
#include "src/msg/msg_private.h"
#if HAVE_LUA
-/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. 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/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "instr/instr_interface.h"
#include "mc/mc.h"
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2004-2017. 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/host.hpp"
-#include "simgrid/s4u/storage.hpp"
+#include "simgrid/s4u/Host.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "src/msg/msg_private.h"
#include "src/simix/ActorImpl.hpp"
#include "src/simix/smx_host_private.h"
-/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. 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/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/msg/msg_private.h"
#include "src/surf/storage_interface.hpp"
#include <numeric>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "msg_private.h"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/simix/ActorImpl.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)");
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "xbt/log.h"
#include "simgrid/s4u/Actor.hpp"
-#include "simgrid/s4u/comm.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Comm.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/context/Context.hpp"
-/* Copyright (c) 2006-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "xbt/log.h"
#include "src/msg/msg_private.h"
-#include "simgrid/s4u/comm.hpp"
-#include <simgrid/s4u/Mailbox.hpp>
-
+#include "simgrid/s4u/Comm.hpp"
+#include "simgrid/s4u/Mailbox.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_comm,s4u_activity,"S4U asynchronous communications");
/* s4u::Engine Simulation Engine and global functions. */
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "instr/instr_interface.h"
#include "mc/mc.h"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Mailbox.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
-#include "simgrid/s4u/storage.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "simgrid/simix.h"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/kernel/routing/NetZoneImpl.hpp"
#include "src/surf/network_interface.hpp"
-#include "surf/surf.h" // routing_platf. FIXME:KILLME. SOON
+#include "surf/surf.h" // routing_platf. FIXME:KILLME. SOON
XBT_LOG_NEW_CATEGORY(s4u,"Log channels of the S4U (Simgrid for you) interface");
-/* Copyright (c) 2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2017. 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 "xbt/log.h"
+#include "simgrid/simix.h"
#include "src/msg/msg_private.h"
+#include "xbt/log.h"
#include "simgrid/s4u/Actor.hpp"
-#include "simgrid/s4u/comm.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Comm.hpp"
+#include "simgrid/s4u/File.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Mailbox.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_file,"S4U files");
-#include "simgrid/s4u/file.hpp"
-#include "simgrid/s4u/host.hpp"
-#include "simgrid/simix.h"
namespace simgrid {
namespace s4u {
#include <map>
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
-#include "simgrid/s4u/storage.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "simgrid/simix.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/msg/msg_private.h"
-/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "xbt/log.h"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "simgrid/s4u/host.hpp"
#include "simgrid/simix.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp" // Link FIXME: move to proper header
-/* Copyright (c) 2006-2015, 2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2006-2017. 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/storage.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "simgrid/simix.hpp"
#include "src/surf/storage_interface.hpp"
#include "xbt/lib.h"
-/* Copyright (c) 2006-2016. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2006-2017. 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 "simdag_private.hpp"
-#include "simgrid/host.h"
-#include "simgrid/s4u/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "simgrid/sg_config.h"
#include "src/include/instr/instr_interface.h"
#include "src/surf/surf_interface.hpp"
-/* Copyright (c) 2013-2016. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2017. 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 <vector>
-#include "xbt/dict.h"
#include "simgrid/host.h"
-#include <xbt/Extendable.hpp>
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
+#include "xbt/Extendable.hpp"
+#include "xbt/dict.h"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/simix/smx_host_private.h"
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2017. 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 <xbt/log.h>
#include <xbt/dict.h>
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include <mc/mc.h>
-/* Copyright (c) 2007, 2009-2016. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2017. 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 <string>
#include <vector>
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "smx_private.h"
#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here
-#include "xbt/dict.h"
-#include "xbt/log.h"
-#include "xbt/sysdep.h"
#include <xbt/ex.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix, "Logging specific to SIMIX (deployment)");
#include <xbt/functional.hpp>
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/surf/surf_interface.hpp"
#include "src/surf/storage_interface.hpp"
#include "src/surf/xml/platf.hpp"
#include "smx_private.h"
-#include "xbt/str.h"
#include "xbt/ex.h" /* ex_backtrace_display */
#include "mc/mc.h"
#include "src/mc/mc_replay.h"
-/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2017. 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 <xbt/log.h>
#include <xbt/dict.h>
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include <mc/mc.h>
#include <xbt/ex.hpp>
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include "mc/mc.h"
#include "simgrid/s4u/Mailbox.hpp"
#include "src/simix/smx_private.h"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/surf_interface.hpp"
-#include "xbt/dict.h"
-#include "xbt/log.h"
#include "src/kernel/activity/SynchroComm.hpp"
#include "src/surf/network_interface.hpp"
-#include "smpi/smpi_utils.hpp"
+/* Copyright (c) 2017. 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 "src/smpi/SmpiHost.hpp"
-#include <simgrid/s4u/VirtualMachine.hpp>
+#include "simgrid/s4u/VirtualMachine.hpp"
+#include "smpi/smpi_utils.hpp"
+
#include <string>
#include <vector>
+/* Copyright (c) 2017. 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. */
+
#ifndef SMPI_HOST_HPP_
#define SMPI_HOST_HPP_
#include "src/include/smpi/smpi_utils.hpp"
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include <string>
#include <vector>
-#include <xbt/config.hpp>
#include <xbt/Extendable.hpp>
-
-
+#include <xbt/config.hpp>
namespace simgrid {
namespace smpi {
-/* Copyright (c) 2010-2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. 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 <stdlib.h>
-#include <limits.h>
-
-#include <xbt/dict.h>
-#include <xbt/ex.h>
-#include <xbt/ex.hpp>
-
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Host.hpp"
#include "private.h"
#include "src/simix/smx_private.h"
-/* Copyright (c) 2013-2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2017. 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 <xbt/log.h>
// FIXME: this plugin should be separated from the core
+#include "simgrid/s4u/Host.hpp"
#include <simgrid/plugins/energy.h>
#include <simgrid/simix.h>
-#include <simgrid/s4u/host.hpp>
#include <smpi/smpi.h>
/* 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/engine.hpp>
-#include <simgrid/s4u/host.hpp>
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "private.h"
/* 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 <xbt/config.hpp>
-#include <algorithm>
#include "private.h"
#include "mc/mc.h"
#include "src/mc/mc_replay.h"
-#include "src/simix/smx_private.h"
-#include "simgrid/sg_config.h"
-#include "smpi/smpi_utils.hpp"
#include "src/smpi/SmpiHost.hpp"
-#include <simgrid/s4u/host.hpp>
#include "src/kernel/activity/SynchroComm.hpp"
+#include <algorithm>
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_request, smpi, "Logging specific to SMPI (reques)");
static simgrid::config::Flag<double> smpi_iprobe_sleep(
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2004-2017. 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. */
#ifndef SURF_CPU_INTERFACE_HPP_
#define SURF_CPU_INTERFACE_HPP_
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/surf/maxmin_private.hpp"
/***********
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. 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 "src/instr/instr_private.h"
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/routing/NetZoneImpl.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
-/* Copyright (c) 2013-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2017. 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 "maxmin_private.hpp"
#include "network_cm02.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/sg_config.h"
#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
* @param model The NetworkModel associated to this NetworkAction
* @param cost The cost of this NetworkAction in [TODO]
* @param failed [description]
- * @param var The lmm variable associated to this Action if it is part of a
- * LMM component
+ * @param var The lmm variable associated to this Action if it is part of a LMM component
*/
NetworkAction(simgrid::surf::Model* model, double cost, bool failed, lmm_variable_t var)
: simgrid::surf::Action(model, cost, failed, var){};
-/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2017. 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 "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/surf/cpu_interface.hpp"
+#include "simgrid/s4u/Engine.hpp"
+
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
-#include <simgrid/s4u/engine.hpp>
#include <string>
#include <utility>
#include <vector>
-/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2017. 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 "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/surf/cpu_interface.hpp"
+#include "simgrid/s4u/Engine.hpp"
+
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
-#include <simgrid/s4u/engine.hpp>
#include <string>
#include <utility>
#include <vector>
/* 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/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/simix/smx_private.h"
-/* Copyright (c) 2013-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2017. 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 "storage_n11.hpp"
-#include "simgrid/s4u/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "src/kernel/routing/NetPoint.hpp"
-#include "surf_private.h"
#include <math.h> /*ceil*/
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
-/* Copyright (c) 2013-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2017. 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/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "src/instr/instr_private.h"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2004-2017. 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 "surf_interface.hpp"
-#include "cpu_interface.hpp"
#include "mc/mc.h"
-#include "network_interface.hpp"
-#include "simgrid/s4u/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "simgrid/sg_config.h"
#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
-#include "src/internal_config.h"
#include "src/kernel/routing/NetPoint.hpp"
-#include "src/simix/smx_host_private.h"
#include "src/surf/HostImpl.hpp"
-#include "surf_private.h"
+
#include <fstream>
#include <vector>
/* 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 <errno.h>
-#include <math.h>
-#include <stdarg.h> /* va_arg */
-
-#include "simgrid/link.h"
-#include "simgrid/s4u/engine.hpp"
+#include "simgrid/s4u/Engine.hpp"
#include "simgrid/sg_config.h"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
-#include "src/surf/surf_private.h"
-#include "xbt/dict.h"
#include "xbt/file.h"
-#include "xbt/log.h"
-#include "xbt/misc.h"
-#include "xbt/str.h"
#include "src/surf/xml/platf_private.hpp"
#include <boost/algorithm/string.hpp>
-/* Copyright (c) 2008-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2008-2017. 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 <cstdio>
-#include <cstdlib>
-#include <cstring>
-
-#include <xbt/dict.h>
-#include <xbt/lib.h>
-#include <xbt/log.h>
-#include <xbt/sysdep.h>
#include <xbt/xbt_os_time.h>
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
-#include <simgrid/simdag.h>
+#include "simgrid/simdag.h"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
-/* Copyright (c) 2008-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2008-2017. 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/engine.hpp"
-#include "simgrid/s4u/host.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "simgrid/simdag.h"
#include "src/kernel/routing/NetPoint.hpp"
#include "surf/surf_routing.h"
/* A few basic tests for the surf library */
-/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. 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 "surf/surf.h"
#include "simgrid/host.h"
-#include "simgrid/s4u/host.hpp"
-#include "simgrid/sg_config.h"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-#include "src/surf/surf_interface.hpp"
-#include <stdio.h>
-#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
static const char *string_action(simgrid::surf::Action::State state)
/* A few basic tests for the surf library */
-/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. 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 "surf/surf.h"
#include "simgrid/host.h"
-#include "simgrid/s4u/host.hpp"
-#include "simgrid/sg_config.h"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-#include "src/surf/surf_interface.hpp"
-#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
int main(int argc, char **argv)
include/simgrid/s4u/forward.hpp
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Actor.hpp
- include/simgrid/s4u/comm.hpp
+ include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/ConditionVariable.hpp
- include/simgrid/s4u/engine.hpp
- include/simgrid/s4u/file.hpp
- include/simgrid/s4u/host.hpp
+ include/simgrid/s4u/Engine.hpp
+ include/simgrid/s4u/File.hpp
+ include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Mailbox.hpp
include/simgrid/s4u/Mutex.hpp
include/simgrid/s4u/NetZone.hpp
- include/simgrid/s4u/storage.hpp
+ include/simgrid/s4u/Storage.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/simgrid/s4u.hpp
include/simgrid/plugins/energy.h