27#include "communication.hpp"
57 std::vector<EspressoGpuDevice>
devices;
72 std::set<EspressoGpuDevice, CompareDevices>
device_set;
83std::pair<int, std::string> get_node_info() {
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
Communicator communicator
boost::mpi::communicator comm_cart
The communicator.
int this_node
The number of this node.
void invoke_skip_cuda_exceptions(F &&f, Args &&...args)
Invoke a function and silently ignore any thrown cuda_runtime_error error.
std::vector< EspressoGpuDevice > cuda_gather_gpus()
Gather list of CUDA devices from all nodes on the head node.
void cuda_on_program_start()
Called on program start.
EspressoGpuDevice cuda_get_device_props(int dev)
Get properties of a CUDA device.
int cuda_get_n_gpus()
Get the number of CUDA devices on the local host.
void cuda_init()
Initializes the CUDA stream.
void gather_buffer(std::vector< T, Allocator > &buffer, boost::mpi::communicator const &comm, int root=0)
Gather buffer with different size on each node.
Helper class for device sets.
bool operator()(const EspressoGpuDevice &a, const EspressoGpuDevice &b) const
Struct to hold information relevant to ESPResSo about GPUs.
std::string proc_name
Node identification.
int id
Local CUDA device id.