Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
local_rank.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
20#include <optional>
21
22namespace shamcomm {
23
24 // fetch the current MPI rank within the current node
25 std::optional<u32> node_local_rank();
26
27 // returns true if node_local_rank() is not available, or if it matches main_local_rank_id
28 bool is_main_node_rank(u32 main_local_rank_id = 0);
29
30} // namespace shamcomm
std::uint32_t u32
32 bit unsigned integer
namespace for communication related stuff