geopm
3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
|
#include <mpi.h>
#include <stdio.h>
#include <stdint.h>
#include <pthread.h>
#include "geopm_public.h"
Go to the source code of this file.
Functions | |
int GEOPM_PUBLIC | geopm_ctl_create (MPI_Comm comm, struct geopm_ctl_c **ctl) |
creates a geopm_ctl_c object, ctl which is an opaque structure that holds the state used to execute the control algorithm with one of the other functions described in this header file. More... | |
int GEOPM_PUBLIC | geopm_ctl_destroy (struct geopm_ctl_c *ctl) |
destroys all resources associated with the ctl structure which allocated by a previous call to geopm_ctl_create(). More... | |
int GEOPM_PUBLIC | geopm_ctl_run (struct geopm_ctl_c *ctl) |
steps the control algorithm continuously until the application signals shutdown. More... | |
int GEOPM_PUBLIC | geopm_ctl_pthread (struct geopm_ctl_c *ctl, const pthread_attr_t *attr, pthread_t *thread) |
creates a POSIX thread running the control algorithm continuously until the application signals shutdown. More... | |
int GEOPM_PUBLIC geopm_ctl_create | ( | MPI_Comm | comm, |
struct geopm_ctl_c ** | ctl | ||
) |
creates a geopm_ctl_c object, ctl which is an opaque structure that holds the state used to execute the control algorithm with one of the other functions described in this header file.
The control algorithm relies on feedback about the application profile.
comm | The user provides an MPI communicator, which must have at least one process running on every compute node under control. |
ctl | The out parameter pointer to the created geopm_ctl_c object |
int GEOPM_PUBLIC geopm_ctl_destroy | ( | struct geopm_ctl_c * | ctl | ) |
destroys all resources associated with the ctl structure which allocated by a previous call to geopm_ctl_create().
int GEOPM_PUBLIC geopm_ctl_pthread | ( | struct geopm_ctl_c * | ctl, |
const pthread_attr_t * | attr, | ||
pthread_t * | thread | ||
) |
creates a POSIX thread running the control algorithm continuously until the application signals shutdown.
With this method of launch the supporting MPI implementation must be enabled for MPI_THREAD_MULTIPLE using MPI_Init_thread()
ctl | is an opaque structure that holds the state used to execute the control algorithm |
attr | is used to create the POSIX thread |
thread | is used to create the POSIX thread |
int GEOPM_PUBLIC geopm_ctl_run | ( | struct geopm_ctl_c * | ctl | ) |
steps the control algorithm continuously until the application signals shutdown.
steps the control algorithm continuously until the application signals shutdown.