9#define _USE_MATH_DEFINES
24#include "hilapp_mpi.h"
44#include "plumbing/memalloc.h"
45#include "plumbing/timing.h"
50#define RESTRICT __restrict__
98extern std::ostream
out;
101extern std::ostream
out0;
108extern bool about_to_finish;
112extern bool check_input;
113extern int check_with_nodes;
116extern const char *input_file;
118enum sort { unsorted, ascending, descending };
123void error(
const std::string &msg);
124void error(
const char *msg);
138#include "plumbing/logger.h"
157constexpr inline void swap(T &a, T &b) {
167#if defined(CUDA) || defined(HIP)
168#include "plumbing/backend_gpu/defs.h"
170#include "plumbing/backend_vector/defs.h"
172#include "plumbing/backend_cpu/defs.h"
176#include "plumbing/random.h"
179#include "plumbing/type_tools.h"
181#include "plumbing/has_unary_minus.h"
183#if defined(CUDA) || defined(HIP)
184#include "plumbing/backend_gpu/gpu_templated_ops.h"
189#include "plumbing/real_var_ops.h"
192#define MAX_GATHERS 1000
195void initialize_communications(
int &argc,
char ***argv);
196void split_into_partitions(
int rank);
197bool is_comm_initialized(
void);
198void finish_communications();
199void abort_communications(
int status);
202void print_dashed_line(
const std::string &txt = {});
Define the logger class here.
T arg(const Complex< T > &a)
Return argument of Complex number.
fft_direction
define a class for FFT direction
constexpr T sqr(const T &arg)
Define convenience function sqr(), returning square of argument.
Invert diagonal + const. matrix using Sherman-Morrison formula.
logger_class log
Now declare the logger.
int myrank()
rank of this node
int number_of_nodes()
how many nodes there are
void synchronize()
synchronize mpi
std::ostream out
this is our default output file stream
std::ostream out0
This writes output only from main process (node 0)
std::ofstream output_file
this is just a hook to store output file, if it is in use
void initialize(int argc, char **argv)
Read in command line arguments. Initialise default stream and MPI communication.
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...
void terminate(int status)
This file contains #defined constants.