16#ifndef Process_included
17#define Process_included
19#include <TRUST_Version.h>
20#include <TRUSTTabs_forward.h>
35int get_disable_stop();
36void change_disable_stop(
int new_stop);
54 static int me() {
return 0; }
55 static int nproc() {
return 1; }
57 static void exit(
int exit_code = -1) {
throw std::invalid_argument(
"an error is occured"); }
58 static void exit(
const std::string& s) {
throw std::invalid_argument(std::string(
"an error is occured ")+s); }
59 static double mp_sum(
double x) {
return x; }
60 static float mp_sum(
float x) {
return x; }
61 static double mp_max(
double x) {
return x; }
62 static int mp_max(
int x) {
return x; }
63 static double mp_min(
double x) {
return x; }
64 static int mp_min(
int x) {
return x; }
65 static trustIdType
mp_sum(
int x) {
return x; }
66 static trustIdType
mp_sum(trustIdType x) {
return x; }
67 template<
typename _TYPE_>
69 template<
typename _TYPE_>
71 template<
typename _TYPE_>
77 static void exit(
int exit_code = -1);
82 static double mp_sum(
double);
83 static float mp_sum(
float);
84 static trustIdType
mp_sum(trustIdType);
85 static double mp_max(
double);
86 static double mp_min(
double);
91 static trustIdType
mp_sum(
int v) {
return mp_sum(
static_cast<trustIdType
>(v)); }
92 static trustIdType
mp_max(trustIdType);
93 static trustIdType
mp_min(trustIdType);
117 static void mp_sum_for_each(T& arg1, T& arg2, T& arg3, T& arg4, T& arg5);
126 static void mp_max_for_each(T& arg1, T& arg2, T& arg3, T& arg4, T& arg5);
135 static void mp_min_for_each(T& arg1, T& arg2, T& arg3, T& arg4, T& arg5);
137 template<
typename _TYPE_>
139 template<
typename _TYPE_>
141 template<
typename _TYPE_>
145 static bool mp_or(
bool);
150 KOKKOS_INLINE_FUNCTION
static void Kokkos_exit(
const char*);
152 static void exit(
const Nom& message,
int exit_code = -1);
157 static Sortie&
Journal(
int message_level = 0);
class Nom: a character string for naming TRUST objects.
Base class for TRUST objects (Objet_U).
Base class of TRUST (in particular Objet_U).
static void mp_max_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static double mp_min(double)
static int check_int_overflow(trustIdType)
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: ...
static double ram_processeur()
static trustIdType mppartial_sum(trustIdType i)
Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
static KOKKOS_INLINE_FUNCTION void Kokkos_exit(const char *)
Exit routine for TRUST within a Kokkos region.
static int multiple_files
static double mp_max(double)
static void mp_sum_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static int node_master()
Returns 1 if on the NUMA node master processor, 0 otherwise.
static bool is_parallel()
static Sortie & Journal(int message_level=0)
Returns a static Sortie object used as an event journal.
static void abort()
Abort routine for TRUST on a fatal error.
static int nproc()
Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current...
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
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.
static double mp_sum_as_double(int v)
static void imprimer_ram_totale(int all_process=0)
static void barrier()
Synchronizes all processors in the current group (waits until all processors have reached the barrier...
static bool force_single_file(const int ranks, const Nom &filename)
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.
static int exception_sur_exit
static int me()
Returns the rank of the local processor in the current communication group. See Comm_Group::rank() an...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static void mp_min_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static bool is_sequential()
static bool mp_and(bool)
Computes the logical AND of b across all processors in the current group.
Base class for output streams.