StarNEig Library  v0.1.2
A task-based library for solving dense 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 #include <stddef.h>
50 #ifdef STARNEIG_ENABLE_MPI
51 #include <mpi.h>
52 #endif
53 
61 
66 
70 typedef unsigned starneig_flag_t;
71 
77 #define STARNEIG_DEFAULT 0x0
78 
86 #define STARNEIG_HINT_SM 0x0
87 
95 #define STARNEIG_HINT_DM 0x1
96 
104 #define STARNEIG_FXT_DISABLE 0x2
105 
113 #define STARNEIG_AWAKE_WORKERS 0x4
114 
122 #define STARNEIG_AWAKE_MPI_WORKER 0x8
123 
131 #define STARNEIG_FAST_DM (STARNEIG_HINT_DM | STARNEIG_AWAKE_WORKERS | STARNEIG_AWAKE_MPI_WORKER)
132 
138 #define STARNEIG_NO_VERBOSE 0x10
139 
145 #define STARNEIG_NO_MESSAGES (STARNEIG_NO_VERBOSE | 0x20)
146 
150 
171 void starneig_node_init(int cores, int gpus, starneig_flag_t flags);
172 
179 
186 
193 void starneig_node_set_cores(int cores);
194 
201 
208 void starneig_node_set_gpus(int gpus);
209 
214 
215 #ifdef STARNEIG_ENABLE_CUDA
216 
221 
228 
235 
239 
240 #endif
241 
245 
246 // deprecated
247 #ifdef STARNEIG_ENABLE_MPI
248 void starneig_mpi_set_comm(MPI_Comm comm);
249 MPI_Comm starneig_mpi_get_comm();
250 #endif
251 
252 #ifdef __cplusplus
253 }
254 #endif
255 
256 #endif // STARNEIG_NODE_H
MPI_Comm starneig_mpi_get_comm()
Returns the library MPI communicator.
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.
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.
void starneig_node_disable_pinning()
Disables CUDA host memory pinning.
void starneig_node_enable_pinning()
Enable CUDA host memory pinning.
unsigned starneig_flag_t
Library initialization flag data type.
Definition: node.h:70
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.
void starneig_mpi_set_comm(MPI_Comm comm)
Sets a MPI communicator for the library.