Dynamic Load Balance 3.6.1+32-59d1
dlb_drom.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2024 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20#ifndef DLB_DROM_H
21#define DLB_DROM_H
22
23#include "dlb_types.h"
24#include "dlb_errors.h"
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif
30
31/*********************************************************************************/
32/* Dynamic Resource Manager Module */
33/*********************************************************************************/
34
43int DLB_DROM_Attach(void);
44
52int DLB_DROM_Detach(void);
53
58int DLB_DROM_GetNumCpus(int *ncpus);
59
67int DLB_DROM_GetPidList(int *pidlist, int *nelems, int max_len);
68
87
116
130int DLB_DROM_SetProcessMaskStr(int pid, const char *mask, dlb_drom_flags_t flags);
131
171 char ***next_environ);
172
196int DLB_DROM_PostFinalize(int pid, dlb_drom_flags_t flags);
197
209int DLB_DROM_RecoverStolenCpus(int pid);
210
211#ifdef __cplusplus
212}
213#endif
214
215#endif /* DLB_DROM_H */
int DLB_DROM_RecoverStolenCpus(int pid)
Recover previously stolen CPUs if they are idle.
Definition: DLB_interface_drom.c:133
int DLB_DROM_SetProcessMask(int pid, const_dlb_cpu_set_t mask, dlb_drom_flags_t flags)
Set the process mask of the given PID.
Definition: DLB_interface_drom.c:84
int DLB_DROM_SetProcessMaskStr(int pid, const char *mask, dlb_drom_flags_t flags)
Set the process mask of the given PID.
Definition: DLB_interface_drom.c:96
int DLB_DROM_Attach(void)
Attach current process to DLB system as DROM administrator.
Definition: DLB_interface_drom.c:42
int DLB_DROM_GetProcessMask(int pid, dlb_cpu_set_t mask, dlb_drom_flags_t flags)
Get the process mask of the given PID.
Definition: DLB_interface_drom.c:73
int DLB_DROM_GetNumCpus(int *ncpus)
Get the number of CPUs in the node.
Definition: DLB_interface_drom.c:62
int DLB_DROM_PreInit(int pid, const_dlb_cpu_set_t mask, dlb_drom_flags_t flags, char ***next_environ)
Make room in the system for a new process with the given mask.
Definition: DLB_interface_drom.c:103
int DLB_DROM_Detach(void)
Detach current process from DLB system.
Definition: DLB_interface_drom.c:55
int DLB_DROM_PostFinalize(int pid, dlb_drom_flags_t flags)
Unregister a process from the DLB system.
Definition: DLB_interface_drom.c:126
int DLB_DROM_GetPidList(int *pidlist, int *nelems, int max_len)
Get the list of running processes registered in the DLB system.
Definition: DLB_interface_drom.c:68
void * dlb_cpu_set_t
Definition: dlb_types.h:26
dlb_drom_flags_t
Definition: dlb_types.h:34
const void * const_dlb_cpu_set_t
Definition: dlb_types.h:27