Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeInstance.hpp File Reference

Header file describing a Node Instance. More...

#include "shambase/aliases_int.hpp"
#include "shambackends/DeviceScheduler.hpp"
#include "shamcomm/mpiInfo.hpp"
#include "shamcomm/worldInfo.hpp"
#include <sycl/sycl.hpp>
#include <vector>
Include dependency graph for NodeInstance.hpp:

Go to the source code of this file.

Classes

class  shamsys::instance::ShamsysInstanceException
 Exception type for the NodeInstance. More...
struct  shamsys::instance::SyclInitInfo
 Struct containing Sycl Init informations Usage. More...
struct  shamsys::instance::MPIInitInfo
 Struct containing MPI Init informations Usage. More...

Namespaces

namespace  shamsys
 namespace for the system handling

Functions

bool shamsys::instance::is_initialized ()
 to check whether the NodeInstance is initialized
void shamsys::instance::init (int argc, char *argv[])
 initialize the NodeInstance from command line args in the main
void shamsys::instance::start_mpi (MPIInitInfo mpi_info)
 Start MPI.
void shamsys::instance::init_sycl_mpi (std::string search_key, MPIInitInfo mpi_info)
 Start SYCL & MPI.
void shamsys::instance::close ()
 close the NodeInstance Aka : Finalize both MPI & SYCL
void shamsys::instance::close_mpi ()
 Finalize MPI.
void shamsys::instance::print_device_list ()
void shamsys::instance::print_queue_map ()
 Print SYCL queue map.
sycl::queue & shamsys::instance::get_compute_queue (u32 id=0)
u32 shamsys::instance::get_compute_queue_eu_count (u32 id=0)
sycl::device shamsys::instance::get_compute_device ()
sycl::queue & shamsys::instance::get_alt_queue (u32 id=0)
 Get the alternative queue.
sham::DeviceScheduler & shamsys::instance::get_compute_scheduler ()
sham::DeviceScheduler & shamsys::instance::get_alt_scheduler ()
std::shared_ptr< sham::DeviceScheduler > shamsys::instance::get_compute_scheduler_ptr ()
std::shared_ptr< sham::DeviceScheduler > shamsys::instance::get_alt_scheduler_ptr ()
void shamsys::instance::print_mpi_capabilities ()
void shamsys::instance::print_mpi_comm_info ()
void shamsys::instance::check_dgpu_available ()

Detailed Description

Header file describing a Node Instance.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

A NodeInstance is a wrapper to perform a combined initialisation of both SYCL & MPI. Essentially it handle the MPI process and corresponding accelerators

Definition in file NodeInstance.hpp.

Function Documentation

◆ check_dgpu_available()

void shamsys::instance::check_dgpu_available ( )

Definition at line 416 of file NodeInstance.cpp.

◆ close()

void shamsys::instance::close ( )

close the NodeInstance Aka : Finalize both MPI & SYCL

Definition at line 374 of file NodeInstance.cpp.

◆ close_mpi()

void shamsys::instance::close_mpi ( )

Finalize MPI.

Definition at line 360 of file NodeInstance.cpp.

Here is the call graph for this function:

◆ get_alt_queue()

sycl::queue & shamsys::instance::get_alt_queue ( u32 id = 0)

Get the alternative queue.

Parameters
id
Returns
sycl::queue& reference to the corresponding queue

Definition at line 387 of file NodeInstance.cpp.

◆ get_alt_scheduler()

sham::DeviceScheduler & shamsys::instance::get_alt_scheduler ( )

Definition at line 391 of file NodeInstance.cpp.

◆ get_alt_scheduler_ptr()

std::shared_ptr< sham::DeviceScheduler > shamsys::instance::get_alt_scheduler_ptr ( )

Definition at line 397 of file NodeInstance.cpp.

◆ get_compute_device()

sycl::device shamsys::instance::get_compute_device ( )
inline

Definition at line 127 of file NodeInstance.hpp.

◆ get_compute_queue()

sycl::queue & shamsys::instance::get_compute_queue ( u32 id = 0)
Parameters
id
Returns
sycl::queue& reference to the corresponding queue

Definition at line 385 of file NodeInstance.cpp.

◆ get_compute_queue_eu_count()

u32 shamsys::instance::get_compute_queue_eu_count ( u32 id = 0)

Definition at line 165 of file NodeInstance.cpp.

◆ get_compute_scheduler()

sham::DeviceScheduler & shamsys::instance::get_compute_scheduler ( )

Definition at line 389 of file NodeInstance.cpp.

◆ get_compute_scheduler_ptr()

std::shared_ptr< sham::DeviceScheduler > shamsys::instance::get_compute_scheduler_ptr ( )

Definition at line 393 of file NodeInstance.cpp.

◆ init()

void shamsys::instance::init ( int argc,
char * argv[] )

initialize the NodeInstance from command line args in the main

int main(int argc, char *argv[]){
... do stuff ...
}
void init(int argc, char *argv[])
initialize the NodeInstance from command line args in the main
void close()
close the NodeInstance Aka : Finalize both MPI & SYCL

Definition at line 331 of file NodeInstance.cpp.

Here is the call graph for this function:

◆ init_sycl_mpi()

void shamsys::instance::init_sycl_mpi ( std::string search_key,
MPIInitInfo mpi_info )

Start SYCL & MPI.

Definition at line 311 of file NodeInstance.cpp.

Here is the call graph for this function:

◆ is_initialized()

bool shamsys::instance::is_initialized ( )

to check whether the NodeInstance is initialized

Returns
true NodeInstance is initialized
false NodeInstance is not initialized

Definition at line 167 of file NodeInstance.cpp.

Here is the call graph for this function:

◆ print_device_list()

void shamsys::instance::print_device_list ( )

Definition at line 406 of file NodeInstance.cpp.

◆ print_mpi_capabilities()

void shamsys::instance::print_mpi_capabilities ( )

Definition at line 412 of file NodeInstance.cpp.

◆ print_mpi_comm_info()

void shamsys::instance::print_mpi_comm_info ( )

Definition at line 414 of file NodeInstance.cpp.

◆ print_queue_map()

void shamsys::instance::print_queue_map ( )

Print SYCL queue map.

Definition at line 169 of file NodeInstance.cpp.

Here is the call graph for this function:

◆ start_mpi()

void shamsys::instance::start_mpi ( MPIInitInfo mpi_info)

Start MPI.

Definition at line 245 of file NodeInstance.cpp.

Here is the call graph for this function: