6 #ifndef GEOPM_ENDPOINT_H_INCLUDE
7 #define GEOPM_ENDPOINT_H_INCLUDE
11 #include "geopm_public.h"
17 static const size_t GEOPM_ENDPOINT_AGENT_NAME_MAX = 256;
18 static const size_t GEOPM_ENDPOINT_PROFILE_NAME_MAX = 256;
19 static const size_t GEOPM_ENDPOINT_HOSTLIST_PATH_MAX = 512;
21 struct geopm_endpoint_c;
184 size_t node_name_max,
char *node_name);
201 size_t num_policy,
const double *policy_array);
222 double *sample_array,
double *sample_age_sec);
int GEOPM_PUBLIC geopm_endpoint_profile_name(struct geopm_endpoint_c *endpoint, size_t profile_name_max, char *profile_name)
Check profile name for an attached job.
Definition: Endpoint.cpp:354
int GEOPM_PUBLIC geopm_endpoint_create(const char *endpoint_name, struct geopm_endpoint_c **endpoint)
Create an endpoint object for other API functions.
Definition: Endpoint.cpp:246
int GEOPM_PUBLIC geopm_endpoint_stop_wait_loop(struct geopm_endpoint_c *endpoint)
Stops any current wait loops the endpoint is running.
Definition: Endpoint.cpp:327
int GEOPM_PUBLIC geopm_endpoint_num_node(struct geopm_endpoint_c *endpoint, int *num_node)
Get the number of nodes managed by the agent.
Definition: Endpoint.cpp:370
int GEOPM_PUBLIC geopm_endpoint_reset_wait_loop(struct geopm_endpoint_c *endpoint)
Resets the endpoint to prepare for a subsequent call to geopm_endpoint_wait_for_agent_attach().
Definition: Endpoint.cpp:340
int GEOPM_PUBLIC geopm_endpoint_write_policy(struct geopm_endpoint_c *endpoint, size_t num_policy, const double *policy_array)
Set the policy values for the agent to follow.
Definition: Endpoint.cpp:411
int GEOPM_PUBLIC geopm_endpoint_wait_for_agent_attach(struct geopm_endpoint_c *endpoint, double timeout)
Blocks until an agent has attached or the timeout is reached.
Definition: Endpoint.cpp:313
int GEOPM_PUBLIC geopm_endpoint_destroy(struct geopm_endpoint_c *endpoint)
Release resources associated with endpoint.
Definition: Endpoint.cpp:259
int GEOPM_PUBLIC geopm_endpoint_node_name(struct geopm_endpoint_c *endpoint, int node_idx, size_t node_name_max, char *node_name)
Get the hostname of the indexed compute node.
Definition: Endpoint.cpp:385
int GEOPM_PUBLIC geopm_endpoint_read_sample(struct geopm_endpoint_c *endpoint, size_t num_sample, double *sample_array, double *sample_age_sec)
Get a sample from the agent and amount of time that has passed since the agent last provided an updat...
Definition: Endpoint.cpp:427
int GEOPM_PUBLIC geopm_endpoint_agent(struct geopm_endpoint_c *endpoint, size_t agent_name_max, char *agent_name)
Check if an agent has attached.
Definition: Endpoint.cpp:297
int GEOPM_PUBLIC geopm_endpoint_close(struct geopm_endpoint_c *endpoint)
Destroy shmem regions within the endpoint.
Definition: Endpoint.cpp:284
int GEOPM_PUBLIC geopm_endpoint_open(struct geopm_endpoint_c *endpoint)
Create shmem regions within the endpoint for policy/sample handling.
Definition: Endpoint.cpp:271