TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Process Class Reference

Base class of TRUST (in particular Objet_U). More...

#include <Process.h>

Inheritance diagram for Process:
[legend]

Public Member Functions

virtual ~Process ()

Static Public Member Functions

static int me ()
 Returns the rank of the local processor in the current communication group. See Comm_Group::rank() and PE_Groups::current_group().
static int nproc ()
 Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current_group().
static bool is_parallel ()
static void exit (int exit_code=-1)
 Exit routine for TRUST within a Kokkos region.
static double mp_sum (double)
 Computes the sum of x over all processors in the current group.
static float mp_sum (float)
static trustIdType mp_sum (trustIdType)
 Computes the sum of x over all processors in the current group.
static double mp_max (double)
static double mp_min (double)
static int mp_max (int)
 Returns the maximum value of x across all processors in the current group.
static int mp_min (int)
 Returns the minimum value of x across all processors in the current group.
static double mp_sum_as_double (int v)
static trustIdType mppartial_sum (trustIdType i)
 Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2)
 C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2)
 C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2)
 C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename _TYPE_>
static void mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
static bool mp_and (bool)
 Computes the logical AND of b across all processors in the current group.
static bool mp_or (bool)
static int check_int_overflow (trustIdType)
static int je_suis_maitre ()
 Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static KOKKOS_INLINE_FUNCTION void Kokkos_exit (const char *)
 Exit routine for TRUST within a Kokkos region.
static int node_master ()
 Returns 1 if on the NUMA node master processor, 0 otherwise.
static void exit (const Nom &message, int exit_code=-1)
static bool is_sequential ()
static void barrier ()
 Synchronizes all processors in the current group (waits until all processors have reached the barrier).
static void abort ()
 Abort routine for TRUST on a fatal error.
static SortieJournal (int message_level=0)
 Returns a static Sortie object used as an event journal.
static double ram_processeur ()
static void imprimer_ram_totale (int all_process=0)
static bool force_single_file (const int ranks, const Nom &filename)

Static Public Attributes

static int exception_sur_exit =0
static int multiple_files =5120

Detailed Description

Base class of TRUST (in particular Objet_U).

It provides a few basic services accessible from anywhere in the code. These services were historically non-static methods; since all of them are now static, this class has no other purpose than to group those methods.

See also
Objet_U

Definition at line 47 of file Process.h.

Constructor & Destructor Documentation

◆ ~Process()

virtual Process::~Process ( )
inlinevirtual

Definition at line 50 of file Process.h.

Member Function Documentation

◆ abort()

void Process::abort ( )
static

Abort routine for TRUST on a fatal error.

In optimized mode, exits cleanly. In debug mode, aborts abruptly to allow debugger inspection.

Definition at line 573 of file Process.cpp.

◆ barrier()

void Process::barrier ( )
static

Synchronizes all processors in the current group (waits until all processors have reached the barrier).

Must be executed on all processors in the group.

Definition at line 133 of file Process.cpp.

◆ check_int_overflow()

int Process::check_int_overflow ( trustIdType v)
static

Definition at line 437 of file Process.cpp.

◆ exit() [1/2]

void Process::exit ( const Nom & message,
int exit_code = -1 )
static

Definition at line 473 of file Process.cpp.

◆ exit() [2/2]

void Process::exit ( int i = -1)
static

Exit routine for TRUST within a Kokkos region.

Exit routine for TRUST on error.

Saves memory and hierarchy information to files "memoire.dump" and "hierarchie.dump".

Parameters
iExit code (forced to -1 if 0).

Definition at line 466 of file Process.cpp.

◆ force_single_file()

bool Process::force_single_file ( const int ranks,
const Nom & filename )
static

Definition at line 57 of file Process.cpp.

◆ imprimer_ram_totale()

void Process::imprimer_ram_totale ( int all_process = 0)
static

Definition at line 655 of file Process.cpp.

◆ is_parallel()

bool Process::is_parallel ( )
static

Definition at line 108 of file Process.cpp.

◆ is_sequential()

bool Process::is_sequential ( )
static

Definition at line 113 of file Process.cpp.

◆ je_suis_maitre()

int Process::je_suis_maitre ( )
static

Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.

Returns
1 if master processor, 0 otherwise.

Definition at line 82 of file Process.cpp.

◆ Journal()

Sortie & Process::Journal ( int message_level = 0)
static

Returns a static Sortie object used as an event journal.

If message_level <= verbose_level_, the message is written; otherwise it is discarded to a Sortie_Nulle. If the journal file is open, messages are written to the file; otherwise to stderr.

Parameters
message_levelLevel of the message. Written only if <= verbose_level_.
Returns
Reference to the appropriate Sortie output stream.

Definition at line 592 of file Process.cpp.

◆ Kokkos_exit()

KOKKOS_INLINE_FUNCTION void Process::Kokkos_exit ( const char * str)
static

Exit routine for TRUST within a Kokkos region.

Parameters
strError message to display.

Definition at line 172 of file Process.h.

◆ me()

int Process::me ( )
static

Returns the rank of the local processor in the current communication group. See Comm_Group::rank() and PE_Groups::current_group().

Returns
Rank in the current group.

Definition at line 122 of file Process.cpp.

◆ mp_and()

bool Process::mp_and ( bool b)
static

Computes the logical AND of b across all processors in the current group.

Parameters
bBoolean value to reduce with AND operation.
Returns
True if b is true on all processors, false otherwise.

Definition at line 418 of file Process.cpp.

◆ mp_max() [1/2]

double Process::mp_max ( double x)
static

Definition at line 379 of file Process.cpp.

◆ mp_max() [2/2]

int Process::mp_max ( int x)
static

Returns the maximum value of x across all processors in the current group.

Parameters
xValue to reduce with max operation.
Returns
Maximum value of x across all processors.

Definition at line 378 of file Process.cpp.

◆ mp_max_for_each() [1/4]

template<typename T>
void Process::mp_max_for_each ( T & arg1,
T & arg2 )
static

C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.

Definition at line 245 of file Process.cpp.

◆ mp_max_for_each() [2/4]

template<typename T>
void Process::mp_max_for_each ( T & arg1,
T & arg2,
T & arg3 )
static

Definition at line 256 of file Process.cpp.

◆ mp_max_for_each() [3/4]

template<typename T>
void Process::mp_max_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4 )
static

Definition at line 268 of file Process.cpp.

◆ mp_max_for_each() [4/4]

template<typename T>
void Process::mp_max_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4,
T & arg5 )
static

Definition at line 333 of file Process.cpp.

◆ mp_max_for_each_item()

template<typename _TYPE_>
template void Process::mp_max_for_each_item< int > ( TRUSTArray< _TYPE_ > & x,
int n = -1 )
static

Definition at line 197 of file Process.cpp.

◆ mp_min() [1/2]

double Process::mp_min ( double x)
static

Definition at line 391 of file Process.cpp.

◆ mp_min() [2/2]

int Process::mp_min ( int x)
static

Returns the minimum value of x across all processors in the current group.

Parameters
xValue to reduce with min operation.
Returns
Minimum value of x across all processors.

Definition at line 390 of file Process.cpp.

◆ mp_min_for_each() [1/4]

template<typename T>
void Process::mp_min_for_each ( T & arg1,
T & arg2 )
static

C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.

Definition at line 282 of file Process.cpp.

◆ mp_min_for_each() [2/4]

template<typename T>
void Process::mp_min_for_each ( T & arg1,
T & arg2,
T & arg3 )
static

Definition at line 293 of file Process.cpp.

◆ mp_min_for_each() [3/4]

template<typename T>
void Process::mp_min_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4 )
static

Definition at line 305 of file Process.cpp.

◆ mp_min_for_each() [4/4]

template<typename T>
void Process::mp_min_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4,
T & arg5 )
static

Definition at line 347 of file Process.cpp.

◆ mp_min_for_each_item()

template<typename _TYPE_>
template void Process::mp_min_for_each_item< int > ( TRUSTArray< _TYPE_ > & x,
int n = -1 )
static

Definition at line 200 of file Process.cpp.

◆ mp_or()

bool Process::mp_or ( bool b)
static

Definition at line 427 of file Process.cpp.

◆ mp_sum() [1/3]

double Process::mp_sum ( double x)
static

Computes the sum of x over all processors in the current group.

Parameters
xValue to sum across all processors.
Returns
Sum of x over all processors in the current group.
See also
mp_max()

Definition at line 145 of file Process.cpp.

◆ mp_sum() [2/3]

float Process::mp_sum ( float x)
static

Definition at line 153 of file Process.cpp.

◆ mp_sum() [3/3]

trustIdType Process::mp_sum ( trustIdType x)
static

Computes the sum of x over all processors in the current group.

!!! Note that the sum of many int might result in a long !!!

Parameters
xValue to sum across all processors.
Returns
Sum of x over all processors in the current group.
See also
mp_max()

Definition at line 169 of file Process.cpp.

◆ mp_sum_as_double()

double Process::mp_sum_as_double ( int v)
inlinestatic

Definition at line 97 of file Process.h.

◆ mp_sum_for_each() [1/4]

template<typename T>
void Process::mp_sum_for_each ( T & arg1,
T & arg2 )
static

C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.

Definition at line 208 of file Process.cpp.

◆ mp_sum_for_each() [2/4]

template<typename T>
void Process::mp_sum_for_each ( T & arg1,
T & arg2,
T & arg3 )
static

Definition at line 219 of file Process.cpp.

◆ mp_sum_for_each() [3/4]

template<typename T>
void Process::mp_sum_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4 )
static

Definition at line 231 of file Process.cpp.

◆ mp_sum_for_each() [4/4]

template<typename T>
void Process::mp_sum_for_each ( T & arg1,
T & arg2,
T & arg3,
T & arg4,
T & arg5 )
static

Definition at line 319 of file Process.cpp.

◆ mp_sum_for_each_item()

template<typename _TYPE_>
template void Process::mp_sum_for_each_item< int > ( TRUSTArray< _TYPE_ > & x,
int n = -1 )
static

Definition at line 194 of file Process.cpp.

◆ mppartial_sum()

trustIdType Process::mppartial_sum ( trustIdType x)
static

Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).

Parameters
xValue to include in the partial sum.
Returns
Partial sum of x over processors 0 to me()-1.
See also
Comm_Group::mppartial_sum()

Definition at line 403 of file Process.cpp.

◆ node_master()

int Process::node_master ( )
static

Returns 1 if on the NUMA node master processor, 0 otherwise.

Returns
1 if node master processor, 0 otherwise.

Definition at line 92 of file Process.cpp.

◆ nproc()

int Process::nproc ( )
static

Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current_group().

Returns
Number of processors in the current group.

Definition at line 102 of file Process.cpp.

◆ ram_processeur()

double Process::ram_processeur ( )
static

Definition at line 605 of file Process.cpp.

Member Data Documentation

◆ exception_sur_exit

int Process::exception_sur_exit =0
static

Definition at line 161 of file Process.h.

◆ multiple_files

int Process::multiple_files =5120
static

Definition at line 162 of file Process.h.


The documentation for this class was generated from the following files:
  • /home/docs/trust-code/src/Kernel/Utilitaires/Process.h
  • /home/docs/trust-code/src/Kernel/Utilitaires/Process.cpp