Classes | Typedefs | Functions
Parallel Namespace Reference

Contains functions that forward to Charm++ parallel functions. More...

Classes

class  AlgorithmImpl< ParallelComponent, tmpl::list< ActionsPack... > >
 A distributed object (Charm++ Chare) that executes a series of Actions and is capable of sending and receiving data. Acts as an interface to Charm++. More...
 
struct  ArrayIndex
 The array index used for indexing Chare Arrays, mostly an implementation detail. More...
 
class  ConstGlobalCache
 A Charm++ chare that caches constant data once per Charm++ node. More...
 
struct  has_pup_member
 Check if T has a pup member function. More...
 
struct  is_array_proxy
 Check if T is a Charm++ proxy for an array chare. More...
 
struct  is_bound_array
 Check if T is a ParallelComponent for a Charm++ bound array. More...
 
struct  is_bound_array< T, cpp17::void_t< typename T::bind_to > >
 
struct  is_chare_proxy
 Check if T is a Charm++ proxy for a chare. More...
 
struct  is_group_proxy
 Check if T is a Charm++ proxy for a group chare. More...
 
struct  is_node_group_proxy
 Check if T is a Charm++ proxy for a node group chare. More...
 
struct  is_pupable
 Check if type T has operator| defined for Charm++ serialization. More...
 
class  Main
 The main function of a Charm++ executable. See the Parallelization documentation for an overview of Metavariables, Phases, and parallel components. More...
 
struct  ReductionData< ReductionDatum< Ts, InvokeCombines, InvokeFinals, InvokeFinalExtraArgsIndices >... >
 Used for reducing a possibly heterogeneous collection of types in a single reduction call. More...
 
struct  ReductionDatum
 The data to be reduced, and invokables to be called whenever two reduction messages are combined and after the reduction has been completed. More...
 

Typedefs

using ArrayIndex1D = ArrayIndex< CkIndex1D >
 
using ArrayIndex2D = ArrayIndex< CkIndex2D >
 
using ArrayIndex3D = ArrayIndex< CkIndex3D >
 
using ArrayIndex4D = ArrayIndex< CkIndex4D >
 
using ArrayIndex5D = ArrayIndex< CkIndex5D >
 
using ArrayIndex6D = ArrayIndex< CkIndex6D >
 
template<class Action >
using get_inbox_tags_from_action = typename Parallel_detail::get_inbox_tags_from_action< Action >::type
 Given an Action returns the list of inbox tags for that action.
 
template<class ActionsList >
using get_inbox_tags = tmpl::remove_duplicates< tmpl::join< tmpl::transform< ActionsList, Parallel_detail::get_inbox_tags_from_action< tmpl::_1 > >> >
 Given a list of Actions, get a list of the unique inbox tags.
 
template<class Action >
using get_const_global_cache_tags_from_action = typename Parallel_detail::get_const_global_cache_tags_from_action< Action >::type
 Given an Action returns the contents of the const_global_cache_tags alias for that action, or an empty list if no such alias exists.
 
template<class ActionsList >
using get_const_global_cache_tags = tmpl::remove_duplicates< tmpl::join< tmpl::transform< ActionsList, Parallel_detail::get_const_global_cache_tags_from_action< tmpl::_1 > >> >
 Given a list of Actions, get a list of the unique tags specified in the actions' const_global_cache_tags aliases.
 

Functions

void abort (const std::string &message)
 Abort the program with an error message.
 
void exit ()
 Exit the program normally. This should only be called once over all processors.
 
int number_of_procs ()
 Number of processing elements.
 
int my_proc ()
 Index of my processing element.
 
int number_of_nodes ()
 Number of nodes.
 
int my_node ()
 Index of my node.
 
int procs_on_node (const int node_index)
 Number of processing elements on the given node.
 
int my_local_rank ()
 The local index of my processing element on my node. This is in the interval 0, ..., procs_on_node(my_node()) - 1.
 
int first_proc_on_node (const int node_index)
 Index of first processing element on the given node.
 
int node_of (const int proc_index)
 Index of the node for the given processing element.
 
int local_rank_of (const int proc_index)
 The local index for the given processing element on its node.
 
double wall_time ()
 The current wall time in seconds.
 
CmiNodeLock create_lock () noexcept
 Create a converse CmiNodeLock.
 
void free_lock (const gsl::not_null< CmiNodeLock *> node_lock) noexcept
 Free a converse CmiNodeLock. Using the lock after free is undefined behavior.
 
void lock (const gsl::not_null< CmiNodeLock *> node_lock) noexcept
 Lock a converse CmiNodeLock.
 
