geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Functions
geopm_ctl.h File Reference
#include <mpi.h>
#include <stdio.h>
#include <stdint.h>
#include <pthread.h>
#include "geopm_public.h"
Include dependency graph for geopm_ctl.h:
This graph shows which files directly or indirectly include this file:

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...
 

Function Documentation

◆ geopm_ctl_create()

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.

Parameters
commThe user provides an MPI communicator, which must have at least one process running on every compute node under control.
ctlThe out parameter pointer to the created geopm_ctl_c object

◆ geopm_ctl_destroy()

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().

◆ geopm_ctl_pthread()

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()

Parameters
ctlis an opaque structure that holds the state used to execute the control algorithm
attris used to create the POSIX thread
threadis used to create the POSIX thread

◆ geopm_ctl_run()

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.