StarNEig User's Guide  v0.1.6
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 
72 #define STARNEIG_USE_ALL -1
73 
77 typedef unsigned starneig_flag_t;
78 
84 #define STARNEIG_DEFAULT 0x0
85 
93 #define STARNEIG_HINT_SM 0x0
94 
102 #define STARNEIG_HINT_DM 0x1
103 
111 #define STARNEIG_FXT_DISABLE 0x2
112 
120 #define STARNEIG_AWAKE_WORKERS 0x4
121 
129 #define STARNEIG_AWAKE_MPI_WORKER 0x8
130 
138 #define STARNEIG_FAST_DM (STARNEIG_HINT_DM | STARNEIG_AWAKE_WORKERS | STARNEIG_AWAKE_MPI_WORKER)
139 
145 #define STARNEIG_NO_VERBOSE 0x10
146 
152 #define STARNEIG_NO_MESSAGES (STARNEIG_NO_VERBOSE | 0x20)
153 
157 
178 void starneig_node_init(int cores, int gpus, starneig_flag_t flags);
179 
186 
193 
200 void starneig_node_set_cores(int cores);
201 
208 
215 void starneig_node_set_gpus(int gpus);
216 
221 
222 #ifdef STARNEIG_ENABLE_CUDA
223 
228 
235 
242 
246 
247 #endif
248 
252 
253 // deprecated
254 #ifdef STARNEIG_ENABLE_MPI
255 void starneig_mpi_set_comm(MPI_Comm comm);
256 MPI_Comm starneig_mpi_get_comm();
257 #endif
258 
259 #ifdef __cplusplus
260 }
261 #endif
262 
263 #endif // STARNEIG_NODE_H
starneig_node_set_gpus
void starneig_node_set_gpus(int gpus)
Changes the number of GPUs to use per MPI rank.
starneig_mpi_get_comm
MPI_Comm starneig_mpi_get_comm()
Returns the library MPI communicator.
starneig_mpi_set_comm
void starneig_mpi_set_comm(MPI_Comm comm)
Sets a MPI communicator for the library.
starneig_node_set_cores
void starneig_node_set_cores(int cores)
Changes the number of CPUs cores (threads) to use per MPI rank.
starneig_node_disable_pinning
void starneig_node_disable_pinning()
Disables CUDA host memory pinning.
starneig_node_init
void starneig_node_init(int cores, int gpus, starneig_flag_t flags)
Initializes the intra-node execution environment.
starneig_node_get_cores
int starneig_node_get_cores()
Returns the number of cores (threads) per MPI rank.
starneig_node_initialized
int starneig_node_initialized()
Checks whether the intra-node execution environment is initialized.
starneig_node_enable_pinning
void starneig_node_enable_pinning()
Enable CUDA host memory pinning.
starneig_flag_t
unsigned starneig_flag_t
Library initialization flag data type.
Definition: node.h:77
configuration.h
This file contains StarNEig library configuration.
starneig_node_get_gpus
int starneig_node_get_gpus()
Returns the number of GPUs per MPI rank.
starneig_node_finalize
void starneig_node_finalize()
Deallocates resources associated with the intra-node configuration.