ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
init.cpp File Reference
#include "config/config.hpp"
#include "init.hpp"
#include "utils.hpp"
#include "communication.hpp"
#include <mpi.h>
#include <cstring>
#include <iterator>
#include <set>
#include <vector>
+ Include dependency graph for init.cpp:

Go to the source code of this file.

Classes

struct  CompareDevices
 Helper class for device sets. More...
 

Functions

std::vector< EspressoGpuDevicecuda_gather_gpus ()
 Gather list of CUDA devices on all nodes on the head node.
 
void cuda_on_program_start ()
 Called on program start.
 

Function Documentation

◆ cuda_gather_gpus()

std::vector< EspressoGpuDevice > cuda_gather_gpus ( )

Gather list of CUDA devices on all nodes on the head node.

Gather unique list of CUDA devices on all nodes.

It relies on MPI_Get_processor_name() to get a unique identifier of the physical node, as opposed to the logical rank of which there can be more than one per node.

Definition at line 52 of file init.cpp.

References communicator, cuda_get_device_props(), cuda_get_n_gpus(), invoke_skip_cuda_exceptions(), Communicator::size, and this_node.

Referenced by ScriptInterface::System::CudaInitHandle::do_call_method().

◆ cuda_on_program_start()

void cuda_on_program_start ( )

Called on program start.

Definition at line 115 of file init.cpp.

References communicator, cuda_init(), invoke_skip_cuda_exceptions(), and this_node.

Referenced by Communication::init().