XBT_PUBLIC(void) smpi_execute_flops(double flops);
XBT_PUBLIC(void) smpi_execute(double duration);
+XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index);
+XBT_PUBLIC(double) smpi_get_host_current_power_peak(void);
+XBT_PUBLIC(int) smpi_get_host_nb_pstates(void);
+XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index);
+XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
+
XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv);
XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void);
--- /dev/null
+/* Copyright (c) 2013. 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 "smpi/smpi.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi,
+ "Logging specific to SMPI (experimental DVFS support)");
+
+/**
+ * \brief Return the speed of the processor (in flop/s) at a given pstate
+ *
+ * \param pstate_index pstate to test
+ * \return Returns the processor speed associated with pstate_index
+ */
+double smpi_get_host_power_peak_at(int pstate_index)
+{
+ return simcall_host_get_power_peak_at(SIMIX_host_self(), pstate_index);
+}
+
+/**
+ * \brief Return the current speed of the processor (in flop/s)
+ *
+ * \return Returns the current processor speed
+ */
+double smpi_get_host_current_power_peak(void)
+{
+ return simcall_host_get_current_power_peak(SIMIX_host_self());
+}
+
+/**
+ * \brief Return the number of pstates defined for host
+ */
+int smpi_get_host_nb_pstates(void)
+{
+ return simcall_host_get_nb_pstates(SIMIX_host_self());
+}
+
+/**
+ * \brief Sets the speed of the processor (in flop/s) at a given pstate
+ *
+ * \param pstate_index pstate to switch to
+ */
+void smpi_set_host_power_peak_at(int pstate_index)
+{
+ simcall_host_set_power_peak_at(SIMIX_host_self(), pstate_index);
+}
+
+/**
+ * \brief Return the total energy consumed by a host (in Joules)
+ *
+ * \return Returns the consumed energy
+ */
+double smpi_get_host_consumed_energy(void)
+{
+ return simcall_host_get_consumed_energy(SIMIX_host_self());
+}
XBT_LOG_CONNECT(smpi_base);
XBT_LOG_CONNECT(smpi_bench);
XBT_LOG_CONNECT(smpi_coll);
+ XBT_LOG_CONNECT(smpi_colls);
XBT_LOG_CONNECT(smpi_comm);
+ XBT_LOG_CONNECT(smpi_dvfs);
XBT_LOG_CONNECT(smpi_group);
XBT_LOG_CONNECT(smpi_kernel);
XBT_LOG_CONNECT(smpi_mpi);
XBT_LOG_CONNECT(smpi_mpi_dt);
XBT_LOG_CONNECT(smpi_pmpi);
XBT_LOG_CONNECT(smpi_replay);
- XBT_LOG_CONNECT(smpi_colls);
#ifdef HAVE_TRACING
TRACE_global_init(&argc, argv);