bool try_lock (const gsl::not_null< CmiNodeLock *> node_lock) noexcept
 Returns true if the lock was successfully acquired and false if the lock is already acquired by another processor.
 
void unlock (const gsl::not_null< CmiNodeLock *> node_lock) noexcept
 Unlock a converse CmiNodeLock.
 
template<typename... Args>
void printf (const std::string &format, Args &&... args)
 Print an atomic message to stdout with C printf usage. More...
 
template<typename... Args>
void printf_error (const std::string &format, Args &&... args)
 Print an atomic message to stderr with C printf usage. More...
 
template<class Action , class SenderProxy , class TargetProxy , class... Ts>
void contribute_to_reduction (ReductionData< Ts... > reduction_data, const SenderProxy &sender_component, const TargetProxy &target_component) noexcept
 Perform a reduction from the sender_component (typically your own parallel component) to the target_component, performing the Action upon receiving the reduction.
 
template<typename Base >
void register_derived_classes_with_charm () noexcept
 
template<typename ParallelComponentTag , typename Metavariables >
auto get_parallel_component (ConstGlobalCache< Metavariables > &cache) noexcept -> Parallel::proxy_from_parallel_component< ConstGlobalCache_detail::get_component_if_mocked< typename Metavariables::component_list, ParallelComponentTag >> &
 Access the Charm++ proxy associated with a ParallelComponent. More...
 
template<typename ParallelComponentTag , typename Metavariables >
auto get_parallel_component (const ConstGlobalCache< Metavariables > &cache) noexcept -> const Parallel::proxy_from_parallel_component< ConstGlobalCache_detail::get_component_if_mocked< typename Metavariables::component_list, ParallelComponentTag >> &
 Access the Charm++ proxy associated with a ParallelComponent. More...
 
template<typename ConstGlobalCacheTag , typename Metavariables >
auto get (const ConstGlobalCache< Metavariables > &cache) noexcept -> const ConstGlobalCache_detail::type_for_get< ConstGlobalCacheTag, Metavariables > &
 Access data in the cache. More...
 
template<typename ReceiveTag , typename Proxy , typename ReceiveDataType , Requires< detail::has_ckLocal_method< std::decay_t< Proxy >>::value > = nullptr>
void receive_data (Proxy &&proxy, typename ReceiveTag::temporal_id temporal_id, ReceiveDataType &&receive_data, const bool enable_if_disabled) noexcept
 Send the data args... to the algorithm running on proxy, and tag the message with the identifier temporal_id. More...
 
template<typename ReceiveTag , typename Proxy , typename ReceiveDataType , Requires< detail::has_ckLocal_method< std::decay_t< Proxy >>::value > = nullptr>
void receive_data (Proxy &&proxy, typename ReceiveTag::temporal_id temporal_id, ReceiveDataType &&receive_data) noexcept
 Send the data args... to the algorithm running on proxy, and tag the message with the identifier temporal_id. More...
 
template<typename Action , typename Proxy >
void simple_action (Proxy &&proxy) noexcept
 Invoke a simple action on proxy
 
template<typename Action , typename Proxy , typename Arg0 , typename... Args>
void simple_action (Proxy &&proxy, Arg0 &&arg0, Args &&... args) noexcept
 Invoke a simple action on proxy
 
template<typename Action , typename Proxy >
void threaded_action (Proxy &&proxy) noexcept
 Invoke a threaded action on proxy, where the proxy must be a nodegroup.
 
template<typename Action , typename Proxy , typename Arg0 , typename... Args>
void threaded_action (Proxy &&proxy, Arg0 &&arg0, Args &&... args) noexcept
 Invoke a threaded action on proxy, where the proxy must be a nodegroup.
 
template<typename T >
using has_pup_member_t = typename has_pup_member< T >::type
 
template<typename T >
constexpr bool has_pup_member_v = has_pup_member<T>::value
 
template<typename T >
using is_pupable_t = typename is_pupable< T >::type
 
template<typename T >
constexpr bool is_pupable_v = is_pupable<T>::value
 

Detailed Description

Contains functions that forward to Charm++ parallel functions.

Typedef Documentation

◆ has_pup_member_t

template<typename T >
using Parallel::has_pup_member_t = typedef typename has_pup_member<T>::type
See also
has_pup_member

◆ is_pupable_t

template<typename T >
using Parallel::is_pupable_t = typedef typename is_pupable<T>::type
See also
is_pupable

Variable Documentation

◆ has_pup_member_v

template<typename T >
constexpr bool Parallel::has_pup_member_v = has_pup_member<T>::value
See also
has_pup_member

◆ is_pupable_v

template<typename T >
constexpr bool Parallel::is_pupable_v = is_pupable<T>::value
See also
is_pupable