StarNEig Library  version v0.1-beta.2
A task-based library for solving nonsymmetric eigenvalue problems
node.h
Go to the documentation of this file.
1 
41 #ifndef STARNEIG_NODE_H
42 #define STARNEIG_NODE_H
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 #include <starneig/configuration.h>
49 #ifdef STARNEIG_ENABLE_MPI
50 #include <mpi.h>
51 #endif
52 
60 
65 
69 typedef unsigned starneig_flag_t;
70 
76 #define STARNEIG_DEFAULT 0x0
77 
84 #define STARNEIG_HINT_SM 0x0
85 
92 #define STARNEIG_HINT_DM 0x1
93 
99 #define STARNEIG_FXT_DISABLE 0x2
100 
106 #define STARNEIG_AWAKE_WORKERS 0x4
107 
114 #define STARNEIG_AWAKE_MPI_WORKER 0x8
115 
122 #define STARNEIG_FAST_DM (STARNEIG_HINT_DM | STARNEIG_AWAKE_WORKERS | STARNEIG_AWAKE_MPI_WORKER)
123 
129 #define STARNEIG_NO_VERBOSE 0x10
130 
136 #define STARNEIG_NO_MESSAGES (STARNEIG_NO_VERBOSE | 0x20)
137 
141 
162 void starneig_node_init(int cores, int gpus, starneig_flag_t flags);
163 
170 
177 
184 void starneig_node_set_cores(int cores);
185 
192 
199 void starneig_node_set_gpus(int gpus);
200 
205 
206 #ifdef STARNEIG_ENABLE_MPI
207 
212 
221 void starneig_mpi_set_comm(MPI_Comm comm);
222 
228 MPI_Comm starneig_mpi_get_comm();
229 
233 
234 #endif
235 
239 
240 #ifdef __cplusplus
241 }
242 #endif
243 
244 #endif // STARNEIG_NODE_H
void starneig_node_set_gpus(int gpus)
Changes the number of GPUs to use per MPI rank.
void starneig_node_set_cores(int cores)
Changes the number of CPUs cores (threads) to use per MPI rank.
void starneig_mpi_set_comm(MPI_Comm comm)
Sets a MPI communicator for the library.
This file contains StarNEig library configuration.
void starneig_node_init(int cores, int gpus, starneig_flag_t flags)
Initializes the intra-node execution environment.
int starneig_node_initialized()
Checks whether the intra-node execution environment is initialized.
unsigned starneig_flag_t
Library initialization flag data type.
Definition: node.h:69
int starneig_node_get_cores()
Returns the number of cores (threads) per MPI rank.
int starneig_node_get_gpus()
Returns the number of GPUs per MPI rank.
void starneig_node_finalize()
Deallocates resources associated with the intra-node configuration.
MPI_Comm starneig_mpi_get_comm()
Returns the library MPI communicator.