name: jarfile
# IRC notifications, even if https://github.com/appveyor/ci/issues/88 is not closed yet
-on_success:
- - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}"
on_failure:
- "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}"
+#on_success:
+# - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}"
on_success: change
on_failure: always
irc:
+ on_success: change
+ on_failure: always
channels:
- "irc.debian.org#simgrid"
template:
#include <mpi.h>
#include <smpi/smpi.h>
+#include <simgrid/host.h>
+#include <simgrid/plugins/energy.h>
+
int main(int argc, char *argv[])
{
int rank;
exit(EXIT_FAILURE);
}
- int pstates = smpi_get_host_nb_pstates();
+ int pstates = sg_host_get_nb_pstates(sg_host_self());
char *s = buf;
size_t sz = sizeof buf;
size_t x = snprintf(s, sz,
"[%.6f] [rank %d] Pstates: %d; Powers: %.0f",
- MPI_Wtime(), rank, pstates, smpi_get_host_power_peak_at(0));
+ MPI_Wtime(), rank, pstates, sg_host_get_pstate_speed(sg_host_self(), 0));
if (x < sz) {
s += x;
sz -= x;
} else
sz = 0;
for (i = 1; i < pstates; i++) {
- x = snprintf(s, sz, ", %.0f", smpi_get_host_power_peak_at(i));
+ x = snprintf(s, sz, ", %.0f", sg_host_get_pstate_speed(sg_host_self(), i));
if (x < sz) {
s += x;
sz -= x;
fprintf(stderr, "%s%s\n", buf, (sz ? "" : " [...]"));
for (i = 0; i < pstates; i++) {
- smpi_set_host_pstate(i);
+ sg_host_set_pstate(sg_host_self(), i);
fprintf(stderr, "[%.6f] [rank %d] Current pstate: %d; Current power: %.0f\n",
- MPI_Wtime(), rank, i, smpi_get_host_current_power_peak());
+ MPI_Wtime(), rank, i, sg_host_speed(sg_host_self()));
SMPI_SAMPLE_FLOPS(1e9) {
/* imagine here some code running for 1e9 flops... */
}
fprintf(stderr, "[%.6f] [rank %d] Energy consumed: %g Joules.\n",
- MPI_Wtime(), rank, smpi_get_host_consumed_energy());
+ MPI_Wtime(), rank, sg_host_get_consumed_energy(sg_host_self()));
}
err = MPI_Finalize();
XBT_PUBLIC void smpi_execute(double duration);
XBT_PUBLIC void smpi_execute_benched(double duration);
-XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index);
-XBT_PUBLIC double smpi_get_host_current_power_peak();
-XBT_PUBLIC int smpi_get_host_nb_pstates();
-XBT_PUBLIC void smpi_set_host_pstate(int pstate_index);
-XBT_PUBLIC int smpi_get_host_pstate();
-
-XBT_PUBLIC double smpi_get_host_consumed_energy();
+// PLEASE NOTE: If you remove these functions, the entire smpi_dvfs.cpp file can be removed as well!!
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate_speed(sg_host_self(), pstate_index) instead") XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index);
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_speed(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_current_power_peak();
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_nb_pstates(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_nb_pstates();
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_set_pstate(sg_host_self(), pstate_index) instead") XBT_PUBLIC void smpi_set_host_pstate(int pstate_index);
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_pstate();
+
+XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_consumed_energy(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_consumed_energy();
XBT_PUBLIC unsigned long long smpi_rastro_resolution();
double power_slope = 0;
if (cpu_load > 0) { /* Something is going on, the machine is not idle */
- double min_power = range.min_;
- double max_power = range.max_;
+ min_power = range.min_;
+ max_power = range.max_;
/**
* The min_power states how much we consume when only one single
extern "C" XBT_PUBLIC doublereal smpi_get_host_power_peak_at_(integer* pstate_index);
doublereal smpi_get_host_power_peak_at_(integer *pstate_index)
{
- return static_cast<doublereal>(smpi_get_host_power_peak_at((int)*pstate_index));
+ return static_cast<doublereal>(sg_host_self()->get_pstate_speed((int)*pstate_index));
}
extern "C" XBT_PUBLIC doublereal smpi_get_host_current_power_peak_();
doublereal smpi_get_host_current_power_peak_()
{
- return smpi_get_host_current_power_peak();
+ return sg_host_self()->get_speed();
}
extern "C" XBT_PUBLIC integer smpi_get_host_nb_pstates_();
integer smpi_get_host_nb_pstates_()
{
- return static_cast<integer>(smpi_get_host_nb_pstates());
+ return static_cast<integer>(sg_host_self()->get_pstate_count());
}
extern "C" XBT_PUBLIC void smpi_set_host_pstate_(integer* pstate_index);
void smpi_set_host_pstate_(integer *pstate_index)
{
- smpi_set_host_pstate(static_cast<int>(*pstate_index));
+ sg_host_set_pstate(sg_host_self(), (static_cast<int>(*pstate_index)));
}
extern "C" XBT_PUBLIC doublereal smpi_get_host_consumed_energy_();
doublereal smpi_get_host_consumed_energy_()
{
- return static_cast<doublereal>(smpi_get_host_consumed_energy());
+ return static_cast<doublereal>(sg_host_get_consumed_energy(sg_host_self()));
}
#endif
value. se commas to delineate multiple messages.
Modified by Martin Quinson on June 2018:
-
+
- Use OFTC instead of Freenode
Example:
"""
-import os, random, socket, ssl, sys, time
+import random, socket, ssl, sys, time
def appveyor_vars():
"""
- Return a dict of key value carfted from appveyor environment variables.
+ Return a dict of key value crafted from appveyor environment variables.
"""
from os import environ
build_url = '{appveyor_url}/project/{account_name}/{project_slug}/build/{build_version}'.format(**locals())
commit_url = 'https://{repo_provider}.com/{repo_name}/commit/{commit}'.format(**locals())
- vars = dict(
+ apvy_vars = dict(
appveyor_url=appveyor_url,
account_name=account_name,
project_name=project_name,
underline='\x1f',
plain='\x0f',
)
- return vars
+ return apvy_vars
if __name__ == '__main__':